MCP 客户端节点#
¥MCP Client node
MCP 客户端节点是一个 模型上下文协议(MCP) 客户端,允许你使用外部 MCP 服务器公开的工具。
¥The MCP Client node is a Model Context Protocol (MCP) client that allows you to use the tools that are exposed by an external MCP server.
你可以使用“MCP 客户端”节点将 MCP 工具作为常规步骤应用于工作流。
¥You can use the MCP Client node to use MCP tools as regular steps in a workflow.
如果你想使用 MCP 工具作为 AI 代理的工具,请改用 MCP 客户端工具节点。
¥If you want to use MCP tools as tools for an AI Agent, use the MCP Client Tool node instead.
Credentials
MCP 客户端节点支持 Bearer、通用 header 和 OAuth2 身份验证方法。
¥The MCP Client node supports Bearer, generic header, and OAuth2 authentication methods.
节点参数#
¥Node parameters
使用以下参数配置节点:
¥Configure the node with the following parameters.
- 服务器传输:你要连接的 MCP 服务器端点使用的传输协议。
¥Server Transport: The transport protocol used by the MCP Server endpoint you want to connect to.
- MCP 端点 URL:外部 MCP 服务器的 URL。例如,
https://mcp.notion.com/mcp。
¥MCP Endpoint URL: The URL of the external MCP Server. For example, https://mcp.notion.com/mcp.
¥Authentication: The authentication method for authentication to your MCP server. The MCP Client node supports bearer, generic header, and OAuth2 authentication. Select None to attempt to connect without authentication.
- 工具:选择要在节点中使用的工具。工具列表会自动从外部 MCP 服务器获取。
¥Tool: Select the tool to use in the node. The list of tools is automatically fetched from the external MCP server.
- 输入模式:
¥Input Mode:
-
手动:手动指定每个工具参数。
¥Manual: Specify each tool parameter manually.
-
JSON:以 JSON 对象的形式指定工具参数。使用此模式处理带有嵌套参数的工具。
¥JSON: Specify tool parameters as a JSON object. Use this mode for tools with nested parameters.
选项#
¥Options
- 转换为二进制:是否将图片和音频转换为二进制数据。如果禁用,则图片和音频将以 base64 编码字符串的形式返回。
¥Convert to Binary: Whether to convert images and audio to binary data. If false, images and audio are returned as base64 encoded strings.
- 超时:等待工具调用完成的时间(以毫秒为单位)。
¥Timeout: Time in milliseconds to wait for tool calls to finish.
模板和示例#
¥Templates and examples
相关资源#
¥Related resources
要将 MCP 工具与 AI 代理一起使用,n8n 具有 MCP 客户端工具节点。
¥To use MCP tools with AI Agents, n8n has the MCP Client Tool node.
n8n 还包含一个 MCP 服务器触发器 节点,允许你将 n8n 工具暴露给外部 AI 代理。
¥n8n also has an MCP Server Trigger node that allows you to expose n8n tools to external AI Agents.
请参阅 MCP 文档 和 MCP 规范 文档,了解有关协议、服务器和客户端的更多详细信息。
¥Refer to the MCP documentation and MCP specification for more details about the protocol, servers, and clients.
Refer to LangChain's documentation on tools for more information about tools in LangChain.
View n8n's Advanced AI documentation.