QVeris
运行任务
QVerisQVerisGuide指导v2.1 — July 29, 2026v2.1 — 2026 年 7 月 29 日

MCP Server GuideMCP Server 指南

A practical guide to how MCP servers expose tools, resources, and prompts; how clients discover and call them; and how to choose, deploy, authorize, validate, monitor, and retire a server safely.关于 MCP 服务器如何公开工具、资源和提示的实用指南;客户如何发现并称呼他们;以及如何安全地选择、部署、授权、验证、监控和退役服务器。

WLWL
Wang Linfang王林芳 Author作者
CEO & Founder, QVeris AI. Previously built developer platform infrastructure at early-stage startups; 8+ years in API design and developer tooling.QVeris AI 首席执行官兼创始人。之前在早期初创公司建立过开发者平台基础设施;拥有 8 年以上 API 设计和开发工具经验。
TRTR
Technical Reviewer技术评审员 Verified已验证
Technical review against the current MCP architecture, server concepts, transport, tools, and authorization specifications针对当前 MCP 架构、服务器概念、传输、工具和授权规范进行技术审查
Published: May 19, 2026 • Updated: August 4, 2026 (v3.0)发布日期:2026 年 5 月 19 日 • 更新日期:2026 年 8 月 4 日 (v3.0)
Conflict of Interest Disclosure:利益冲突披露: The author (Wang Linfang) is the CEO & Founder of QVeris AI, which operates a capability discovery and routing layer mentioned in this guide. The article separates作者(王林芳)是QVeris AI的首席执行官兼创始人,该公司运营本指南中提到的能力发现和路由层。文章分开 MCP protocol responsibilitiesMCP协议职责 from QVeris product behavior. QVeris is not the protocol, an authorization server, or a substitute for server-side access control.来自 QVeris 产品行为。 QVeris 不是协议、授权服务器或服务器端访问控制的替代品。 Readers should verify the exact artifact, endpoint, permissions, protocol version, provider terms, and test evidence读者应验证确切的工件、端点、权限、协议版本、提供商条款和测试证据 used in their own deployment.在自己的部署中使用。
TL;DR长话短说
  • Problem:问题: AI agents need tools and data, but every server introduces a trust boundary, capability set, credential path, failure mode, and operational dependency.人工智能代理需要工具和数据,但每台服务器都会引入信任边界、功能集、凭证路径、故障模式和操作依赖性。
  • Solution:解决方案: Evaluate servers by provenance, protocol and transport support, schemas, authorization, side effects, data handling, observability, failure behavior, and exit strategy—not by popularity alone.通过出处、协议和传输支持、模式、授权、副作用、数据处理、可观察性、故障行为和退出策略来评估服务器,而不仅仅是受欢迎程度。
  • Result:结果: A repeatable workflow for discovering, inspecting, authorizing, calling, validating, monitoring, and replacing MCP servers in production AI applications.用于在生产 AI 应用程序中发现、检查、授权、调用、验证、监控和替换 MCP 服务器的可重复工作流程。

What Is an MCP Server?什么是 MCP 服务器?

An MCP server is a capability provider in the Model Context Protocol that exposes capabilities to an MCP client. A server can publish tools, resources, and prompts through JSON-RPC, while the transport layer carries those messages over stdio or Streamable HTTP. The host—not the server—decides how capabilities enter the model context and when user approval is required.MCP 服务器是模型上下文协议中的功能提供者,向 MCP 客户端公开功能。服务器可以通过 JSON-RPC 发布工具、资源和提示,而传输层则通过 stdio 或 Streamable HTTP 承载这些消息。主机(而不是服务器)决定功能如何进入模型上下文以及何时需要用户批准。

An MCP server is the capability provider in the Model Context Protocol. While MCP clients (inside AI applications like Claude Desktop or Cursor) initiate connections, servers respond to those connections by exposing the tools, resources, and prompts available to connected clients.MCP 服务器是模型上下文协议中的能力提供者。当 MCP 客户端(在 Claude Desktop 或 Cursor 等 AI 应用程序内部)发起连接时,服务器通过向连接的客户端公开可用的工具、资源和提示来响应这些连接。

MCP has a required base protocol and lifecycle, while individual features are negotiated during initialization. A server may supportMCP 具有必需的基本协议和生命周期,而各个功能则在初始化期间协商。服务器可能支持 tools/list工具/列表 and tools/call工具/调用, resources/list and resources/read资源/列表和资源/阅读, or, 或者 prompts/list and prompts/get提示/列表和提示/获取. Do not assume every server exposes all three primitives.。不要假设每个服务器都公开所有三个原语。

