feat: add MCP server skeleton
This commit is contained in:
+7
-4
@@ -51,12 +51,15 @@ All five MCP tool handlers are complete:
|
|||||||
|
|
||||||
Total: 139 orchestration-only tests, all passing.
|
Total: 139 orchestration-only tests, all passing.
|
||||||
|
|
||||||
|
## Completed (Phase 5)
|
||||||
|
|
||||||
|
### Task 5.1 - MCP server skeleton ✅
|
||||||
|
|
||||||
|
Minimal MCP stdio server in `src/server.js`. MCP initialize handshake succeeds. No tools registered yet.
|
||||||
|
|
||||||
## Next Pending
|
## Next Pending
|
||||||
|
|
||||||
### Phase 5 - MCP Server and Tool Registration
|
### Task 5.2 - Register ask_chatgpt MCP tool
|
||||||
|
|
||||||
- Register the five tools with the MCP server.
|
|
||||||
- Implement the stdio server.
|
|
||||||
|
|
||||||
## General Rules
|
## General Rules
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -7,7 +7,7 @@ ChatGPT MCP Server
|
|||||||
## Status
|
## Status
|
||||||
|
|
||||||
Planning complete.
|
Planning complete.
|
||||||
Phase 0 complete. Phase 1 complete. Phase 2 complete. Phase 3 complete. Task 4.1 complete. Task 4.2 complete. Task 4.3 complete. Task 4.4 complete. Task 4.5 complete. Phase 4 complete.
|
Phase 0 complete. Phase 1 complete. Phase 2 complete. Phase 3 complete. Task 4.1 complete. Task 4.2 complete. Task 4.3 complete. Task 4.4 complete. Task 4.5 complete. Phase 4 complete. Task 5.1 complete.
|
||||||
|
|
||||||
## Current Phase
|
## Current Phase
|
||||||
|
|
||||||
@@ -36,6 +36,7 @@ Phase 5 - MCP Server and Tool Registration
|
|||||||
- Task 4.3 — review_code MCP tool handler (`src/tools/review-code.js`, `test/tools/review-code.test.js`) ✅
|
- Task 4.3 — review_code MCP tool handler (`src/tools/review-code.js`, `test/tools/review-code.test.js`) ✅
|
||||||
- Task 4.4 — debug_issue tool handler (`src/tools/debug-issue.js`, `test/tools/debug-issue.test.js`) ✅
|
- Task 4.4 — debug_issue tool handler (`src/tools/debug-issue.js`, `test/tools/debug-issue.test.js`) ✅
|
||||||
- Task 4.5 — architecture_review tool handler (`src/tools/architecture-review.js`, `test/tools/architecture-review.test.js`) ✅
|
- Task 4.5 — architecture_review tool handler (`src/tools/architecture-review.js`, `test/tools/architecture-review.test.js`) ✅
|
||||||
|
- Task 5.1 — MCP server skeleton (`src/server.js`) ✅
|
||||||
|
|
||||||
## Phase 3 Completion Summary
|
## Phase 3 Completion Summary
|
||||||
|
|
||||||
@@ -85,3 +86,7 @@ All five tool handlers are implemented and tested:
|
|||||||
- No MCP tool registration yet.
|
- No MCP tool registration yet.
|
||||||
- No server or router code yet.
|
- No server or router code yet.
|
||||||
- That belongs to Phase 5.
|
- That belongs to Phase 5.
|
||||||
|
|
||||||
|
## Next Pending
|
||||||
|
|
||||||
|
### Task 5.2 - Register ask_chatgpt MCP tool
|
||||||
|
|||||||
@@ -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 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)
|
||||||
|
|||||||
+9
-1
@@ -1 +1,9 @@
|
|||||||
// MCP stdio server entry point.
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
||||||
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
||||||
|
|
||||||
|
const server = new McpServer({
|
||||||
|
name: "chatgpt-mcp",
|
||||||
|
version: "0.1.0"
|
||||||
|
});
|
||||||
|
|
||||||
|
await server.connect(new StdioServerTransport());
|
||||||
|
|||||||
Reference in New Issue
Block a user