Introduction | 简介
English:
MCP Server Everything is the official Model Context Protocol (MCP) reference testing server developed by Anthropic. With over 70,000 GitHub stars, this is THE definitive reference implementation for the MCP protocol. Unlike production-oriented MCP servers, this server is specifically engineered as a comprehensive protocol demonstration platform for MCP client developers to test, validate, and learn the complete MCP specification.
This server implements EVERY major feature of the MCP protocol:
- 11 distinct tools covering simple operations (echo, add), long-running operations with progress notifications, LLM sampling, image processing, structured content, resource references, client interaction elicitation, and system introspection
- 100 test resources with intelligent format distribution (plaintext for even IDs, binary blobs for odd IDs), complete pagination support, and real-time update notifications
- 3 prompt templates demonstrating simple, complex, and resource-embedded conversation patterns
- Multiple transport protocols including stdio, HTTP+SSE, and streamable HTTP
- Continuous logging with random log messages every 15 seconds to test client log handling capabilities
For MCP ecosystem developers, this is the essential reference tool for validating client implementations, understanding protocol nuances, and learning best practices directly from the protocol creators at Anthropic.
中文:
MCP Server Everything 是 Anthropic 官方开发的 Model Context Protocol (MCP) 全功能参考测试服务器。这个拥有超过 70,000 GitHub 星标的项目是 MCP 协议的权威参考实现。与面向生产的 MCP 服务器不同,该服务器专门设计为一个全面的协议演示平台,供 MCP 客户端开发者测试、验证和学习完整的 MCP 规范。
该服务器实现了 MCP 协议的所有主要特性:
- 11 个不同的工具 涵盖简单操作(echo、add)、带进度通知的长时间运行操作、LLM 采样、图像处理、结构化内容、资源引用、客户端交互引导和系统内省
- 100 个测试资源 具有智能格式分配(偶数 ID 为纯文本,奇数 ID 为二进制 blob)、完整的分页支持和实时更新通知
- 3 个提示模板 演示简单、复杂和嵌入资源的对话模式
- 多种传输协议 包括 stdio、HTTP+SSE 和可流式传输的 HTTP
- 持续日志记录 每 15 秒发送随机日志消息以测试客户端日志处理能力
对于 MCP 生态系统的开发者来说,这是验证客户端实现、理解协议细节和直接从 Anthropic 协议创建者那里学习最佳实践的必备参考工具。
Table of Contents | 目录
- Core Features
- Complete Tool Reference
- Resource System
- Prompt Templates
- Transport Protocols
- Installation & Configuration
- Testing Workflows
- Integration with MCP Inspector
- Use Cases for Client Developers
- Best Practices
- FAQ
Core Features | 核心功能
Feature Overview | 功能概览
English:
MCP Server Everything provides a complete test suite for the MCP protocol:
✅ 11 Testing Tools
- Simple tools (echo, add) for basic functionality testing
- Long-running operations with progress notifications
- LLM sampling demonstration
- Binary data handling (tiny PNG image)
- Structured content and annotations
- Resource reference management
- Interactive elicitation flows
- System introspection (environment variables, roots)
✅ 100 Test Resources
- Intelligent format distribution: even IDs (plaintext), odd IDs (binary)
- URI scheme:
test://resource/{id}where id ranges from 0-99 - Pagination with cursor-based navigation
- Resource update subscriptions
- Automatic updates every 5 seconds for testing notification systems
✅ 3 Prompt Templates
simple_prompt: Basic single-message patterncomplex_prompt: Multi-turn with parameter supportresource_prompt: Embedded resource references
✅ Advanced MCP Features
- Roots protocol support for hierarchical organization
- Content annotations with metadata
- Structured content types
- Progress notifications for long operations
- LLM sampling capabilities
- Random logging (every 15 seconds) for log handling tests
✅ Multiple Transport Protocols
- stdio: Primary recommended transport
- HTTP+SSE: Deprecated but supported for legacy clients
- Streamable HTTP: Modern streaming protocol support
✅ Official Maintenance
- Maintained by Anthropic (MCP protocol creators)
- High code quality with TypeScript
- Regular updates aligned with protocol evolution
- Comprehensive test coverage
中文:
MCP Server Everything 为 MCP 协议提供了完整的测试套件:
✅ 11 个测试工具
- 简单工具(echo、add)用于基本功能测试
- 带进度通知的长时间运行操作
- LLM 采样演示
- 二进制数据处理(微型 PNG 图像)
- 结构化内容和注释
- 资源引用管理
- 交互式引导流程
- 系统内省(环境变量、根目录)
✅ 100 个测试资源
- 智能格式分配:偶数 ID(纯文本),奇数 ID(二进制)
- URI 方案:
test://resource/{id},其中 id 范围为 0-99 - 基于游标的分页导航
- 资源更新订阅
- 每 5 秒自动更新以测试通知系统
✅ 3 个提示模板
simple_prompt:基本单消息模式complex_prompt:支持参数的多轮对话resource_prompt:嵌入资源引用
✅ 高级 MCP 特性
- 用于分层组织的 Roots 协议支持
- 带元数据的内容注释
- 结构化内容类型
- 长时间操作的进度通知
- LLM 采样能力
- 随机日志记录(每 15 秒)用于日志处理测试
✅ 多种传输协议
- stdio:主要推荐传输方式
- HTTP+SSE:已弃用但支持旧版客户端
- Streamable HTTP:现代流式协议支持
✅ 官方维护
- 由 Anthropic(MCP 协议创建者)维护
- TypeScript 高代码质量
- 与协议演进同步的定期更新
- 全面的测试覆盖
Complete Tool Reference | 完整工具参考
Tool Categories | 工具分类
English:
The 11 tools are organized into four functional categories:
- Simple Tools (2 tools): Basic functionality testing
- Advanced Operations (2 tools): Complex workflows and LLM integration
- Content & Data Tools (4 tools): Structured content, images, annotations
- System & Interactive Tools (3 tools): System introspection, client interaction
中文:
11 个工具分为四个功能类别:
- 简单工具(2 个工具):基本功能测试
- 高级操作(2 个工具):复杂工作流和 LLM 集成
- 内容与数据工具(4 个工具):结构化内容、图像、注释
- 系统与交互工具(3 个工具):系统内省、客户端交互
1. echo - Message Echo Tool | 消息回显工具
English:
The most basic tool for testing fundamental tool invocation and response handling.
Purpose:
- Verify client can successfully call tools
- Test JSON serialization/deserialization
- Validate basic request-response flow
- Confirm text handling in tool responses
Parameters:
message(string, required): The message to echo back
Return Value:
Text content containing the exact message provided
Example Usage:
1 | // Client request |
Testing Scenarios:
- Basic Echo: Send simple ASCII text
- Unicode Support: Test with emoji and international characters (你好世界 🌍)
- Special Characters: Test escaping with quotes, newlines, JSON special chars
- Empty String: Verify handling of empty message
- Large Message: Test with multi-kilobyte strings
Common Issues:
- Character encoding problems (especially UTF-8 handling)
- JSON escaping failures with quotes or backslashes
- Truncation of long messages
中文:
最基本的工具,用于测试基本的工具调用和响应处理。
用途:
- 验证客户端可以成功调用工具
- 测试 JSON 序列化/反序列化
- 验证基本的请求-响应流程
- 确认工具响应中的文本处理
参数:
message(字符串,必需):要回显的消息
返回值:
包含所提供的确切消息的文本内容
使用示例:
1 | // 客户端请求 |
测试场景:
- 基本回显:发送简单的 ASCII 文本
- Unicode 支持:使用表情符号和国际字符测试(Hello World 🌍)
- 特殊字符:使用引号、换行符、JSON 特殊字符测试转义
- 空字符串:验证空消息的处理
- 大消息:使用多千字节字符串测试
常见问题:
- 字符编码问题(尤其是 UTF-8 处理)
- 引号或反斜杠的 JSON 转义失败
- 长消息截断
2. add - Number Addition Tool | 数字加法工具
English:
Tests numeric parameter handling and mathematical operations.
Purpose:
- Verify client can pass numeric types correctly
- Test parameter validation
- Validate type conversion and numeric precision
- Test multiple parameter handling
Parameters:
a(number, required): First number to addb(number, required): Second number to add
Return Value:
Text content containing the sum as a string (e.g., “42”)
Example Usage:
1 | // Integer addition |
Testing Scenarios:
- Integer Addition: Positive integers
- Floating Point: Decimals (test precision)
- Negative Numbers: Negative values
- Zero: Adding zero
- Large Numbers: Testing numeric limits
- Type Coercion: What happens with string numbers like “42”?
Edge Cases:
- Very large numbers (beyond JavaScript safe integer range)
- Floating point precision errors
- NaN and Infinity handling
- Type mismatch (strings instead of numbers)
中文:
测试数字参数处理和数学运算。
用途:
- 验证客户端可以正确传递数字类型
- 测试参数验证
- 验证类型转换和数字精度
- 测试多参数处理
参数:
a(数字,必需):要相加的第一个数字b(数字,必需):要相加的第二个数字
返回值:
包含总和的字符串文本内容(例如 “42”)
使用示例:
1 | // 整数加法 |
测试场景:
- 整数加法:正整数
- 浮点数:小数(测试精度)
- 负数:负值
- 零:加零
- 大数:测试数字限制
- 类型强制转换:字符串数字如 “42” 会发生什么?
边缘情况:
- 非常大的数字(超出 JavaScript 安全整数范围)
- 浮点精度错误
- NaN 和 Infinity 处理
- 类型不匹配(字符串而不是数字)
3. longRunningOperation - Progress Notification Demo | 进度通知演示
English:
Demonstrates MCP’s progress notification system for long-running operations.
Purpose:
- Test client’s progress notification handling
- Verify progress UI updates
- Validate async operation handling
- Test notification ordering and timing
Parameters:
None (no arguments required)
Behavior:
- Immediately returns acknowledgment
- Sends progress notifications at intervals:
- 25% complete at ~2.5 seconds
- 50% complete at ~5 seconds
- 75% complete at ~7.5 seconds
- 100% complete at ~10 seconds
- Each notification includes progress percentage and status message
Progress Notification Format:
1 | { |
Example Client Flow:
1 | // 1. Call the tool |
Testing Scenarios:
- Progress UI: Does client show progress bar/indicator?
- Cancellation: Can client cancel mid-operation?
- Concurrent Operations: Multiple simultaneous long operations
- Progress Ordering: Are notifications received in correct sequence?
- Connection Loss: What happens if connection drops during operation?
Client Implementation Checklist:
- Register progress notification handler
- Display progress to user (progress bar, percentage, etc.)
- Handle operation completion
- Implement cancellation (optional)
- Handle errors during progress updates
- Cleanup resources on completion/cancellation
中文:
演示 MCP 长时间运行操作的进度通知系统。
用途:
- 测试客户端的进度通知处理
- 验证进度 UI 更新
- 验证异步操作处理
- 测试通知顺序和时序
参数:
无(不需要参数)
行为:
- 立即返回确认
- 按间隔发送进度通知:
- 约 2.5 秒时完成 25%
- 约 5 秒时完成 50%
- 约 7.5 秒时完成 75%
- 约 10 秒时完成 100%
- 每个通知包括进度百分比和状态消息
进度通知格式:
1 | { |
客户端流程示例:
1 | // 1. 调用工具 |
测试场景:
- 进度 UI:客户端是否显示进度条/指示器?
- 取消:客户端可以中途取消吗?
- 并发操作:多个同时的长时间操作
- 进度顺序:通知是否按正确顺序接收?
- 连接丢失:操作期间连接断开会发生什么?
客户端实现清单:
- 注册进度通知处理程序
- 向用户显示进度(进度条、百分比等)
- 处理操作完成
- 实现取消(可选)
- 处理进度更新期间的错误
- 完成/取消时清理资源
4. sampleLLM - LLM Sampling Demonstration | LLM 采样演示
English:
Demonstrates MCP’s LLM sampling capability, allowing servers to request LLM completions.
Purpose:
- Test client’s LLM sampling implementation
- Verify prompt transmission and response handling
- Validate streaming vs. non-streaming responses
- Test temperature and parameter control
Parameters:
prompt(string, required): The prompt to send to the LLM
Behavior:
Server requests the client to sample from an LLM using the provided prompt. The client’s LLM generates a response, which the server then returns as the tool result.
Example Usage:
1 | // Client calls tool |
Sampling Parameters (Advanced):
1 | { |
Testing Scenarios:
- Basic Sampling: Simple prompt, get completion
- Long Prompts: Test with multi-paragraph prompts
- Streaming: Request streaming responses
- Model Selection: Test model preference hints
- Parameter Tuning: Various temperature/maxTokens values
- Error Handling: What if LLM is unavailable?
Client Requirements:
- Must have access to an LLM (local or API)
- Must implement
sampling/createMessagehandler - Should support streaming responses (optional)
- Should respect maxTokens and stopSequences
Use Cases:
- Servers that need AI assistance (e.g., code analysis server asking LLM for suggestions)
- Recursive AI operations (AI agent using tools that use AI)
- Hybrid human-AI workflows
中文:
演示 MCP 的 LLM 采样能力,允许服务器请求 LLM 完成。
用途:
- 测试客户端的 LLM 采样实现
- 验证提示传输和响应处理
- 验证流式与非流式响应
- 测试温度和参数控制
参数:
prompt(字符串,必需):要发送给 LLM 的提示
行为:
服务器使用提供的提示请求客户端从 LLM 采样。客户端的 LLM 生成响应,服务器然后将其作为工具结果返回。
使用示例:
1 | // 客户端调用工具 |
采样参数(高级):
1 | { |
测试场景:
- 基本采样:简单提示,获取完成
- 长提示:使用多段提示测试
- 流式传输:请求流式响应
- 模型选择:测试模型偏好提示
- 参数调整:各种温度/maxTokens 值
- 错误处理:如果 LLM 不可用会怎样?
客户端要求:
- 必须能够访问 LLM(本地或 API)
- 必须实现
sampling/createMessage处理程序 - 应支持流式响应(可选)
- 应遵守 maxTokens 和 stopSequences
使用场景:
- 需要 AI 辅助的服务器(例如,代码分析服务器向 LLM 寻求建议)
- 递归 AI 操作(使用使用 AI 的工具的 AI 代理)
- 混合人机 AI 工作流
5. getTinyImage - Image Data Tool | 图像数据工具
English:
Returns a tiny PNG image to test binary data handling.
Purpose:
- Verify client can handle binary/base64 data
- Test image content types
- Validate blob resource handling
- Test MIME type processing
Parameters:
None
Return Value:
Image content with:
- Type:
image - Data: Base64-encoded PNG (1x1 pixel transparent image)
- MIME type:
image/png
Example Response:
1 | { |
Testing Scenarios:
- Display Image: Can client render the image?
- Base64 Decoding: Proper decoding of base64 data
- MIME Type Handling: Recognition of image/png
- Large Images: Extend test with larger images
- Other Image Formats: JPEG, GIF, WebP support (requires server modification)
Client Implementation:
1 | // Decode and display image |
Common Issues:
- Base64 padding errors
- MIME type mismatches
- Memory issues with large images
- Browser CORS restrictions
中文:
返回一个微型 PNG 图像以测试二进制数据处理。
用途:
- 验证客户端可以处理二进制/base64 数据
- 测试图像内容类型
- 验证 blob 资源处理
- 测试 MIME 类型处理
参数:
无
返回值:
图像内容包含:
- 类型:
image - 数据:Base64 编码的 PNG(1x1 像素透明图像)
- MIME 类型:
image/png
响应示例:
1 | { |
测试场景:
- 显示图像:客户端可以渲染图像吗?
- Base64 解码:正确解码 base64 数据
- MIME 类型处理:识别 image/png
- 大图像:使用更大的图像扩展测试
- 其他图像格式:JPEG、GIF、WebP 支持(需要服务器修改)
客户端实现:
1 | // 解码并显示图像 |
常见问题:
- Base64 填充错误
- MIME 类型不匹配
- 大图像的内存问题
- 浏览器 CORS 限制
6. annotatedMessage - Content Annotation Demo | 内容注释演示
English:
Demonstrates MCP’s content annotation system for adding metadata to responses.
Purpose:
- Test client’s annotation handling
- Verify metadata preservation
- Validate annotation rendering
- Test priority and audience targeting
Parameters:
None
Return Value:
Text content with annotations including:
- Audience targeting (e.g., user, assistant)
- Priority levels (low, normal, high)
- Custom metadata
Example Response:
1 | { |
Annotation Properties:
audience (array of strings):
"user": Visible to end users"assistant": For AI assistant only- Multiple audiences possible
priority (number, 0.0 to 1.0):
0.0 - 0.3: Low priority (debug, verbose info)0.4 - 0.7: Normal priority (regular content)0.8 - 1.0: High priority (important, urgent)
Testing Scenarios:
- Filtering by Audience: Show only user-relevant content
- Priority Sorting: Display high-priority items first
- Conditional Rendering: Hide low-priority content in summary view
- Multi-Audience: Content visible to both user and assistant
- Custom Annotations: Add your own metadata fields
Use Cases:
- Separating user-facing vs. internal information
- Highlighting critical information
- Progressive disclosure (show important first)
- Context-aware content filtering
中文:
演示 MCP 的内容注释系统,用于向响应添加元数据。
用途:
- 测试客户端的注释处理
- 验证元数据保留
- 验证注释渲染
- 测试优先级和受众定位
参数:
无
返回值:
带注释的文本内容,包括:
- 受众定位(例如,user、assistant)
- 优先级级别(低、正常、高)
- 自定义元数据
响应示例:
1 | { |
注释属性:
audience(字符串数组):
"user":对最终用户可见"assistant":仅供 AI 助手使用- 可能有多个受众
priority(数字,0.0 到 1.0):
0.0 - 0.3:低优先级(调试、详细信息)0.4 - 0.7:正常优先级(常规内容)0.8 - 1.0:高优先级(重要、紧急)
测试场景:
- 按受众过滤:仅显示与用户相关的内容
- 优先级排序:首先显示高优先级项目
- 条件渲染:在摘要视图中隐藏低优先级内容
- 多受众:对用户和助手都可见的内容
- 自定义注释:添加您自己的元数据字段
使用场景:
- 分离面向用户与内部信息
- 突出显示关键信息
- 渐进式披露(首先显示重要内容)
- 上下文感知内容过滤
7. structuredContent - Structured Data Tool | 结构化数据工具
English:
Returns structured, hierarchical content to test complex data handling.
Purpose:
- Verify client can handle nested data structures
- Test JSON object rendering
- Validate complex content types
- Test schema-based content
Parameters:
None
Return Value:
Structured content with nested objects, arrays, and various data types.
Example Response:
1 | { |
Testing Scenarios:
- Nested Objects: Multi-level object hierarchies
- Arrays: Lists of items
- Mixed Types: Strings, numbers, booleans, null
- Date Handling: ISO 8601 timestamps
- Large Structures: Deep nesting, many properties
- Rendering: JSON pretty-printing, collapsible trees
Client Display Options:
- Raw JSON view
- Tree/hierarchical view
- Table view (for arrays)
- Search/filter within structure
- Expandable/collapsible sections
中文:
返回结构化的分层内容以测试复杂的数据处理。
用途:
- 验证客户端可以处理嵌套数据结构
- 测试 JSON 对象渲染
- 验证复杂内容类型
- 测试基于模式的内容
参数:
无
返回值:
具有嵌套对象、数组和各种数据类型的结构化内容。
响应示例:
1 | { |
测试场景:
- 嵌套对象:多级对象层次结构
- 数组:项目列表
- 混合类型:字符串、数字、布尔值、null
- 日期处理:ISO 8601 时间戳
- 大型结构:深度嵌套、许多属性
- 渲染:JSON 美化打印、可折叠树
客户端显示选项:
- 原始 JSON 视图
- 树/分层视图
- 表格视图(用于数组)
- 在结构内搜索/过滤
- 可展开/可折叠部分
8. getResourceReference - Resource Reference Tool | 资源引用工具
English:
Generates a reference to one of the server’s test resources.
Purpose:
- Test resource reference handling
- Verify URI resolution
- Validate cross-referencing between tools and resources
- Test lazy resource loading
Parameters:
None (returns a random resource reference)
Return Value:
Resource content with URI pointing to one of the 100 test resources.
Example Response:
1 | { |
Resource URI Format:
- Scheme:
test:// - Path:
resource/{id}where id is 0-99 - Example:
test://resource/7
Client Workflow:
- Call
getResourceReferencetool - Receive URI in response
- Optionally dereference URI using
resources/readto get full content - Display or process resource data
Testing Scenarios:
- Reference Display: Show URI without fetching content
- Lazy Loading: Fetch content only when user clicks/expands
- Batch Fetching: Get multiple referenced resources efficiently
- Caching: Cache fetched resources to avoid redundant requests
- Dead Links: Handle invalid or deleted resource URIs
Use Cases:
- Tools that return references to large datasets
- Lazy loading of expensive resources
- Building resource dependency graphs
- Resource cataloging and indexing
中文:
生成对服务器测试资源之一的引用。
用途:
- 测试资源引用处理
- 验证 URI 解析
- 验证工具和资源之间的交叉引用
- 测试延迟资源加载
参数:
无(返回随机资源引用)
返回值:
指向 100 个测试资源之一的 URI 的资源内容。
响应示例:
1 | { |
资源 URI 格式:
- 方案:
test:// - 路径:
resource/{id},其中 id 为 0-99 - 示例:
test://resource/7
客户端工作流:
- 调用
getResourceReference工具 - 在响应中接收 URI
- 可选地使用
resources/read解引用 URI 以获取完整内容 - 显示或处理资源数据
测试场景:
- 引用显示:显示 URI 而不获取内容
- 延迟加载:仅在用户点击/展开时获取内容
- 批量获取:有效地获取多个引用的资源
- 缓存:缓存获取的资源以避免冗余请求
- 死链接:处理无效或已删除的资源 URI
使用场景:
- 返回对大型数据集的引用的工具
- 昂贵资源的延迟加载
- 构建资源依赖关系图
- 资源编目和索引
9. startElicitation - Interactive Client Elicitation | 交互式客户端引导
English:
Initiates an interactive elicitation flow where the server guides the client through a series of selections.
Purpose:
- Test interactive workflows
- Verify multi-turn tool interactions
- Validate client UI for selections
- Test state management across tool calls
Parameters:
None
Behavior:
Starts an interactive session where the server presents choices to the client, and the client must respond with selections. This demonstrates MCP’s capability for complex, stateful interactions.
Example Flow:
1 | // 1. Client calls startElicitation |
Testing Scenarios:
- Single Selection: Choose from list
- Multi-Step: Multiple rounds of selections
- Conditional Flow: Options change based on previous selections
- Cancellation: User cancels mid-flow
- Timeout: What happens if user doesn’t respond?
- Invalid Selection: User selects non-existent option
Client Requirements:
- UI for displaying options (dropdown, radio buttons, etc.)
- State tracking across multiple elicitation rounds
- Cancellation support
- Error handling for invalid selections
Use Cases:
- Configuration wizards
- Interactive setup flows
- Guided troubleshooting
- Multi-step data collection
中文:
启动交互式引导流程,服务器引导客户端通过一系列选择。
用途:
- 测试交互式工作流
- 验证多轮工具交互
- 验证客户端 UI 的选择
- 测试工具调用之间的状态管理
参数:
无
行为:
启动交互式会话,服务器向客户端呈现选择,客户端必须响应选择。这演示了 MCP 对复杂有状态交互的能力。
流程示例:
1 | // 1. 客户端调用 startElicitation |
测试场景:
- 单选:从列表中选择
- 多步骤:多轮选择
- 条件流程:选项根据先前的选择而变化
- 取消:用户中途取消流程
- 超时:如果用户不响应会发生什么?
- 无效选择:用户选择不存在的选项
客户端要求:
- 用于显示选项的 UI(下拉列表、单选按钮等)
- 跨多个引导轮次的状态跟踪
- 取消支持
- 无效选择的错误处理
使用场景:
- 配置向导
- 交互式设置流程
- 引导式故障排除
- 多步骤数据收集
10. printEnv - Environment Variable Inspector | 环境变量检查器
English:
Prints environment variables for debugging and system introspection.
Purpose:
- Debug server configuration
- Verify environment variable passing
- Test system information access
- Validate security (ensure secrets aren’t leaked)
Parameters:
None
Return Value:
Text content listing environment variables and their values.
Example Response:
1 | { |
Testing Scenarios:
- Variable Presence: Check for expected environment variables
- Value Verification: Confirm correct values are set
- Secret Filtering: Ensure sensitive data (API keys, passwords) are redacted
- Cross-Platform: Test on different OSes (Linux, macOS, Windows)
- Container Environments: Test in Docker, Kubernetes
Security Considerations:
- Server should filter sensitive variables (API_KEY, PASSWORD, SECRET, TOKEN)
- Consider implementing allowlist/denylist for variable disclosure
- Log access to environment variables for audit trail
Use Cases:
- Debugging server startup issues
- Verifying configuration in different environments
- Troubleshooting path and dependency issues
- Security auditing
中文:
打印环境变量以进行调试和系统内省。
用途:
- 调试服务器配置
- 验证环境变量传递
- 测试系统信息访问
- 验证安全性(确保不泄露密钥)
参数:
无
返回值:
列出环境变量及其值的文本内容。
响应示例:
1 | { |
测试场景:
- 变量存在:检查预期的环境变量
- 值验证:确认设置了正确的值
- 密钥过滤:确保敏感数据(API 密钥、密码)已编辑
- 跨平台:在不同操作系统上测试(Linux、macOS、Windows)
- 容器环境:在 Docker、Kubernetes 中测试
安全注意事项:
- 服务器应过滤敏感变量(API_KEY、PASSWORD、SECRET、TOKEN)
- 考虑实施变量披露的允许列表/拒绝列表
- 记录对环境变量的访问以进行审计跟踪
使用场景:
- 调试服务器启动问题
- 在不同环境中验证配置
- 故障排除路径和依赖项问题
- 安全审计
11. listRoots - MCP Roots Management | MCP Roots 管理
English:
Lists the MCP roots registered with the server, demonstrating the roots protocol.
Purpose:
- Test roots protocol implementation
- Verify hierarchical organization
- Validate root discovery
- Test root metadata handling
Parameters:
None
Return Value:
List of roots with their URIs and metadata.
Example Response:
1 | { |
Roots Protocol Concepts:
- Root URI: Base URI for a resource hierarchy
- Name: Human-readable root name
- Description: What this root contains
- Capabilities: What operations are supported on this root
Testing Scenarios:
- Root Discovery: List all available roots
- Root Navigation: Browse resources under a root
- Root Metadata: Access root properties
- Dynamic Roots: Roots that change over time
- Access Control: Permissions per root
Client Implementation:
1 | // List roots |
Use Cases:
- File system navigation
- Project/workspace organization
- Resource categorization
- Multi-tenant systems
- Hierarchical access control
中文:
列出在服务器上注册的 MCP roots,演示 roots 协议。
用途:
- 测试 roots 协议实现
- 验证分层组织
- 验证根发现
- 测试根元数据处理
参数:
无
返回值:
具有其 URI 和元数据的根列表。
响应示例:
1 | { |
Roots 协议概念:
- 根 URI:资源层次结构的基础 URI
- 名称:人类可读的根名称
- 描述:此根包含的内容
- 能力:此根支持的操作
测试场景:
- 根发现:列出所有可用的根
- 根导航:浏览根下的资源
- 根元数据:访问根属性
- 动态根:随时间变化的根
- 访问控制:每个根的权限
客户端实现:
1 | // 列出根 |
使用场景:
- 文件系统导航
- 项目/工作区组织
- 资源分类
- 多租户系统
- 分层访问控制
Resource System | 资源系统
Overview | 概览
English:
MCP Server Everything provides 100 test resources designed to comprehensively test client resource handling capabilities. These resources demonstrate pagination, different content types, update notifications, and resource templates.
Key Features:
- 100 Resources: IDs from 0 to 99
- Format Distribution:
- Even IDs (0, 2, 4, …): Plaintext resources
- Odd IDs (1, 3, 5, …): Binary blob resources
- URI Scheme:
test://resource/{id} - Pagination: 10 resources per page, cursor-based navigation
- Update Notifications: Resources update every 5 seconds
- Resource Templates: Support for template-based resource generation
中文:
MCP Server Everything 提供 100 个测试资源,旨在全面测试客户端资源处理能力。这些资源演示了分页、不同内容类型、更新通知和资源模板。
主要功能:
- 100 个资源:ID 从 0 到 99
- 格式分配:
- 偶数 ID(0、2、4、…):纯文本资源
- 奇数 ID(1、3、5、…):二进制 blob 资源
- URI 方案:
test://resource/{id} - 分页:每页 10 个资源,基于游标的导航
- 更新通知:资源每 5 秒更新一次
- 资源模板:支持基于模板的资源生成
Resource Format Examples | 资源格式示例
English:
Plaintext Resource (Even ID):
1 | // Request: resources/read test://resource/42 |
Binary Resource (Odd ID):
1 | // Request: resources/read test://resource/43 |
中文:
纯文本资源(偶数 ID):
1 | // 请求:resources/read test://resource/42 |
二进制资源(奇数 ID):
1 | // 请求:resources/read test://resource/43 |
Pagination | 分页
English:
Resources are paginated with 10 items per page using cursor-based navigation.
Listing Resources:
1 | // First page (resources 0-9) |
Pagination Testing:
- Fetch first page without cursor
- Use nextCursor to fetch subsequent pages
- Verify correct resources on each page
- Confirm nextCursor is null on last page
- Test edge cases (empty results, single page)
中文:
资源使用基于游标的导航进行分页,每页 10 个项目。
列出资源:
1 | // 第一页(资源 0-9) |
分页测试:
- 不使用游标获取第一页
- 使用 nextCursor 获取后续页面
- 验证每页上的正确资源
- 确认最后一页上 nextCursor 为 null
- 测试边缘情况(空结果、单页)
Update Notifications | 更新通知
English:
Resources automatically update every 5 seconds to test client notification handling.
Subscription Flow:
1 | // 1. Subscribe to resource updates |
Testing Scenarios:
- Single Resource: Subscribe to one resource, verify updates
- Multiple Resources: Subscribe to several, confirm each updates
- Unsubscribe: Verify updates stop after unsubscribe
- Re-subscribe: Subscribe, unsubscribe, subscribe again
- Connection Issues: What happens if connection drops during subscription?
Client Implementation Checklist:
- Implement
notifications/resources/updatedhandler - Re-fetch resource content on notification
- Update UI to reflect changes
- Handle subscription lifecycle (subscribe/unsubscribe)
- Manage multiple concurrent subscriptions
- Cleanup subscriptions on disconnect
中文:
资源每 5 秒自动更新以测试客户端通知处理。
订阅流程:
1 | // 1. 订阅资源更新 |
测试场景:
- 单个资源:订阅一个资源,验证更新
- 多个资源:订阅多个,确认每个都更新
- 取消订阅:验证取消订阅后更新停止
- 重新订阅:订阅、取消订阅、再次订阅
- 连接问题:订阅期间连接断开会发生什么?
客户端实现清单:
- 实现
notifications/resources/updated处理程序 - 收到通知时重新获取资源内容
- 更新 UI 以反映更改
- 处理订阅生命周期(订阅/取消订阅)
- 管理多个并发订阅
- 断开连接时清理订阅
Resource Templates | 资源模板
English:
Server supports resource templates for dynamic resource generation.
Template Usage:
1 | // List available templates |
Testing Scenarios:
- List available templates
- Construct URIs from templates
- Verify template parameter substitution
- Test invalid template parameters
- Multiple templates with different patterns
中文:
服务器支持用于动态资源生成的资源模板。
模板使用:
1 | // 列出可用模板 |
测试场景:
- 列出可用模板
- 从模板构建 URI
- 验证模板参数替换
- 测试无效的模板参数
- 具有不同模式的多个模板
Prompt Templates | 提示模板
Overview | 概览
English:
MCP Server Everything provides three prompt templates demonstrating different conversation patterns.
中文:
MCP Server Everything 提供三个提示模板,演示不同的对话模式。
1. simple_prompt - Basic Prompt Template | 基本提示模板
English:
A basic prompt template with no parameters.
Usage:
1 | { |
Response:
1 | { |
Testing:
- Verify prompt retrieval
- Test prompt rendering
- Validate message structure
中文:
不带参数的基本提示模板。
使用:
1 | { |
响应:
1 | { |
测试:
- 验证提示检索
- 测试提示渲染
- 验证消息结构
2. complex_prompt - Parameterized Prompt Template | 参数化提示模板
English:
An advanced prompt template supporting parameters and multi-turn conversations.
Usage:
1 | { |
Response:
1 | { |
Parameters:
topic(string): Discussion topicdepth(string): Level of detail (basic, intermediate, advanced)
Testing:
- Parameter substitution
- Multi-turn message handling
- Dynamic content generation
- Invalid parameter handling
中文:
支持参数和多轮对话的高级提示模板。
使用:
1 | { |
响应:
1 | { |
参数:
topic(字符串):讨论主题depth(字符串):详细程度(基本、中级、高级)
测试:
- 参数替换
- 多轮消息处理
- 动态内容生成
- 无效参数处理
3. resource_prompt - Resource-Embedded Prompt | 嵌入资源的提示
English:
A prompt template that embeds resource references.
Usage:
1 | { |
Response:
1 | { |
Testing:
- Resource embedding in prompts
- Resource resolution
- Multi-content-type messages
- Resource availability handling
中文:
嵌入资源引用的提示模板。
使用:
1 | { |
响应:
1 | { |
测试:
- 在提示中嵌入资源
- 资源解析
- 多内容类型消息
- 资源可用性处理
Transport Protocols | 传输协议
stdio (Recommended) | stdio(推荐)
English:
Standard input/output transport is the primary and recommended method for MCP servers.
Configuration:
1 | { |
Characteristics:
- Simple process-based communication
- Low latency
- Bidirectional streaming
- Process lifecycle management
- Standard error for logging
Client Implementation:
1 | import { spawn } from 'child_process'; |
中文:
标准输入/输出传输是 MCP 服务器的主要和推荐方法。
配置:
1 | { |
特点:
- 简单的基于进程的通信
- 低延迟
- 双向流式传输
- 进程生命周期管理
- 用于日志记录的标准错误
客户端实现:
1 | import { spawn } from 'child_process'; |
HTTP + SSE (Deprecated) | HTTP + SSE(已弃用)
English:
HTTP with Server-Sent Events for server-to-client notifications. This transport is deprecated but still supported.
Not Recommended - Use stdio or streamable HTTP instead.
中文:
使用服务器发送事件进行服务器到客户端通知的 HTTP。此传输已弃用但仍受支持。
不推荐 - 请改用 stdio 或可流式传输的 HTTP。
Streamable HTTP (Modern) | 可流式传输的 HTTP(现代)
English:
Modern HTTP-based transport with streaming support.
Configuration:
1 | { |
Characteristics:
- HTTP/2 streaming
- Network-friendly (works through proxies, load balancers)
- Authentication support (headers, tokens)
- Cloud-native deployment
- Cross-origin support (CORS)
Use Cases:
- Remote MCP servers
- Cloud-hosted services
- Multi-user environments
- API gateway integration
中文:
基于 HTTP 的现代传输,支持流式传输。
配置:
1 | { |
特点:
- HTTP/2 流式传输
- 网络友好(通过代理、负载均衡器工作)
- 身份验证支持(标头、令牌)
- 云原生部署
- 跨域支持(CORS)
使用场景:
- 远程 MCP 服务器
- 云托管服务
- 多用户环境
- API 网关集成
Installation & Configuration | 安装与配置
Method 1: NPX (Recommended) | 方法 1:NPX(推荐)
English:
Run directly with NPX without installation:
1 | npx -y @modelcontextprotocol/server-everything |
Or install globally:
1 | npm install -g @modelcontextprotocol/server-everything@latest |
中文:
无需安装直接使用 NPX 运行:
1 | npx -y @modelcontextprotocol/server-everything |
或全局安装:
1 | npm install -g @modelcontextprotocol/server-everything@latest |
Method 2: From Source | 方法 2:从源代码
English:
1 | # Clone the repository |
中文:
1 | # 克隆仓库 |
Method 3: Docker | 方法 3:Docker
English:
1 | # Build Docker image |
中文:
1 | # 构建 Docker 镜像 |
Claude Desktop Configuration | Claude Desktop 配置
English:
Add to claude_desktop_config.json:
1 | { |
Configuration File Locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
中文:
添加到 claude_desktop_config.json:
1 | { |
配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
VS Code Configuration | VS Code 配置
English:
Add to VS Code settings (.vscode/settings.json):
1 | { |
中文:
添加到 VS Code 设置(.vscode/settings.json):
1 | { |
Testing Workflows | 测试工作流
Comprehensive Client Testing Checklist | 全面的客户端测试清单
English:
Use this checklist to thoroughly test your MCP client implementation against MCP Server Everything.
1. Connection & Initialization | 1. 连接和初始化
- Establish connection via stdio transport
- Send
initializerequest - Receive and parse
initializeresponse - Verify server capabilities (tools, resources, prompts)
- Send
initializednotification - Handle connection errors gracefully
2. Tool Discovery & Invocation | 2. 工具发现和调用
- List all available tools (should be 11)
- Parse tool schemas and parameters
- Display tools in UI
- Call
echotool with various messages - Call
addtool with different number types - Handle tool call errors (invalid parameters, etc.)
3. Progress Notifications | 3. 进度通知
- Call
longRunningOperationtool - Receive progress notifications
- Display progress to user (progress bar/percentage)
- Handle completion notification
- Test cancellation (if supported)
4. LLM Sampling | 4. LLM 采样
- Call
sampleLLMtool - Handle
sampling/createMessagerequest from server - Send prompt to LLM
- Return LLM response to server
- Handle streaming responses (optional)
5. Binary Data Handling | 5. 二进制数据处理
- Call
getTinyImagetool - Decode base64 image data
- Render image in UI
- Verify MIME type handling
6. Content Annotations | 6. 内容注释
- Call
annotatedMessagetool - Parse annotation metadata
- Filter content by audience
- Sort/prioritize by priority value
- Display annotations appropriately
7. Structured Content | 7. 结构化内容
- Call
structuredContenttool - Parse nested JSON structures
- Render structured data (tree view, table, etc.)
- Handle complex data types
8. Resource Management | 8. 资源管理
- List resources (should return 10 per page)
- Navigate pagination with cursors
- Read individual resources (even and odd IDs)
- Handle plaintext vs. binary resources
- Subscribe to resource updates
- Receive update notifications
- Unsubscribe from updates
9. Prompt Templates | 9. 提示模板
- List available prompts (should be 3)
- Get
simple_promptwithout parameters - Get
complex_promptwith parameters - Get
resource_promptwith embedded resource - Render multi-turn conversations
10. Roots Protocol | 10. Roots 协议
- Call
listRootstool - Parse roots metadata
- Display roots in UI (tree structure, etc.)
11. Logging | 11. 日志记录
- Receive random log messages (every 15 seconds)
- Parse log levels (info, debug, etc.)
- Display logs in console/log viewer
- Filter logs by level
12. Error Handling | 12. 错误处理
- Call non-existent tool (should error)
- Send invalid parameters (should error)
- Read non-existent resource (should error)
- Handle network timeouts
- Reconnect after disconnect
13. Performance | 13. 性能
- Measure tool call latency
- Test concurrent tool calls
- Test with large resources
- Monitor memory usage
- Check for memory leaks
中文:
使用此清单全面测试您的 MCP 客户端实现与 MCP Server Everything。
(清单项目同上,已翻译为中文)
Example Testing Script | 测试脚本示例
English:
1 | // Example MCP client testing script |
中文:
(代码示例相同,注释已翻译为中文)
Integration with MCP Inspector | 与 MCP Inspector 集成
English:
MCP Inspector is the official debugging tool for MCP servers. Use it with MCP Server Everything:
1 | # Install MCP Inspector |
Inspector Features:
- Interactive tool calling
- Resource browsing
- Prompt testing
- Request/response inspection
- Performance monitoring
- WebUI for visual exploration
Browser Interface:
The inspector opens a web interface (usually at http://localhost:5173) where you can:
- See all available tools, resources, and prompts
- Call tools interactively with custom parameters
- View real-time logs and notifications
- Inspect request/response JSON
- Test different transport protocols
中文:
MCP Inspector 是 MCP 服务器的官方调试工具。与 MCP Server Everything 一起使用:
1 | # 安装 MCP Inspector |
Inspector 功能:
- 交互式工具调用
- 资源浏览
- 提示测试
- 请求/响应检查
- 性能监控
- 用于可视化探索的 WebUI
浏览器界面:
检查器打开一个 Web 界面(通常在 http://localhost:5173),您可以在其中:
- 查看所有可用的工具、资源和提示
- 使用自定义参数交互式调用工具
- 查看实时日志和通知
- 检查请求/响应 JSON
- 测试不同的传输协议
Use Cases for Client Developers | 客户端开发者使用场景
1. Protocol Compliance Testing | 1. 协议合规性测试
English:
Verify your client correctly implements all MCP protocol features:
Test Coverage:
- Tool calling (simple and complex)
- Resource access (read, list, subscribe)
- Prompt retrieval and rendering
- Progress notifications
- LLM sampling requests
- Content annotations
- Structured data handling
- Error responses
- Logging
Workflow:
- Connect to server
- Systematically call each tool
- Verify responses match expected format
- Check edge cases and error handling
- Generate compliance report
中文:
验证您的客户端正确实现了所有 MCP 协议功能:
测试覆盖范围:
- 工具调用(简单和复杂)
- 资源访问(读取、列表、订阅)
- 提示检索和渲染
- 进度通知
- LLM 采样请求
- 内容注释
- 结构化数据处理
- 错误响应
- 日志记录
工作流:
- 连接到服务器
- 系统地调用每个工具
- 验证响应与预期格式匹配
- 检查边缘情况和错误处理
- 生成合规性报告
2. UI/UX Development | 2. UI/UX 开发
English:
Design and test user interfaces for MCP interactions:
UI Components to Test:
- Tool selector and parameter input forms
- Progress bars and loading indicators
- Resource browsers with pagination
- Prompt template selectors
- Log viewers
- Notification panels
- Error message displays
Example:
Build a tool invocation UI where users select add tool, input parameters in form fields, and see the result displayed clearly.
中文:
设计和测试 MCP 交互的用户界面:
要测试的 UI 组件:
- 工具选择器和参数输入表单
- 进度条和加载指示器
- 具有分页功能的资源浏览器
- 提示模板选择器
- 日志查看器
- 通知面板
- 错误消息显示
示例:
构建一个工具调用 UI,用户可以选择 add 工具,在表单字段中输入参数,并清楚地看到显示的结果。
3. Performance Benchmarking | 3. 性能基准测试
English:
Measure client performance metrics:
Metrics to Track:
- Connection establishment time
- Tool call latency (average, p95, p99)
- Resource fetch time
- Progress notification latency
- Memory usage over time
- Concurrent request handling
Benchmark Script:
1 | // Measure 100 echo calls |
中文:
测量客户端性能指标:
要跟踪的指标:
- 连接建立时间
- 工具调用延迟(平均、p95、p99)
- 资源获取时间
- 进度通知延迟
- 随时间的内存使用
- 并发请求处理
(基准脚本相同)
4. Error Recovery Testing | 4. 错误恢复测试
English:
Test client resilience and error handling:
Scenarios:
- Server crashes mid-operation
- Network interruptions
- Invalid server responses
- Timeout scenarios
- Resource not found errors
- Permission denied errors
中文:
测试客户端弹性和错误处理:
场景:
- 操作中服务器崩溃
- 网络中断
- 无效的服务器响应
- 超时场景
- 找不到资源错误
- 权限被拒绝错误
5. Integration Testing | 5. 集成测试
English:
Test client in realistic workflows combining multiple features:
Example Workflow:
- Connect to server
- List all tools
- Call
echoto verify connectivity - Subscribe to resource
test://resource/42 - Call
longRunningOperationand monitor progress - Receive resource update notification
- Read updated resource
- Call
sampleLLMto test AI integration - Clean up and disconnect
中文:
在结合多个功能的现实工作流中测试客户端:
示例工作流:
- 连接到服务器
- 列出所有工具
- 调用
echo验证连接 - 订阅资源
test://resource/42 - 调用
longRunningOperation并监控进度 - 接收资源更新通知
- 读取更新的资源
- 调用
sampleLLM测试 AI 集成 - 清理并断开连接
6. Educational and Training | 6. 教育和培训
English:
Learn MCP protocol by interacting with real examples:
Learning Path:
- Start with simple tools (echo, add)
- Progress to binary data (getTinyImage)
- Understand progress notifications (longRunningOperation)
- Explore advanced features (LLM sampling, annotations)
- Master resource management (pagination, subscriptions)
- Study the server’s source code for implementation patterns
Teaching Materials:
- Workshop exercises using each tool
- Code examples for every feature
- Debugging exercises with MCP Inspector
- Building a complete client from scratch
中文:
通过与实际示例交互学习 MCP 协议:
学习路径:
- 从简单工具开始(echo、add)
- 进展到二进制数据(getTinyImage)
- 理解进度通知(longRunningOperation)
- 探索高级功能(LLM 采样、注释)
- 掌握资源管理(分页、订阅)
- 研究服务器的源代码以了解实现模式
教学材料:
- 使用每个工具的研讨会练习
- 每个功能的代码示例
- 使用 MCP Inspector 的调试练习
- 从头开始构建完整的客户端
Best Practices | 最佳实践
For Client Developers | 对于客户端开发者
English:
- Start Simple: Begin with
echoandaddtools before tackling complex features - Handle All Content Types: Test both text and binary resources (even vs. odd IDs)
- Implement Progress UI: Users need feedback for long operations
- Cache Resources: Avoid redundant fetches, especially for paginated resources
- Error Recovery: Always handle errors gracefully with retries and user messaging
- Logging Integration: Capture and display server logs for debugging
- Test Edge Cases: Empty responses, large data, concurrent operations
- Performance Monitoring: Track latency and memory usage
- Use MCP Inspector: Debug with the official tool before deploying
- Read the Spec: Consult the MCP protocol specification alongside testing
中文:
- 从简单开始:在处理复杂功能之前,先从
echo和add工具开始 - 处理所有内容类型:测试文本和二进制资源(偶数 vs. 奇数 ID)
- 实现进度 UI:用户需要长时间操作的反馈
- 缓存资源:避免冗余获取,尤其是分页资源
- 错误恢复:始终通过重试和用户消息优雅地处理错误
- 日志集成:捕获并显示服务器日志以进行调试
- 测试边缘情况:空响应、大数据、并发操作
- 性能监控:跟踪延迟和内存使用
- 使用 MCP Inspector:在部署之前使用官方工具进行调试
- 阅读规范:在测试的同时查阅 MCP 协议规范
For Server Developers | 对于服务器开发者
English:
- Study This Implementation: MCP Server Everything is the reference - read its source code
- Follow Patterns: Match the response formats and behaviors demonstrated here
- Implement All Features: Tools, resources, prompts, and notifications
- Test with Multiple Clients: Use Claude Desktop, MCP Inspector, custom clients
- Document Thoroughly: Clear documentation helps client developers integrate
- Version Your API: Use semantic versioning for breaking changes
- Provide Examples: Include usage examples for every tool
- Log Appropriately: Use structured logging at appropriate levels
- Handle Errors Well: Return informative error messages
- Consider Performance: Optimize for latency and throughput
中文:
- 研究此实现:MCP Server Everything 是参考 - 阅读其源代码
- 遵循模式:匹配此处演示的响应格式和行为
- 实现所有功能:工具、资源、提示和通知
- 使用多个客户端测试:使用 Claude Desktop、MCP Inspector、自定义客户端
- 彻底记录:清晰的文档有助于客户端开发者集成
- 版本化您的 API:对重大更改使用语义版本控制
- 提供示例:为每个工具包含使用示例
- 适当记录日志:在适当的级别使用结构化日志记录
- 良好处理错误:返回信息丰富的错误消息
- 考虑性能:优化延迟和吞吐量
FAQ | 常见问题
General Questions | 一般问题
Q: Is this server meant for production use?
A: No. MCP Server Everything is explicitly designed as a testing and reference server for client developers. It’s not optimized for production workloads.
Q: Why are there exactly 100 test resources?
A: This provides sufficient resources to test pagination (10 resources per page = 10 pages) while remaining manageable for testing purposes.
Q: Why do even/odd IDs have different formats?
A: To ensure clients can handle both plaintext and binary resource types, which is essential for real-world MCP servers.
Q: How often do resources update?
A: Resources automatically update every 5 seconds to test notification handling.
Q: How often are log messages sent?
A: Random log messages are sent every 15 seconds to test log handling capabilities.
问:此服务器是否适用于生产使用?
答: 不。MCP Server Everything 明确设计为客户端开发者的测试和参考服务器。它未针对生产工作负载进行优化。
问:为什么恰好有 100 个测试资源?
答: 这提供了足够的资源来测试分页(每页 10 个资源 = 10 页),同时保持可管理以用于测试目的。
问:为什么偶数/奇数 ID 有不同的格式?
答: 为了确保客户端可以处理纯文本和二进制资源类型,这对于现实世界的 MCP 服务器至关重要。
问:资源多久更新一次?
答: 资源每 5 秒自动更新一次以测试通知处理。
问:日志消息多久发送一次?
答: 每 15 秒发送一次随机日志消息以测试日志处理能力。
Technical Questions | 技术问题
Q: Which transport protocol should I use?
A: Use stdio for local processes. Use streamable HTTP for remote servers or cloud deployments. Avoid deprecated HTTP+SSE.
Q: How do I test LLM sampling if I don’t have an LLM?
A: You can mock the LLM response in your client for testing purposes, or use a free API like OpenAI’s GPT-3.5-turbo with minimal costs.
Q: Can I modify the server to add my own tools?
A: Yes! The server is open source under MIT license. Fork it and add your own tools for custom testing scenarios.
Q: How do I debug connection issues?
A: Use MCP Inspector to see detailed request/response logs. Check stderr for server logs. Verify your transport configuration matches the server’s expected format.
Q: Does the server support authentication?
A: No, this is a test server. For production servers requiring authentication, implement token-based auth in headers (for HTTP transport) or environment variables (for stdio).
问:我应该使用哪种传输协议?
答: 对于本地进程使用 stdio。对于远程服务器或云部署使用可流式传输的 HTTP。避免使用已弃用的 HTTP+SSE。
问:如果我没有 LLM,如何测试 LLM 采样?
答: 您可以在客户端中模拟 LLM 响应以进行测试,或者使用像 OpenAI 的 GPT-3.5-turbo 这样的免费 API,成本很低。
问:我可以修改服务器以添加我自己的工具吗?
答: 可以!该服务器在 MIT 许可下是开源的。分叉它并为自定义测试场景添加您自己的工具。
问:如何调试连接问题?
答: 使用 MCP Inspector 查看详细的请求/响应日志。检查 stderr 以获取服务器日志。验证您的传输配置与服务器的预期格式匹配。
问:服务器是否支持身份验证?
答: 不支持,这是一个测试服务器。对于需要身份验证的生产服务器,在标头中实现基于令牌的身份验证(对于 HTTP 传输)或环境变量(对于 stdio)。
Troubleshooting | 故障排除
Q: Server fails to start with “command not found”
A: Ensure Node.js 16+ is installed and npx is available in your PATH.
Q: I’m not receiving progress notifications
A: Verify your client has registered a handler for notifications/progress. Check that notifications aren’t being filtered or dropped.
Q: Resource pagination isn’t working
A: Make sure you’re correctly passing the nextCursor value from the previous response to the next resources/list call.
Q: Images aren’t displaying
A: Verify base64 decoding is working correctly. Check that MIME type is properly recognized. Ensure blob URLs are created correctly in the browser.
Q: Random logs aren’t appearing
A: Logs are sent to stderr, not stdout. Ensure your client is monitoring the server process’s stderr stream.
问:服务器启动失败,出现”找不到命令”错误
答: 确保安装了 Node.js 16+ 并且 npx 在您的 PATH 中可用。
问:我没有收到进度通知
答: 验证您的客户端已为 notifications/progress 注册了处理程序。检查通知是否未被过滤或丢弃。
问:资源分页不起作用
答: 确保您正确地将上一个响应中的 nextCursor 值传递给下一个 resources/list 调用。
问:图像未显示
答: 验证 base64 解码是否正常工作。检查 MIME 类型是否正确识别。确保在浏览器中正确创建 blob URL。
问:随机日志未出现
答: 日志发送到 stderr,而不是 stdout。确保您的客户端正在监控服务器进程的 stderr 流。
Project Information | 项目信息
Repository Details | 仓库详情
- Repository: modelcontextprotocol/servers
- Subdirectory:
src/everything - Stars: 70,200+ ⭐
- Official: Yes (Anthropic)
- License: MIT
- Language: TypeScript
- MCP SDK: @modelcontextprotocol/sdk (latest)
- Node.js: >=16.0.0
Dependencies | 依赖项
1 | { |
Contributing | 贡献
English:
Contributions are welcome! This is an official Anthropic project, so contributions should align with MCP protocol standards.
How to Contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new features
- Submit a pull request
- Ensure CI passes
Areas for Contribution:
- Additional test tools demonstrating edge cases
- Enhanced documentation and examples
- Performance optimizations
- Bug fixes
- Transport protocol improvements
中文:
欢迎贡献!这是一个官方的 Anthropic 项目,因此贡献应与 MCP 协议标准保持一致。
如何贡献:
- Fork 仓库
- 创建功能分支
- 进行更改
- 为新功能添加测试
- 提交 pull request
- 确保 CI 通过
贡献领域:
- 演示边缘情况的额外测试工具
- 增强的文档和示例
- 性能优化
- Bug 修复
- 传输协议改进
Conclusion | 结论
English:
MCP Server Everything represents the gold standard for MCP protocol implementation. As the official reference server from Anthropic with over 70,000 stars, it provides:
✅ Complete Protocol Coverage: All 11 tool types, 100 resources, 3 prompt templates
✅ Production-Grade Code: TypeScript implementation with high code quality
✅ Comprehensive Testing: Essential tool for validating MCP client implementations
✅ Educational Value: Best resource for learning MCP protocol development
✅ Active Maintenance: Regular updates aligned with protocol evolution
Whether you’re building a new MCP client, validating an existing implementation, or learning the protocol from scratch, MCP Server Everything is your essential companion. Its comprehensive feature set and clear implementation patterns make it the definitive reference for the MCP ecosystem.
Start testing your MCP client today with the reference implementation that defines the standard.
中文:
MCP Server Everything 代表了 MCP 协议实现的黄金标准。作为来自 Anthropic 的拥有超过 70,000 星标的官方参考服务器,它提供:
✅ 完整的协议覆盖:所有 11 种工具类型、100 个资源、3 个提示模板
✅ 生产级代码:高代码质量的 TypeScript 实现
✅ 全面测试:验证 MCP 客户端实现的必备工具
✅ 教育价值:学习 MCP 协议开发的最佳资源
✅ 积极维护:与协议演进同步的定期更新
无论您是构建新的 MCP 客户端、验证现有实现,还是从头开始学习协议,MCP Server Everything 都是您必不可少的伙伴。其全面的功能集和清晰的实现模式使其成为 MCP 生态系统的权威参考。
立即使用定义标准的参考实现开始测试您的 MCP 客户端。
Score: 4.7/5.0
Rating Breakdown:
- Functionality: 5.0/5.0 - Complete MCP protocol implementation
- Documentation: 4.5/5.0 - Good docs, this guide provides comprehensive coverage
- Activity: 5.0/5.0 - Official Anthropic project, actively maintained
- Popularity: 4.5/5.0 - 70,200+ stars, industry standard
- Code Quality: 5.0/5.0 - Production-grade TypeScript
Official Anthropic MCP Reference Implementation 🌟
Essential for All MCP Client Developers 📚
GitHub: modelcontextprotocol/servers