The ecosystem includes official SDKs, reference implementations, vendor-hosted remote servers, local community packages, and public registries. A listing or repository star count is discovery evidence—not a security certification. Start with the official该生态系统包括官方 SDK、参考实现、供应商托管的远程服务器、本地社区包和公共注册表。列表或存储库星级计数是发现证据,而不是安全认证。从官方开始 MCP server conceptsMCP 服务器概念 and architecture overview架构概述, then verify the exact server artifact you plan to execute.,然后验证您计划执行的确切服务器工件。

Server selection criteria服务器选择标准 — Record evidence for these five production dimensions before connecting a server:— 在连接服务器之前记录这五个生产维度的证据:

1. Provenance:1. 出处: namespace ownership, publisher, package or endpoint origin, release history, and update channel命名空间所有权、发布者、包或端点来源、发布历史记录和更新通道

2. Protocol contract:2、协议合约: negotiated version, declared capabilities, schema stability, pagination, and errors协商版本、声明的功能、模式稳定性、分页和错误

3. Security boundary:3、安全边界: identity, scopes, credential storage, side effects, output handling, and approvals身份、范围、凭证存储、副作用、输出处理和批准

4. Operations:4. 操作: timeouts, rate limits, retries, logs, tracing, health checks, version pinning, and rollback超时、速率限制、重试、日志、跟踪、运行状况检查、版本固定和回滚

5. Fitness:5、健身: the smallest capability set and transport that safely satisfies the intended workflow安全满足预期工作流程的最小功能集和传输

Evidence source: current official specification, server or SDK documentation, package metadata, and tests from your deployment.证据来源:当前的官方规范、服务器或 SDK 文档、包元数据以及部署中的测试。

Production safety is shared across participants. Servers must validate inputs, enforce access control, rate-limit calls, and sanitize outputs; clients should show sensitive inputs, request confirmation, apply timeouts, validate results, and retain audit evidence. See the official安全生产由参与者共享。服务器必须验证输入、实施访问控制、限制调用速率并清理输出;客户应显示敏感输入、请求确认、应用超时、验证结果并保留审计证据。看官方 MCP tools security requirementsMCP 工具安全要求 and authorization specification授权规范.

MCP Server vs MCP Client: The ArchitectureMCP 服务器与 MCP 客户端:架构

The MCP architecture separates concerns clearly: servers provide capabilities, clients consume them, and hosts run one or more clients. This stateless design is intentional — servers don't track which clients connect to them, enabling composability across any MCP-compatible application.MCP 架构清楚地划分了关注点:服务器提供功能,客户端使用它们,主机运行一个或多个客户端。这种无状态设计是有意为之的——服务器不会跟踪哪些客户端连接到它们,从而实现了跨任何 MCP 兼容应用程序的可组合性。

MCP Server vs Client Architecture diagram showing MCP host (AI application) containing Client A and Client B. Below is Transport layer (stdio/Streamable HTTP). Right side shows MCP Servers (Capability Providers) including GitHub MCP, Figma MCP, Linear MCP, Sentry MCP, Context7, and Notion MCP. Bidirectional arrows show JSON-RPC communication between clients and servers.

Key architectural property:主要建筑属性: Clients don't know which other clients are connected to the same server, and servers don't track which clients are using them. A client sends a tools/list request and receives a list of available tools. The server simply responds to requests — it doesn't maintain session state or client identity. This means Claude Desktop, Cursor, Cline, and any other MCP-compatible client can all connect to the same MCP server without the server needing special configuration.客户端不知道哪些其他客户端连接到同一服务器,服务器也不跟踪哪些客户端正在使用它们。客户端发送工具/列表请求并接收可用工具的列表。服务器只是响应请求——它不维护会话状态或客户端身份。这意味着 Claude Desktop、Cursor、Cline 和任何其他 MCP 兼容客户端都可以连接到同一 MCP 服务器,而无需服务器进行特殊配置。

For developers building AI systems, the practical implication: your choice of MCP server is independent of your choice of MCP client. All MCP-compatible applications can connect to the same servers, because the MCP specification standardizes the communication interface.对于构建 AI 系统的开发人员来说,实际意义是:您对 MCP 服务器的选择与 MCP 客户端的选择无关。所有 MCP 兼容的应用程序都可以连接到相同的服务器,因为 MCP 规范标准化了通信接口。

MCP Server Selection MatrixMCP 服务器选择矩阵

Use this matrix to choose a server pattern by trust boundary and workload. Confirm every field against the exact release you deploy; names, schemas, transports, and permissions can change independently.使用此矩阵按信任边界和工作负载选择服务器模式。根据您部署的确切版本确认每个字段;名称、模式、传输和权限可以独立更改。

Production selection matrix for eight common MCP server patterns. Treat registry metadata as discovery evidence and verify the running artifact before granting credentials.八种常见 MCP 服务器模式的生产选择矩阵。将注册表元数据视为发现证据,并在授予凭据之前验证正在运行的工件。
Server Pattern服务器模式 Capability Scope能力范围 Provenance Check来源检查 Schema Check架构检查 Transport运输 Primary Risk主要风险 Authorization授权 Validation验证
Repository server存储库服务器 Code, issues, pull requests代码、问题、拉取请求 Publisher and package发布者和包 Read vs write tools读与写工具 stdio / Streamable HTTPstdio / 可流式 HTTP Write side effects写出副作用 Repository-scoped token存储库范围的令牌 Test branch and rollback测试分支和回滚
Design server设计服务器 Files, nodes, tokens文件、节点、令牌 Vendor documentation供应商文档 File and node identifiers文件和节点标识符 Local or remote本地或远程 Large context大背景 File-scoped access文件范围的访问 Known component fixture已知元件夹具
Work management server工作管理服务器 Issues, projects, comments问题、项目、评论 Workspace owner工作空间所有者 Status and team enums状态和团队枚举 stdio / Streamable HTTPstdio / 可流式 HTTP Unintended updates意外更新 Workspace scopes工作区范围 Sandbox project沙盒项目
Observability server可观测性服务器 Errors, traces, projects错误、痕迹、项目 Vendor endpoint供应商端点 Time range and project时间范围及项目 Streamable HTTP流式 HTTP Sensitive telemetry灵敏遥测 Organization scopes组织范围 Known incident fixture已知事件固定装置
Documentation server文档服务器 Reference content参考内容 Source and freshness来源和新鲜度 Version and library ID版本和库 ID stdio / remote标准输入输出 / 远程 Stale context陈旧的上下文 Public or account key公钥或帐户密钥 Version-specific question版本特定问题
Search server搜索服务器 Web or vertical search网络或垂直搜索 Provider and index提供者和索引 Locale, time, result fields区域设置、时间、结果字段 stdio / remote标准输入输出 / 远程 Untrusted content不受信任的内容 Provider key提供商密钥 Source and date checks来源和日期检查
Database server数据库服务器 Schema, queries, mutations模式、查询、突变 Package maintainer包维护者 SQL and result limitsSQL 和结果限制 stdio / remote标准输入输出 / 远程 Data mutation数据突变 Read-only database role只读数据库角色 Transaction and row limit事务和行限制
Knowledge server知识服务器 Pages, blocks, search页面、块、搜索 Workspace integration工作空间集成 Page and block model页面和块模型 Streamable HTTP流式 HTTP Oversharing过度分享 Page-scoped integration页面范围的集成 Dedicated test page专用测试页面

Validation rule:验证规则: Measure initialization, discovery, authorization, execution, retries, and result validation separately. Never reuse a latency number from another region, provider, payload, account tier, or concurrency level.分别测量初始化、发现、授权、执行、重试和结果验证。切勿重复使用来自其他区域、提供商、负载、帐户层或并发级别的延迟数字。

Eight MCP Server Examples and What to Verify八个 MCP 服务器示例以及要验证的内容

These examples illustrate different capability and trust patterns. Treat every count, schema, transport, and permission as release-specific. Labels marked这些示例说明了不同的能力和信任模式。将每个计数、模式、传输和权限视为特定于版本的。标签标记 Verified已验证 indicate where the publisher offers an official implementation or documentation—not a blanket security approval.指明发布者在何处提供官方实现或文档,而不是一揽子安全批准。

1. GitHub MCP1.GitHubMCP Verified已验证

Repository workflow存储库工作流程 Official publisher官方出版商 Discover current tools发现当前的工具 Verify scopes验证范围

GitHub MCP exposes 12 tools for interacting with GitHub repositories, including issues, pull requests, code search, and file operations. Confirm the current implementation and release atGitHub MCP 公开了 12 个用于与 GitHub 存储库交互的工具,包括问题、拉取请求、代码搜索和文件操作。确认当前实施并发布于 github.com/github/github-mcp-server. Inspect tools/list, separate read from write operations, test against a non-production repository, and grant only the repository permissions required by the selected workflow.。检查工具/列表,将读取与写入操作分开,针对非生产存储库进行测试,并仅授予所选工作流程所需的存储库权限。

Best for:最适合: Teams building AI coding assistants that interact with code repositories, automate issue triage, or generate PR descriptions.构建 AI 编码助手的团队可以与代码存储库交互、自动进行问题分类或生成 PR 描述。

Config note:配置说明: Requires需要 GITHUB_TOKEN env variable with at leastenv 变量至少 repo scope. Missing scopes result in an empty tools/list — a common debugging pitfall.范围。缺少范围会导致工具/列表为空——这是一个常见的调试陷阱。

2. Figma MCP2. Figma MCP

Design workflow设计工作流程 Discover current tools发现当前的工具 Verify transport验证运输

Figma MCP exposes capabilities for interacting with Figma design files — retrieving components, accessing design tokens, reading comments, and navigating file structures. Requires a Figma account with file access permissions. Verify the current feature set from Figma's MCP documentation (Figma MCP 公开了与 Figma 设计文件交互的功能 - 检索组件、访问设计标记、读取注释和导航文件结构。需要具有文件访问权限的 Figma 帐户。从 Figma 的 MCP 文档验证当前功能集(help.figma.com).

Best for:最适合: Design-to-code pipelines where AI needs to understand visual designs and convert them into implementation.从设计到代码的管道,人工智能需要理解视觉设计并将其转化为实施。

3. Linear MCP3. 线性MCP

Work management工作管理 Discover current tools发现当前的工具 Verify transport验证运输

Linear MCP exposes capabilities for managing Linear workspaces — creating and updating issues, managing projects and cycles, and interacting with comments. Linear's API-first architecture makes it useful for workflow automation. Verify schemas, scopes, and side effects fromLinear MCP 公开了管理 Linear 工作区的功能 - 创建和更新问题、管理项目和周期以及与评论交互。 Linear 的 API 优先架构使其对于工作流程自动化非常有用。验证架构、范围和副作用 Linear's MCP integration documentationLinear 的 MCP 集成文档.

Best for:最适合: Engineering teams building AI assistants that handle sprint planning, issue triage, or status updates.工程团队构建人工智能助手来处理冲刺计划、问题分类或状态更新。

4. Sentry MCP4.哨兵MCP Verified已验证

Observability workflow可观察性工作流程 Discover current tools发现当前的工具 Protect telemetry保护遥测 Apache 2.0阿帕奇2.0

Sentry MCP exposes capabilities for interacting with Sentry's error tracking — looking up errors by fingerprint, creating issues, and retrieving stack traces. Inspect the current tool schemas, test with a known incident, minimize organization permissions, and prevent sensitive telemetry from entering prompts or logs.Sentry MCP 公开了与 Sentry 错误跟踪交互的功能 - 通过指纹查找错误、创建问题以及检索堆栈跟踪。检查当前的工具架构,使用已知事件进行测试,最小化组织权限,并防止敏感遥测输入提示或日志。

Best for:最适合: AI systems that write code and need to self-correct based on runtime errors.编写代码并需要根据运行时错误进行自我纠正的人工智能系统。

Config note:配置说明: Missing or insufficient-scope auth tokens cause tools/list to return empty arrays rather than errors — verify your SENTRY_AUTH_TOKEN has at least缺少或范围不足的身份验证令牌会导致工具/列表返回空数组而不是错误 - 验证您的 SENTRY_AUTH_TOKEN 至少具有 org:read scope.范围。

5. Context75. 背景7

Documentation workflow文档工作流程 Freshness matters新鲜度很重要 Discover current tools发现当前的工具 MIT麻省理工学院

Context7 MCP exposes capabilities for retrieving contextual documentation from project repositories. Built by Upstash (Context7 MCP 公开了从项目存储库检索上下文文档的功能。由 Upstash 构建(github.com/upstash/context7), it indexes code, README files, and API documentation, then provides semantic search and context retrieval tools. No authentication required for public repositories.),它索引代码、README 文件和 API 文档,然后提供语义搜索和上下文检索工具。公共存储库不需要身份验证。

Best for:最适合: AI coding assistants that need to understand a codebase before generating suggestions.人工智能编码助手需要在生成建议之前了解代码库。

6. Brave Search MCP6.勇敢搜索MCP Verified已验证

Search workflow搜索工作流程 Discover current tools发现当前的工具 Validate sources验证来源 MIT麻省理工学院

Brave Search MCP exposes web and local search capabilities. Inspect the current schema and provider terms, treat returned web content as untrusted, preserve source URLs and dates, and measure performance in your own environment. Check the currentBrave Search MCP 公开了 Web 和本地搜索功能。检查当前架构和提供商条款,将返回的 Web 内容视为不受信任,保留源 URL 和日期,并衡量您自己的环境中的性能。检查当前 modelcontextprotocol/servers模型上下文协议/服务器 repository.存储库。

Best for:最适合: AI systems needing real-time web information while avoiding Google/Bing API costs.人工智能系统需要实时网络信息,同时避免 Google/Bing API 成本。

Config note:配置说明: Free Brave Search API key from免费 Brave Search API 密钥来自 api.search.brave.com. Set as。设置为 BRAVE_API_KEY env variable.环境变量。

7. Supabase MCP7.Supabase MCP

Database workflow数据库工作流程 Discover current tools发现当前的工具 Apache 2.0阿帕奇2.0 Community-maintained社区维护

Supabase MCP exposes capabilities for interacting with Supabase projects — running SQL queries, inspecting schemas, and managing auth. Community-maintained atSupabase MCP 公开了与 Supabase 项目交互的功能 - 运行 SQL 查询、检查模式和管理身份验证。社区维护于 github.com/supabase-community/supabase-mcp. Requires a Supabase project URL and service role key.。需要 Supabase 项目 URL 和服务角色密钥。

Best for:最适合: AI systems that need to generate SQL from natural language, query databases, or automate data workflows.需要从自然语言生成 SQL、查询数据库或自动化数据工作流程的 AI 系统。

8. Notion MCP8.MCP概念

Knowledge workflow知识工作流程 Discover current tools发现当前的工具 Proprietary所有权 API-based基于API

Notion MCP exposes capabilities for interacting with Notion workspaces — reading and writing pages, searching content, and managing comments. Requires a Notion integration token. Tool behavior should be verified from the current integration documentation atNotion MCP 公开了与 Notion 工作区交互的功能 - 读取和写入页面、搜索内容以及管理评论。需要一个 Notion 集成令牌。工具行为应通过当前集成文档进行验证,网址为 notion.so/my-integrationsnotion.so/my-integrations.

Best for:最适合: Teams using Notion as their primary knowledge management system. AI can read, update, and surface documentation.使用 Notion 作为主要知识管理系统的团队。人工智能可以读取、更新和显示文档。

MCP Server Examples: How They Work in PracticeMCP 服务器示例:它们在实践中如何工作

Understanding how an MCP server works under the hood helps you evaluate servers, debug connection issues, and build custom servers. Below is a minimal FastMCP server implementation and the JSON-RPC flow that powers tool discovery.了解 MCP 服务器的工作原理有助于您评估服务器、调试连接问题以及构建自定义服务器。下面是一个最小的 FastMCP 服务器实现和支持工具发现的 JSON-RPC 流程。

Building a Minimal MCP Server with the Python SDK使用 Python SDK 构建最小的 MCP 服务器

# Minimal MCP server with FastMCP
# Source: official MCP Python SDK documentation
# Pin and test the current SDK release before deployment

from mcp.server.fastmcp import FastMCP

mcp = FastMCP("my-server")

@mcp.tool()
def search_docs(query: str) -> str:
    """Search documentation for a query string."""
    return f"Results for: {query}"

@mcp.tool()
def get_doc_content(doc_id: str) -> str:
    """Retrieve the full content of a document by ID."""
    # Implementation would fetch from your doc store
    return f"Content of {doc_id}"

# Run: python my_server.py
# Or: fastmcp dev my_server.py (hot reload for development)
# Connect: Configure in claude_desktop_config.json as stdio

The FastMCP decorator-based approach keeps server code minimal. Each decorated function automatically becomes a tool with its name from the function name, description from the docstring, and input schema from type annotations.基于 FastMCP 装饰器的方法使服务器代码保持最少。每个修饰函数都会自动成为一个工具,其名称来自函数名称,描述来自文档字符串,输入模式来自类型注释。

