烂翻译系列之——MCP开发——连接远程MCP服务
Learn how to connect Claude to remote MCP servers and extend its capabilities with internet-hosted tools and data sources
现在你已成功将 Claude Desktop 连接到本地 MCP 服务,接下来可以探索如何连接远程 MCP 服务,以扩展其功能,并利用互联网托管的工具和数据源。
Remote MCP servers extend AI applications’ capabilities beyond your local environment, providing access to internet-hosted tools, services, and data sources. By connecting to remote MCP servers, you transform AI assistants from helpful tools into informed teammates capable of handling complex, multi-step projects with real-time access to external resources.
远程 MCP 服务能够将 AI 应用的能力扩展到你的本地环境之外,使其可以访问托管在互联网上的工具、服务和数据源。通过连接远程 MCP 服务,你可以将 AI 助手从一个简单的辅助工具转变为具备实时外部资源访问能力的智能协作伙伴,从而胜任复杂的多步骤项目。
Many clients now support remote MCP servers, enabling a wide range of integration possibilities. This guide demonstrates how to connect to remote MCP servers using Claude as an example, one of the many clients that support MCP. While we focus on Claude’s implementation through Custom Connectors, the concepts apply broadly to other MCP-compatible clients.
Understanding Remote MCP Servers 理解远程 MCP 服务
Remote MCP servers function similarly to local MCP servers but are hosted on the internet rather than your local machine. They expose tools, prompts, and resources that Claude can use to perform tasks on your behalf. These servers can integrate with various services such as project management tools, documentation systems, code repositories, and any other API-enabled service.
远程 MCP 服务的功能与本地 MCP 服务类似,但它们托管在互联网上,而非你的本地设备上。它们提供工具、提示词和资源,使 Claude 能代表你执行各种任务。这些服务可与多种服务集成,例如项目管理工具、文档系统、代码仓库,以及任何支持 API 的服务。
The key advantage of remote MCP servers is their accessibility. Unlike local servers that require installation and configuration on each device, remote servers are available from any MCP client with an internet connection. This makes them ideal for web-based AI applications, integrations that emphasize ease-of-use and services that require server-side processing or authentication.
远程MCP服务的核心优势在于其可访问性。与需要在每台设备上安装配置的本地服务不同,远程服务可通过任何具有互联网连接的MCP客户端进行访问。这使其成为基于网络的AI应用、强调易用性的集成方案,以及需要服务端处理或身份验证服务的理想选择。
What are Custom Connectors? 什么是自定义连接器?
Custom Connectors serve as the bridge between Claude and remote MCP servers. They allow you to connect Claude directly to the tools and data sources that matter most to your workflows, enabling Claude to operate within your favorite software and draw insights from the complete context of your external tools.
自定义连接器是连接 Claude 与远程 MCP 服务的桥梁。它允许你将 Claude 直接连接到对工作流至关重要的工具和数据源,使 Claude 能在你常用的软件中运行,并从外部工具的完整上下文中提取洞察。
- Connect Claude to existing remote MCP servers provided by third-party developers 将 Claude 连接到第三方开发者提供的现有远程 MCP 服务
- Build your own remote MCP servers to connect with any tool 构建自己的远程 MCP 服务,以连接任意工具
Connecting to a Remote MCP Server 连接远程 MCP 服务
The process of connecting Claude to a remote MCP server involves adding a Custom Connector through the Claude interface. This establishes a secure connection between Claude and your chosen remote server.
将 Claude 连接到远程 MCP 服务的过程,是通过 Claude 界面添加一个自定义连接器来完成的。这将在 Claude 与你选择的远程服务之间建立安全连接。
-
Navigate to Connector Settings 导航到连接器设置
Open Claude in your browser and navigate to the settings page. You can access this by clicking on your profile icon and selecting “Settings” from the dropdown menu. Once in settings, locate and click on the “Connectors” section in the sidebar.
在浏览器中打开 Claude,然后进入设置页面。你可以通过点击个人资料图标,并从下拉菜单中选择“设置”来访问。进入设置后,在侧边栏中找到并点击“连接器”(Connectors)部分。
This will display your currently configured connectors and provide options to add new ones.
这将显示你当前已配置的连接器,并提供添加新连接器的选项。
-
Add a Custom Connector 添加自定义连接器
In the Connectors section, scroll to the bottom where you’ll find the “Add custom connector” button. Click this button to begin the connection process.
在“连接器”部分,向下滚动到底部,你会看到“添加自定义连接器”按钮。点击该按钮以开始连接流程。
A dialog will appear prompting you to enter the remote MCP server URL. This URL should be provided by the server developer or administrator. Enter the complete URL, ensuring it includes the proper protocol (https://) and any necessary path components.
此时会弹出一个对话框,提示你输入远程 MCP 服务的 URL。该 URL 应由服务开发者或管理员提供。请完整输入 URL,确保包含正确的协议(https://)以及任何必要的路径部分。
After entering the URL, click “Add” to proceed with the connection.
输入 URL 后,点击“添加”以继续建立连接。
-
Complete Authentication 完成身份验证
Most remote MCP servers require authentication to ensure secure access to their resources. The authentication process varies depending on the server implementation but commonly involves OAuth, API keys, or username/password combinations.
大多数远程 MCP 服务需要身份验证,以确保对其资源的安全访问。身份验证流程因服务实现方式而异,但通常包括 OAuth、API 密钥或用户名/密码组合等方式。
Follow the authentication prompts provided by the server. This may redirect you to a third-party authentication provider or display a form within Claude. Once authentication is complete, Claude will establish a secure connection to the remote server.
请按照服务提供的身份验证提示进行操作。此过程可能会将你重定向到第三方身份验证提供商,或在 Claude 界面内显示一个表单。完成身份验证后,Claude 将与远程服务建立安全连接。
-
Access Resources and Prompts 访问资源和提示词
After successful connection, the remote server’s resources and prompts become available in your Claude conversations. You can access these by clicking the paperclip icon in the message input area, which opens the attachment menu.
成功连接后,远程服务的资源和提示词将可在你的 Claude 对话中使用。你可以点击消息输入区域的回形针图标,打开附件菜单来访问这些内容。
The menu displays all available resources and prompts from your connected servers. Select the items you want to include in your conversation. These resources provide Claude with context and information from your external tools.
该菜单会显示所有已连接服务提供的可用资源和提示词。请选择你希望包含在对话中的项目。这些资源将为 Claude 提供来自外部工具的上下文和信息。
-
Configure Tool Permissions
Remote MCP servers often expose multiple tools with varying capabilities. You can control which tools Claude is allowed to use by configuring permissions in the connector settings. This ensures Claude only performs actions you’ve explicitly authorized.
远程 MCP 服务通常会提供多种具备不同功能的工具。你可以通过在连接器设置中配置权限,来控制 Claude 可以使用哪些工具。这能确保 Claude 仅执行你明确授权的操作。
Navigate back to the Connectors settings and click on your connected server. Here you can enable or disable specific tools, set usage limits, and configure other security parameters according to your needs.
返回连接器设置,然后点击你已连接的服务。在这里,你可以根据需要启用或禁用特定工具、设置使用限制,并配置其他安全参数。
Best Practices for Using Remote MCP Servers 使用远程 MCP 服务的最佳实践
When working with remote MCP servers, consider these recommendations to ensure a secure and efficient experience:
在使用远程 MCP 服务时,请考虑以下建议,以确保安全高效的体验:
Security considerations: Always verify the authenticity of remote MCP servers before connecting. Only connect to servers from trusted sources, and review the permissions requested during authentication. Be cautious about granting access to sensitive data or systems.
安全注意事项:在连接前务必验证远程 MCP 服务的真实性。仅连接来自可信来源的服务,并仔细审查身份验证过程中请求的权限。对于敏感数据或系统的访问授权应格外谨慎。
Managing multiple connectors: You can connect to multiple remote MCP servers simultaneously. Organize your connectors by purpose or project to maintain clarity. Regularly review and remove connectors you no longer use to keep your workspace organized and secure.
Next Steps 下一步
Now that you’ve connected Claude to a remote MCP server, you can explore its capabilities in your conversations. Try using the connected tools to automate tasks, access external data, or integrate with your existing workflows.