Token导航 LogoToken导航TokenDH.com
Simple MCP Walk Through logo
浏览器工具未说明官方级别未说明来源级核验

Simple MCP Walk Through

MCP Server

MCP是一个自动化的AI服务集成工具,通过连接外部服务的MCP服务器,无需编写自定义集成代码即可实现与Slack、Google Drive等服务的交互,适用于AI应用开发中的服务集成场景。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
HTMLClaude自动化Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

jcarras

提供方

jcarras

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

MCP简介

如今,软件通常受益于与LLM的集成。当你构建一个人工智能应用程序时,你可能希望它与外部服务进行交互——发送Slack消息、读取Google Drive文件、查询数据库。这些集成被称为“工具”

MCP解决的问题

在MCP之前,您必须为要连接的每个服务编写自定义集成代码。

MCP解决了这个问题。 如果服务提供MCP服务器,您的应用程序将免费获得集成。

______________________________________________________________________

MCP之前

您编写此集成代码:

import { WebClient } from "@slack/web-api";

const slack = new WebClient(process.env.SLACK_TOKEN);

// Define tool for Claude
const slackTool = {
  name: "send_slack_message",
  description: "Send a message to Slack",
  input_schema: {
    type: "object",
    properties: {
      channel: { type: "string" },
      text: { type: "string" }
    }
  }
};

const response = await anthropic.messages.create({
  model: "claude-3-5-sonnet-20241022",
  tools: [slackTool],
  messages: [{ role: "user", content: "Send 'Hello' to #general" }]
});

// Handle the tool call yourself
if (response.stop_reason === "tool_use") {
  const toolUse = response.content.find(c => c.type === "tool_use");

  // You write the Slack integration logic
  await slack.chat.postMessage({
    channel: toolUse.input.channel,
    text: toolUse.input.text
  });
}

// Now repeat this for Google Drive...
// And again for your database...
// And again for every service...

______________________________________________________________________

使用MCP

Slack提供服务器,您只需使用它:

import { Client } from "@modelcontextprotocol/sdk/client";

// Connect to Slack's MCP server (they wrote the integration)
const mcp = new Client();
await mcp.connect(slackMCPServer);

// Get tools automatically
const tools = await mcp.listTools();

const response = await anthropic.messages.create({
  model: "claude-3-5-sonnet-20241022",
  tools: tools, // Slack tools ready to use
  messages: [{ role: "user", content: "Send 'Hello' to #general" }]
});

// Standard tool call - MCP handles Slack API for you
if (response.stop_reason === "tool_use") {
  const toolUse = response.content.find(c => c.type === "tool_use");

  await mcp.callTool({
    name: toolUse.name,
    arguments: toolUse.input
  });
  // MCP server does the actual Slack API call
}

// Add Drive? Just connect another MCP server, same code pattern
// Add database? Same thing

______________________________________________________________________

关键要点

对于支持MCP的工具,您不必编写API集成。您不定义工具模式。您只需连接并使用该工具。

______________________________________________________________________

建筑

MCP Architecture

查看交互式演练

目录标签

目录标签

HTMLClaude自动化本地部署AI集成自动化工具服务连接无代码集成

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP