feat: add MCP server skeleton
This commit is contained in:
@@ -406,3 +406,38 @@ All five tool handlers are implemented and tested:
|
||||
---
|
||||
|
||||
Phase 2 complete. Phase 3 complete. Phase 4 complete. Phase 5 next: MCP Server and Tool Registration.
|
||||
|
||||
---
|
||||
|
||||
## Phase 5 - MCP Server and Tool Registration
|
||||
|
||||
### Task 5.1 - MCP server skeleton
|
||||
|
||||
Create the minimal runnable MCP server in `src/server.js`.
|
||||
|
||||
**Requirements:**
|
||||
- Use `McpServer` from `@modelcontextprotocol/sdk/server/mcp.js`.
|
||||
- Use `StdioServerTransport` from `@modelcontextprotocol/sdk/server/stdio.js`.
|
||||
- Create server with name `"chatgpt-mcp"` and version `"0.1.0"`.
|
||||
- Connect over stdio transport.
|
||||
- Register no tools yet.
|
||||
- Import no tool handlers yet.
|
||||
- Do not load config.
|
||||
- Do not call OpenAI.
|
||||
- Keep it minimal (~15 lines).
|
||||
|
||||
**Smoke test:**
|
||||
```bash
|
||||
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke-test","version":"0.0.1"}}}' | npm start
|
||||
```
|
||||
|
||||
Expected: process starts, no import/runtime crash, MCP initialize response returned with correct `serverInfo.name` and `serverInfo.version`.
|
||||
|
||||
Status: ✅ Complete
|
||||
|
||||
**What Task 5.1 established:**
|
||||
- MCP stdio server skeleton is operational.
|
||||
- MCP initialize handshake succeeds.
|
||||
- No tools registered yet — that belongs to Task 5.2.
|
||||
|
||||
### Task 5.2 - Register ask_chatgpt MCP tool (NEXT)
|
||||
|
||||
Reference in New Issue
Block a user