feat: implement mcpd core server framework with Fastify

Add Fastify server with config validation (Zod), health/healthz endpoints,
auth middleware (Bearer token + session lookup), security plugins (CORS,
Helmet, rate limiting), error handler, audit logging, and graceful shutdown.
36 tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michal
2026-02-21 04:22:01 +00:00
parent 247b4967e5
commit 47f10f62c7
23 changed files with 860 additions and 10 deletions

View File

@@ -14,12 +14,15 @@
"test:run": "vitest run"
},
"dependencies": {
"fastify": "^5.0.0",
"@fastify/cors": "^10.0.0",
"@fastify/helmet": "^12.0.0",
"@fastify/rate-limit": "^10.0.0",
"zod": "^3.24.0",
"@mcpctl/db": "workspace:*",
"@mcpctl/shared": "workspace:*",
"@mcpctl/db": "workspace:*"
"fastify": "^5.0.0",
"zod": "^3.24.0"
},
"devDependencies": {
"@types/node": "^25.3.0"
}
}