MCP 协议测试服务器

Everything MCP Server 是一个用于完整展示和测试 MCP 协议功能的参考服务器,通过 prompts、tools、resources、sampling 等能力帮助 MCP 客户端开发者验证和调试客户端实现。

  • by modelcontextprotocol
  • TypeScript
  • 混合部署
  • 9.2万 星标
  • 更新于
在 GitHub 查看 modelcontextprotocol/servers

使用说明

Everything MCP Server

Architecture | Project Structure | Startup Process | Server Features | Extension Points | How It Works

This MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.

Tools, Resources, Prompts, and Other Features

A complete list of the registered MCP primitives and other protocol features demonstrated can be found in the Server Features document.

The get-env tool returns the server's environment variables, but masks the value of any credential-like name (a KEY, TOKEN, SECRET, PASSWORD, PASSWD, CREDENTIAL, AUTH or COOKIE segment, such as OPENAI_API_KEY) as "<redacted>". To see every value unmasked while debugging, start the server with GET_ENV_INCLUDE_SECRETS=1 (or true). Leave it unset otherwise: with it set, every credential in the server's environment reaches the model's context.

Protocol versions

The server serves both protocol eras, over stdio and Streamable HTTP, from one process:

  • 2026-07-28 clients connect with server/discover, send their protocol version, identity and capabilities with each request, and have no session. The server demonstrates the revision's new features for them: multi-round-trip requests (input_required) with requestState, subscriptions/listen change notifications, per-request log levels, cache hints (ttlMs / cacheScope), the tasks extension (io.modelcontextprotocol/tasks) under the extensions capability, and x-mcp-header with JSON Schema 2020-12 tool schemas.
  • 2025-era clients connect with the initialize handshake, as before. Elicitation, sampling and roots are served to them from the same multi-round-trip handlers through the SDK's legacy shim.

Roots, sampling and logging are deprecated as of 2026-07-28 and stay available, labelled deprecated. Server Features marks which era each feature belongs to.

Configuring gzip-file-as-resource

The gzip-file-as-resource tool fetches the URL it is given, so these environment variables limit what it will fetch:

Variable Default Effect
GZIP_MAX_FETCH_SIZE 10 MiB The largest response, in bytes, it reads
GZIP_MAX_FETCH_TIME_MILLIS 30000 How long a fetch may take, redirects included
GZIP_ALLOWED_DOMAINS empty (any name) Comma-separated host names; a host must be one of them or a subdomain of one. Checked on the caller's URL and on every redirect hop
GZIP_ALLOW_PRIVATE_IPS off Set to 1 or true to allow loopback, private (RFC 1918), CGNAT, link-local (cloud metadata) and other non-public addresses

By default the tool refuses a URL whose host resolves to a non-public address, and follows at most five redirects, checking each hop the same way. GZIP_ALLOWED_DOMAINS filters names, not addresses: a listed name that resolves to a private address is still refused unless GZIP_ALLOW_PRIVATE_IPS is set. The address is checked before the request and resolved again when it is made, so a DNS answer that changes in between (DNS rebinding) is not caught. data: URLs are not fetched, so neither check applies to them.

Requirements

Node.js 24 or later, when the server runs through npx or from source.

Usage with Claude Desktop (uses stdio Transport)

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "everything": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-everything"]
    }
  }
}

On Windows, use cmd /c to launch npx:

{
  "mcpServers": {
    "everything": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-everything"]
    }
  }
}

Usage with VS Code

For quick installation, use one of the one-click install buttons below...

For manual installation, you can configure the MCP server using one of these methods:

Method 1: User Configuration (Recommended) Add the configuration to your user-level MCP configuration file. Open the Command Palette (Ctrl + Shift + P) and run MCP: Open User Configuration. This will open your user mcp.json file where you can add the server configuration.

Method 2: Workspace Configuration Alternatively, you can add the configuration to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.

For more details about MCP configuration in VS Code, see the official VS Code MCP documentation.

NPX

{
  "servers": {
    "everything": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-everything"]
    }
  }
}

On Windows, use:

{
  "servers": {
    "everything": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-everything"]
    }
  }
}

Run from source with Streamable HTTP Transport

cd src/everything
npm install
npm run start:streamableHttp

The endpoint is http://localhost:3001/mcp (PORT overrides the port). It serves 2026-07-28 clients statelessly and 2025-era clients with sessions, from the same URL.

Both HTTP transports (Streamable HTTP and HTTP+SSE) accept browser requests only from a localhost origin: an Origin header whose host is localhost, 127.0.0.1 or [::1], on any port, such as the MCP Inspector's. A request carrying any other Origin is refused with 403 Forbidden. Clients that send no Origin header, which is every non-browser client, are unaffected.

Running from source with HTTP+SSE Transport (deprecated as of 2025-03-26)

cd src/everything
npm install
npm run start:sse

The HTTP+SSE transport serves 2025-era clients only, and the server prints a deprecation warning when it starts. Prefer Streamable HTTP.

Running as an installed package

Install

npm install -g @modelcontextprotocol/server-everything@latest

Run the default (stdio) server

npx @modelcontextprotocol/server-everything

Or specify stdio explicitly

npx @modelcontextprotocol/server-everything stdio

Run the streamable HTTP server

npx @modelcontextprotocol/server-everything streamableHttp

Run the SSE server (deprecated, 2025-era clients only)

npx @modelcontextprotocol/server-everything sse

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.