内容
# Everything MCP 服务器
**[架构](docs/architecture.md)
| [项目结构](docs/structure.md)
| [启动流程](docs/startup.md)
| [服务器功能](docs/features.md)
| [扩展点](docs/extension.md)
| [工作原理](docs/how-it-works.md)**
本 MCP 服务器试图实现 MCP 协议的所有功能。它不是一个实用的服务器,而是为 MCP 客户端的构建者提供一个测试服务器。它实现了提示、工具、资源、采样等功能,以展示 MCP 功能。
## 工具、资源、提示和其他功能
已注册的 MCP 原语和演示的其他协议功能可以在 [服务器功能](docs/features.md) 文档中找到。
## 与 Claude Desktop 配合使用(使用 [stdio 传输](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#stdio))
将以下内容添加到您的 `claude_desktop_config.json` 中:
```json
{
"mcpServers": {
"everything": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-everything"
]
}
}
}
```
在 Windows 上,使用 `cmd /c` 启动 `npx`:
```json
{
"mcpServers": {
"everything": {
"command": "cmd",
"args": [
"/c",
"npx",
"-y",
"@modelcontextprotocol/server-everything"
]
}
}
}
```
## 与 VS Code 配合使用
有关快速安装,请使用以下一键安装按钮之一...
[](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) [](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)
[](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) [](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)
有关手动安装,您可以使用以下方法之一配置 MCP 服务器:
**方法 1:用户配置(推荐)**
将配置添加到您的用户级 MCP 配置文件中。打开命令面板(`Ctrl + Shift + P`)并运行 `MCP: 打开用户配置`。这将打开您的用户 `mcp.json` 文件,您可以在其中添加服务器配置。
**方法 2:工作区配置**
或者,您可以将配置添加到工作区中的 `.vscode/mcp.json` 文件中。这将允许您与他人共享配置。
> 有关 VS Code 中 MCP 配置的更多详细信息,请参阅 [官方 VS Code MCP 文档](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)。
#### NPX
```json
{
"servers": {
"everything": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-everything"]
}
}
}
```
在 Windows 上,使用:
```json
{
"servers": {
"everything": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-everything"]
}
}
}
```
## 从源代码运行,使用 [HTTP+SSE 传输](https://modelcontextprotocol.io/specification/2024-11-05/basic/transports#http-with-sse) (截至 [2025-03-26](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports) 已弃用)
```shell
cd src/everything
npm install
npm run start:sse
```
## 从源代码运行,使用 [Streamable HTTP 传输](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http)
```shell
cd src/everything
npm install
npm run start:streamableHttp
```
## 作为已安装的包运行
### 安装
```shell
npm install -g @modelcontextprotocol/server-everything@latest
````
### 运行默认(stdio)服务器
```shell
npx @modelcontextprotocol/server-everything
```
### 或明确指定 stdio
```shell
npx @modelcontextprotocol/server-everything stdio
```
### 运行 SSE 服务器
```shell
npx @modelcontextprotocol/server-everything sse
```
### 运行 Streamable HTTP 服务器
```shell
npx @modelcontextprotocol/server-everything streamableHttp
```
## 许可证
本 MCP 服务器根据 MIT 许可证许可。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。有关更多详细信息,请参见项目存储库中的 LICENSE 文件。