Commit 8c25177
committed
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- examples/servers/everything-server
- mcp_everything_server
6 files changed
+485
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments