You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -4,27 +4,28 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
This repository implements a **learning-edition MCP calculator server using STDIO transport**. It demonstrates the Model Context Protocol (MCP) with standard JSON-RPC communication over stdin/stdout using the official MCP SDK.
7
+
This repository is a **comprehensive educational curriculum for MCP development** built around a world-class calculator server using STDIO transport. It serves as the definitive learning resource for the MCP community, combining a production-ready server implementation with structured learning materials, progressive exercises, and complete best practices guidance.
8
8
9
9
## Development Commands
10
10
11
11
### Core Development
12
12
-`npm install` - Install dependencies
13
13
-`npm start` - Run the MCP server (`dist/server.js --stdio`)
14
14
-`npm run dev` - Development mode with auto-reload
15
-
-`npm run build` - Build TypeScript to JavaScript (may fail due to legacy API usage)
15
+
-`npm run build` - Build TypeScript to JavaScript
16
+
-`npm run format` - Format code with Prettier
17
+
-`npm run format:check` - Check code formatting
16
18
-`npm run clean` - Remove dist directory
17
19
18
20
### Testing & Quality
19
-
-`npm test` - Run all tests
20
-
-`npm run test:watch` - Run tests in watch mode
21
-
-`npm run test:coverage` - Run tests with coverage
22
21
-`npm run lint` - Run ESLint
23
22
-`npm run lint:fix` - Fix linting issues
24
23
-`npm run typecheck` - TypeScript type checking
24
+
-`npm run format` - Format code with Prettier
25
+
-`npm run format:check` - Check code formatting
25
26
26
27
### MCP Inspection
27
-
-`npx @modelcontextprotocol/inspector --cli "node dist/server.js --stdio" --method tools/list` - List all 7 tools with schemas
28
+
-`npx @modelcontextprotocol/inspector --cli "node dist/server.js --stdio" --method tools/list` - List all 8 tools with schemas
28
29
-`npx @modelcontextprotocol/inspector --cli "node dist/server.js --stdio" --method prompts/list` - List all 3 prompts
29
30
-`npx @modelcontextprotocol/inspector --cli "node dist/server.js --stdio" --method resources/list` - List all 4 resources
-**Concurrent Processing**: Maintains `Map<id, PromiseResolver>` for in-flight requests
60
-
61
-
## Development Notes
62
-
63
-
**Important**: The production server is the pre-built JavaScript file at `dist/server.js`. This ensures compatibility with the MCP SDK and Smithery registry. When making changes:
64
-
65
-
1. The working server is at `dist/server.js` (production-ready)
66
-
2. TypeScript source files in `src/` are reference implementations
67
-
3. Use `npm start` or `node dist/server.js --stdio` to run the server
64
+
-**Error Handling**: Protocol-compliant `McpError` usage throughout
65
+
66
+
## Educational Curriculum Overview
67
+
68
+
**Important**: This is a complete educational curriculum designed for the MCP community, not just a code example.
69
+
70
+
### Learning Structure
71
+
-**3-Week Structured Path**: Fundamentals → Advanced Patterns → Production Readiness
72
+
-**4 Progressive Exercises**: From basic statistics to advanced interactive tools
73
+
-**12 Key Takeaways**: Specific learning outcomes covering all MCP concepts
74
+
-**Comprehensive Best Practices**: Deep dive into SDK patterns and common pitfalls
75
+
-**Production Deployment**: Real-world deployment and monitoring guidance
76
+
77
+
### Build Process & Quality
78
+
1. TypeScript source files in `src/` contain the full implementation
79
+
2.`npm run build` compiles to `dist/server.js` (production-ready)
80
+
3. Code is formatted with Prettier and validated with ESLint
81
+
4. Zero warnings/errors policy maintained
82
+
5. Use `npm start` or `node dist/server.js --stdio` to run the server
83
+
84
+
### Educational Content Structure
85
+
-**Core Learning Objectives**: 5 major areas (Architecture, Security, Protocol, Performance, Type Safety)
The repository represents the gold standard for MCP education - a complete learning ecosystem that transforms beginners into experts through hands-on experience with production-quality code.
203
+
204
+
## 12 Key Learning Outcomes
205
+
206
+
After completing this curriculum, developers will master:
207
+
208
+
1.**Direct Zod schema usage** - No JSON Schema conversion needed
209
+
2.**Type safety throughout** - Let TypeScript do the work
210
+
3.**Simple state management** - Circular buffers over complex stores
211
+
4.**Protocol compliance** - Always use McpError
212
+
5.**Clean architecture** - Single responsibility principle
213
+
6.**Resource completion** - Enhanced user experience
214
+
7.**Proper logging** - stderr for logs, stdout for protocol
**Built with ❤️ as an educational reference for the MCP community**
91
224
92
-
The server is built with the MCP SDK and uses standard protocol methods for maximum compatibility with all MCP clients and the Smithery registry.
225
+
This repository exists to accelerate MCP adoption by providing a complete, world-class learning experience. It demonstrates that building sophisticated MCP servers is achievable when you trust the SDK, follow best practices, and focus on user experience over complexity.
0 commit comments