chore: deep-init

Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
2026-04-21 20:46:29 -04:00
parent c58d614948
commit 86191e7a45
8 changed files with 154 additions and 867 deletions

View File

@@ -0,0 +1,25 @@
# packages/mcp-server
## Scope
- This package is the MCP/JSON-RPC adapter over the API server.
- `src/protocol/tools.ts` defines tool schemas.
- `src/protocol/handler.ts` maps tool calls to API requests and JSON-RPC responses.
- `src/protocol/metadata.ts` exposes discovery metadata and protocol versioning.
## Keep In Sync
- Tool definitions, handler argument mapping, and server metadata must stay consistent.
- When adding or renaming a tool, update `tools.ts` and `handler.ts` together.
- If protocol version or server-card details change, update both `metadata.ts` and initialize responses in `handler.ts`.
## Protocol Rules
- Use MCP/JSON-RPC error codes and response envelopes, not ad-hoc API-style payloads.
- Keep this layer transport-focused. Marketplace behavior belongs in `packages/core`; HTTP semantics belong in `packages/api-server`.
- Preserve the current tool result shape unless the protocol contract is being changed deliberately: text content with JSON-stringified API results.
## Verify
- `bun run --cwd packages/mcp-server build`
- `bun run ci`