JSON-RPC Request/Response FlowJSON-RPC 请求/响应流程

Tool discovery and invocation use JSON-RPC 2.0 over stdio or Streamable HTTP:工具发现和调用通过 stdio 或 Streamable HTTP 使用 JSON-RPC 2.0:

// Step 1: Client discovers available tools
// Client → Server (via stdio stdin or HTTP POST)
{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}

// Step 2: Server returns tool definitions
// Server → Client (via stdio stdout or HTTP response)
{"jsonrpc": "2.0", "id": 1, "result": {
  "tools": [
    {"name": "search_docs", "description": "Search documentation for queries", "inputSchema": {"type": "object", "properties": {"query": {"type": "string"}}}}
  ]
}}

// Step 3: Client invokes a tool
{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {
  "name": "search_docs", "arguments": {"query": "authentication best practices"}
}}

// Step 4: Server returns results
{"jsonrpc": "2.0", "id": 2, "result": {
  "content": [{"type": "text", "text": "Results for: authentication best practices"}]
}}

Every request includes a每个请求都包含一个 jsonrpc version, an版本,一个 id for correlation, a对于相关性,a method name, and姓名,以及 params. Responses include the same。回复包括相同内容 id and a和一个 result or或者 error. This simplicity makes MCP servers easy to implement and debug — no custom protocol parsing or state management required.。这种简单性使得 MCP 服务器易于实现和调试——无需自定义协议解析或状态管理。

Production MCP Server Workflow and Trust Boundaries生产 MCP 服务器工作流程和信任边界

Boundary rule:边界规则: Discovery, authorization, tool execution, and result validation are separate decisions. Finding a server or tool never grants permission to execute it.发现、授权、工具执行和结果验证是单独的决策。查找服务器或工具永远不会授予执行它的权限。

A production flow should discover candidates, inspect provenance and schemas, authorize the narrowest action, call with validated arguments, and validate the result against its source. Keep the host, MCP server, authorization server, and downstream service boundaries explicit in logs and incident response.生产流程应该发现候选者,检查出处和模式,授权最窄的操作,使用经过验证的参数进行调用,并根据其来源验证结果。在日志和事件响应中明确主机、MCP 服务器、授权服务器和下游服务边界。

MCP server production workflow showing discover, inspect, authorize, call, and validate stages across host, server, and downstream trust boundaries.

Decision framework:决策框架:

Discover发现

Search a trusted registry, vendor document, or approved catalog. Record the publisher, artifact, endpoint, version, transport, and requested credentials before installation.搜索受信任的注册表、供应商文档或批准的目录。安装前记录发布者、工件、端点、版本、传输和请求的凭据。

Inspect and Authorize检查和授权

Review capability declarations and exact schemas. Separate read from write actions, bind tokens to the intended resource, request minimal scopes, and require approval for sensitive calls.查看功能声明和确切的架构。将读取操作与写入操作分开,将令牌绑定到预期资源,请求最小范围,并要求敏感调用获得批准。

Call and Validate调用并验证

Validate arguments server-side, apply deadlines and rate limits, preserve request identity, treat returned content as untrusted, and verify important outputs against the source.验证服务器端参数,应用截止日期和速率限制,保留请求身份,将返回的内容视为不可信,并根据源验证重要输出。

Operate and Exit操作与退出

Monitor initialization, errors, latency, cost, approvals, and downstream side effects. Pin versions, rehearse credential revocation, keep rollback instructions, and test replacement.监控初始化、错误、延迟、成本、批准和下游副作用。固定版本、演练凭证撤销、保留回滚指令和测试替换。

QVeris can serve as an optional capability discovery and routing layer in this workflow (QVeris 可以充当此工作流程中的可选功能发现和路由层(QVeris CLI documentationQVeris CLI 文档). MCP still defines the protocol, the host controls context and approvals, each MCP server enforces authorization, and downstream providers remain responsible for their own data and operations.)。 MCP 仍然定义协议,主机控制上下文和批准,每个 MCP 服务器强制授权,下游提供商仍然对自己的数据和操作负责。

Deployment Options for MCP ServersMCP 服务器的部署选项

MCP servers can be deployed in three patterns, each with different trade-offs for security, scalability, and operational overhead.MCP 服务器可以以三种模式部署,每种模式在安全性、可扩展性和运营开销方面都有不同的权衡。

Version note.版本说明。 Pin the protocol and SDK versions that your host and server have tested together. Negotiate capabilities during initialization; do not infer support for tools, resources, prompts, notifications, sampling, elicitation, tasks, or extensions from a product name. Treat release candidates and draft features as experimental until the host, SDK, and server versions you deploy support them.固定您的主机和服务器一起测试的协议和 SDK 版本。初始化期间协商能力;请勿从产品名称推断对工具、资源、提示、通知、采样、启发、任务或扩展的支持。将候选版本和草案功能视为实验性的,直到您部署的主机、SDK 和服务器版本支持它们。
MCP 2026-07-28 部署提示。MCP 2026-07-28 安装提示。 面向新版无状态核心构建的远程服务器,不再需要协议级 Session 存储或粘性负载均衡。服务器应接收可独立路由的 Streamable HTTP 请求,声明支持的协议版本,使用完整 JSON Schema 2020-12 验证工具定义,并显式协商 Tasks、MCP Apps 等扩展。 业务工作流仍可保留状态,但状态应属于应用,而不是 MCP 传输会话。面向新版本无状态核心构建的远程服务器,不再需要协议级会话存储或粘性负载均衡。服务器应接收可独立路由的Streamable HTTP请求,支持的协议版本,使用JSON Schema 2020-12验证工具定义,并显式协商任务、MCP应用程序等扩展。业务工作流仍然可保留状态,但状态应属于应用,而不声明完整是MCP传输会话。
MCP server deployment options comparedMCP 服务器部署选项比较
Deployment部署 Transport运输 Security安全 Scalability可扩展性 Best For最适合
Local Process本地进程 stdio标准输入输出 Process isolation进程隔离 Single user单用户 Development, CLI tools开发、CLI 工具
Remote Service远程服务 Streamable HTTP流式 HTTP Authentication required需要身份验证 Team scale团队规模 Production, team access生产、团队访问
Managed Platform托管平台 HTTP / SDKHTTP / SDK Built-in auth + monitoring内置身份验证+监控 Enterprise企业 Enterprise, scaled deployments企业规模化部署

Local Process (stdio)本地进程(stdio)

Simplest deployment: run the MCP server as a local process and connect via stdio. Works well for development, CLI tools, and single-user workflows. Claude Code and other CLI-based clients typically use stdio transport. Configuration is minimal — point your MCP client at the process command. The downside: the server is tied to the local machine, preventing team sharing and remote access.最简单的部署:将 MCP 服务器作为本地进程运行并通过 stdio 连接。非常适合开发、CLI 工具和单用户工作流程。 Claude Code 和其他基于 CLI 的客户端通常使用 stdio 传输。配置最少 - 将 MCP 客户端指向进程命令。缺点:服务器与本地计算机绑定,阻止团队共享和远程访问。

Remote Service (Streamable HTTP)远程服务(流式 HTTP)

For production deployments where multiple clients need to connect, deploy the MCP server as a remote HTTP service. Requires authentication (API keys, OAuth, or mTLS) and connection health monitoring. Per对于需要连接多个客户端的生产部署,请将 MCP 服务器部署为远程 HTTP 服务。需要身份验证(API 密钥、OAuth 或 mTLS)和连接运行状况监控。每 Toolradar's April 2026 endpoint scan of 2,181 serversToolradar 于 2026 年 4 月对 2,181 台服务器进行的端点扫描, 52% of remote MCP servers become unresponsive within 30 days due to missing health checks and auto-restart configuration. Production deployments must implement: health check endpoints, automatic restart on failure, and connection timeout handling.,52% 的远程 MCP 服务器由于缺少运行状况检查和自动重启配置而在 30 天内变得无响应。生产部署必须实现:健康检查端点、失败时自动重启以及连接超时处理。

Managed Platform托管平台

Managed MCP platforms like托管 MCP 平台,例如 Apigene芹菜基因, Prefect长官, and AWS Bedrock handle authentication, monitoring, scaling, and security.和 AWS Bedrock 处理身份验证、监控、扩展和安全性。 CData's MCP infrastructure market analysis (Q1 2026)CData 的 MCP 基础设施市场分析(2026 年第一季度) projects the managed hosting segment at $10.4B with 24.7% CAGR.预计管理托管细分市场为 $10.4B,复合年增长率为 24.7%。

