Skip to content

Commit 8c25177

Browse files
Add everything-server for MCP conformance testing
Implements a comprehensive reference server that exercises all MCP protocol features for conformance testing. This server validates that the Python SDK correctly implements the MCP specification by passing all 25 conformance test scenarios. Features implemented: - 11 tools covering all content types (text, image, audio, embedded resources, mixed content, logging, progress, error handling, sampling, elicitation) - 4 resources (static text/binary, templates, subscribable resources) - 4 prompts with various content types - Logging support (logging/setLevel) - Completion support (completion/complete) - Resource subscriptions (resources/subscribe, resources/unsubscribe) - Session management with StreamableHTTP transport Implementation uses FastMCP with proper type safety: - All URIs wrapped with AnyUrl() for type correctness - Context properly typed with ServerSession parameter - Subscribe/unsubscribe handlers use correct AnyUrl parameter and None return - Completion handler returns Completion objects - ElicitationResult uses discriminated union narrowing via action field - Relative imports in __main__.py to avoid type stub warnings Type checking: Passes pyright with 0 errors (only 3 targeted ignores for accessing _mcp_server private API, documented with TODO to add public APIs to FastMCP in the future). Conformance: Passes all 25 test scenarios.
1 parent b7b0f8e commit 8c25177

File tree

6 files changed

+485
-0
lines changed

6 files changed

+485
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# MCP Everything Server
2+
3+
A comprehensive MCP server implementing all protocol features for conformance testing.
4+
5+
## Overview
6+
7+
The Everything Server is a reference implementation that demonstrates all features of the Model Context Protocol (MCP). It is designed to be used with the [MCP Conformance Test Framework](https://github.com/modelcontextprotocol/conformance) to validate MCP client and server implementations.
8+
9+
## Installation
10+
11+
From the python-sdk root directory:
12+
13+
```bash
14+
uv sync --frozen
15+
```
16+
17+
## Usage
18+
19+
### Running the Server
20+
21+
Start the server with default settings (port 3001):
22+
23+
```bash
24+
uv run -m mcp_everything_server
25+
```
26+
27+
Or with custom options:
28+
29+
```bash
30+
uv run -m mcp_everything_server --port 3001 --log-level DEBUG
31+
```
32+
33+
The server will be available at: `http://localhost:3001/mcp`
34+
35+
### Command-Line Options
36+
37+
- `--port` - Port to listen on (default: 3001)
38+
- `--log-level` - Logging level: DEBUG, INFO, WARNING, ERROR, CRITICAL (default: INFO)
39+
40+
## Running Conformance Tests
41+
42+
See the [MCP Conformance Test Framework](https://github.com/modelcontextprotocol/conformance) for instructions on running conformance tests against this server.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""MCP Everything Server - Comprehensive conformance test server."""
2+
3+
__version__ = "0.1.0"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""CLI entry point for the MCP Everything Server."""
2+
3+
from .server import main
4+
5+
if __name__ == "__main__":
6+
main()

0 commit comments

Comments
 (0)