Title#
feat(sm-1a): scaffold MCP platform server module with stdio transport
Problem#
Skills invoke gh CLI directly (84 call sites across 14 skills), breaking when the task originates from a non-GitHub platform (Bitbucket/Jira). SM-1A lays the foundation for replacing those calls with a platform-agnostic MCP server.
Task / Link#
Closes #615 — SM-1A: MCP module + server scaffold + stdio transport
Part of EPIC #610 — Skills → MCP Platform Tools
Plan: agent-core-artefacts/docs/planning/skills-mcp-platform/plan.md
Changes#
- Added
src/mcp/mcp.module.ts— NestJS module exportingToolRegistryandMcpPlatformServer - Added
src/mcp/server.ts—McpPlatformServerservice booting@modelcontextprotocol/sdkstdio transport; pre-registers all 21 tools as no-ops; wired viaMcpModule - Added
src/mcp/tool-registry.ts— injectable in-memory tool registry withregister/has/get/call/list/size - Added
src/mcp/tool-names.ts— canonical list of 21v1.*tool names derived from the plan's tool surface - Added
src/mcp/errors.ts—McpError,NotImplementedError,ToolNotFoundErrorerror classes with stable string codes - Added
bin/mcp-platform.ts— subprocess entrypoint:NestFactory.createApplicationContext(McpModule), resolvesMcpPlatformServer, starts stdio transport; handlesSIGINT/SIGTERM - Added
@modelcontextprotocol/sdkandzoddependencies
Notes#
- All 21 tools are registered as no-ops throwing
NotImplementedError; SM-1B..1F will replace handlers with real dispatchers McpModuledoes not auto-start the server — it is started bybin/mcp-platform.tsto keep the HTTP server unaffected- PR targets
rc/skills-mcp-platform, notmaster(per EPIC RC branch strategy)
Testing#
npm run lint— clean (zero warnings)npm run test— 1014 tests, 65 suites, all pass including newserver.spec.ts,tool-registry.spec.ts,errors.spec.ts- Smoke test in
test/mcp-smoke.e2e-spec.ts:tools/listover stdio returns all 21 tool names tools/call <any>throwsNotImplementedError