// Example: Claude Desktop config connecting a meta-server
// macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
// Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "qveris": {
      "command": "npx",
      "args": ["-y", "@qverisai/mcp"],
      "env": {
        "QVERIS_API_KEY": "your-api-key"
      }
    }
  }
}

// Alternative: connecting a single-purpose server directly
// See each server's repository for its specific config format

After configuring, restart your MCP client. The server's tools become available through the standard MCP tool discovery flow.配置完成后,重新启动 MCP 客户端。服务器的工具通过标准 MCP 工具发现流程变得可用。

FAQ: MCP Servers常见问题解答:MCP 服务器

What is an MCP server?什么是 MCP 服务器?
An MCP server is a program that exposes capabilities to an MCP client. It can publish tools, resources, and prompts through JSON-RPC over stdio or Streamable HTTP; supported features are negotiated during initialization.MCP 服务器是向 MCP 客户端公开功能的程序。它可以通过 JSON-RPC over stdio 或 Streamable HTTP 发布工具、资源和提示;支持的功能在初始化期间协商。
What is the difference between an MCP server and an MCP client?MCP 服务器和 MCP 客户端有什么区别?
An MCP server is the capability provider — the service that exposes tools and data. An MCP client is the component inside the AI application (the host) that connects to servers and manages a dedicated connection and supplies capabilities to the host. A remote server may serve many clients and must enforce identity and authorization for every protected request.MCP 服务器是能力提供者——公开工具和数据的服务。 MCP 客户端是 AI 应用程序(主机)内的组件,用于连接到服务器并管理专用连接并向主机提供功能。远程服务器可以为许多客户端提供服务,并且必须对每个受保护的请求强制执行身份和授权。
How should I evaluate an MCP server before connecting it?在连接 MCP 服务器之前我应该​​如何评估它?
Verify provenance, protocol version, transport, capability schemas, authorization, side effects, data handling, observability, failure behavior, provider terms, and rollback before connecting production credentials.在连接生产凭证之前验证来源、协议版本、传输、功能模式、授权、副作用、数据处理、可观察性、故障行为、提供程序条款和回滚。
How does an MCP server expose tools?MCP 服务器如何公开工具?
An MCP server implements the MCP specification and exposes capabilities through a tools/list endpoint. When a client connects, it sends a tools/list JSON-RPC request, and the server responds with all available tools — each with a name, description, and inputSchema. The client injects this schema into the LLM's context so it knows which tools it can call.MCP 服务器实现 MCP 规范并通过工具/列表端点公开功能。当客户端连接时,它会发送一个工具/列表 JSON-RPC 请求,服务器会使用所有可用工具进行响应 - 每个工具都有名称、描述和 inputSchema。客户端将此架构注入 LLM 的上下文中,以便它知道可以调用哪些工具。
Is an MCP server secure by default?MCP 服务器默认安全吗?
No. MCP standardizes communication and authorization mechanisms, but operators must still verify servers, protect credentials, enforce access control, validate inputs and outputs, rate-limit calls, request approval for sensitive actions, and retain audit evidence.不会。MCP 标准化了通信和授权机制,但运营商仍必须验证服务器、保护凭据、实施访问控制、验证输入和输出、限制调用速率、请求批准敏感操作并保留审计证据。
How do I deploy an MCP server in production?如何在生产中部署 MCP 服务器?
MCP servers can be deployed as local processes (stdio transport), remote services (Streamable HTTP with authentication), or managed platforms. Key considerations: implement health checks and restart policies, require appropriate authentication, validate token audience and scopes, monitor connection health, and rehearse rollback. See the Deployment Options section above.MCP 服务器可以部署为本地进程(stdio 传输)、远程服务(带身份验证的流式 HTTP)或托管平台。关键注意事项:实施运行状况检查和重新启动策略、需要适当的身份验证、验证令牌受众和范围、监控连接运行状况以及排练回滚。请参阅上面的部署选项部分。

Explore MCP Servers for Your AI Agent探索适合您的 AI 代理的 MCP 服务器

Whether you choose single-purpose servers, a managed platform, or a meta-server, the MCP protocol makes integration consistent. Start with one server that matches your primary use case, evaluate its tool coverage, and scale from there.无论您选择单一用途服务器、托管平台还是元服务器,MCP 协议都能使集成保持一致。从一台与您的主要用例匹配的服务器开始,评估其工具覆盖范围,然后从那里进行扩展。

Learn More →了解更多 →

Related Guides相关指南

MCP Server 指南:架构、示例与安全 | QVeris Guides