# Everything MCP Server **[Architecture](docs/architecture.md) | [Project Structure](docs/structure.md) | [Startup Process](docs/startup.md) | [Server Features](docs/features.md) | [Extension Points](docs/extension.md) | [How It Works](docs/how-it-works.md)** 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](docs/features.md) document. The resource collections (`demo://resource/collection/summer-specials`, and the `by-category/{category}` and `item/{itemId}` templates beside it) show a single `resources/read` returning several contents, each under its own URI: reading a collection returns one content per item, and each item's URI can be read on its own. The server info and every tool, prompt, resource and resource template carry a pair of [icons](docs/features.md#icons), one for a light theme and one for a dark theme, so a client can show the variant that suits its own background. The `get-env` tool returns the server's environment variables, but masks the value of any credential-like name (one with a `KEY`, `TOKEN`, `SECRET`, `PASSWORD`, `PASSWD`, `CREDENTIAL`, `AUTH` or `COOKIE` segment between underscores, in any case: whole segments, not substrings, so `OPENAI_API_KEY` is masked and `APIKEY` is not) as `""`. 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 (`io.modelcontextprotocol/tasks`) and events (`io.modelcontextprotocol/events`, poll and push delivery) extensions 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](docs/features.md) 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 | `GZIP_MAX_FETCH_SIZE` takes a whole number of bytes, and `GZIP_MAX_FETCH_TIME_MILLIS` a whole number of milliseconds up to 2147483647, with no unit suffix. A value that is neither (an empty string, `10MB`, a negative or a fraction) is not used: the server writes a one-line warning to stderr and applies the default instead. 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. An IPv6 address that wraps an IPv4 one (IPv4-mapped, IPv4-translated, or in the NAT64 prefix `64:ff9b::/96`) is judged by that IPv4, and any other IPv6 address outside global unicast (`2000::/3`) is refused. `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](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio)) Add to your `claude_desktop_config.json`: ```json { "mcpServers": { "everything": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-everything"] } } } ``` On Windows, use `cmd /c` to launch `npx`: ```json { "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... [![Install with NPX in VS Code](https://img.shields.io/badge/VS_Code-NPM-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=everything&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40modelcontextprotocol%2Fserver-everything%22%5D%7D) [![Install with NPX in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-NPM-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=everything&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40modelcontextprotocol%2Fserver-everything%22%5D%7D&quality=insiders) [![Install with Docker in VS Code](https://img.shields.io/badge/VS_Code-Docker-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=everything&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22mcp%2Feverything%22%5D%7D) [![Install with Docker in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Docker-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=everything&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22mcp%2Feverything%22%5D%7D&quality=insiders) 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](https://code.visualstudio.com/docs/copilot/customization/mcp-servers). #### NPX ```json { "servers": { "everything": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-everything"] } } } ``` On Windows, use: ```json { "servers": { "everything": { "command": "cmd", "args": ["/c", "npx", "-y", "@modelcontextprotocol/server-everything"] } } } ``` ## Run from source with [Streamable HTTP Transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) ```shell 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) listen on the loopback interface, `127.0.0.1`, by default, so only clients on the same machine can reach them. Set `HOST` to bind another address: `HOST=0.0.0.0` listens on every interface, which exposes the server's tools to every host that can reach the machine, so set it only on a network you trust. The listening line the server prints names the address and port it bound, such as `127.0.0.1:3001`. | Variable | Default | Effect | | --- | --- | --- | | `PORT` | `3001` | The port the HTTP transport listens on | | `HOST` | `127.0.0.1` | The address it binds; `0.0.0.0` (or `::`) for every interface | | `SESSION_IDLE_TIMEOUT_MILLIS` | `1800000` (30 minutes) | Streamable HTTP only: how long a 2025-era session may sit idle before the server ends it; `0` never ends one | A 2025-era Streamable HTTP session normally ends when its client sends a `DELETE`. One whose client goes away without doing so is ended by the server once it has been idle for `SESSION_IDLE_TIMEOUT_MILLIS`: its server instance is closed and its timers and subscriptions are released. Idle means no request in flight and no stream open, so a client that keeps its `GET` stream open, or is waiting on a long tool call, is never timed out; the clock starts when the session's last response closes, and idle sessions are looked for every tenth of the timeout (no less than a second and no more than a minute apart), so one is ended that much late at most. A request for a session the server has ended is answered `404 Not Found` (`Session not found`), which is the [specification's signal](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#session-management) for the client to start a new session with a fresh `initialize`. Set a short timeout to exercise that path in a client under test, or `0` to keep every session until its client ends it. A value that is not a non-negative number is ignored in favor of the default. 2026-07-28 clients have no sessions, and an HTTP+SSE session ends when its stream's connection closes, so neither is affected. 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](https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse) (deprecated as of [2025-03-26](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports)) ```shell 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 ```shell npm install -g @modelcontextprotocol/server-everything@latest ``` ### Run the default (stdio) server ```shell npx @modelcontextprotocol/server-everything ``` ### Or specify stdio explicitly ```shell npx @modelcontextprotocol/server-everything stdio ``` ### Run the streamable HTTP server ```shell npx @modelcontextprotocol/server-everything streamableHttp ``` ### Run the SSE server (deprecated, 2025-era clients only) ```shell npx @modelcontextprotocol/server-everything sse ``` ## Running with Docker This repository publishes no image; build one from the repository root (the build context): ```shell docker build -f src/everything/Dockerfile -t mcp/everything . ``` The `mcp/everything` image on Docker Hub is built by Docker, not by this repository, and can lag behind it. ### Run over stdio (the default) ```shell docker run -i --rm mcp/everything ``` `-i` keeps stdin open, which the stdio transport reads. This is the command an MCP client configuration launches. ### Run the Streamable HTTP server ```shell docker run --rm -p 127.0.0.1:3001:3001 mcp/everything streamableHttp ``` The endpoint is `http://localhost:3001/mcp`. The image sets `HOST=0.0.0.0`, so the server listens on port 3001 on every interface inside the container, which is what lets a published port reach it; `127.0.0.1:` publishes it on the host's loopback only. To use another port, set `PORT` and publish that one (`-e PORT=8080 -p 127.0.0.1:8080:8080`). The localhost-only `Origin` check described above applies inside the container too. `docker stop` ends the server cleanly. ## License This server is distributed under the terms of the [`LICENSE`](LICENSE) file, a copy of the repository's root `LICENSE` that ships in the npm package. The Model Context Protocol project is moving from the MIT License to the Apache License, Version 2.0 (Apache-2.0), so those terms depend on the contribution: - New code and specification contributions are licensed under Apache-2.0, as are contributions whose authors have consented to relicensing. - Contributions from authors who originally licensed their work under the MIT License and have not granted permission to relicense remain licensed under the MIT License. - Documentation contributions (excluding specifications) are licensed under CC-BY-4.0. The [`LICENSE`](LICENSE) file holds the full text of the Apache-2.0 and MIT licenses and the terms above; it, not this summary, is authoritative.