- bun workspaces + Turborepo monorepo (apps/web, apps/mcp; packages/*, scripts) - @mcpedia/core single business-logic layer (Document/Content/Search services) - @mcpedia/db Drizzle schema: documents + weighted tsvector (GIN) for FTS - @mcpedia/parser frontmatter, @mcpedia/search Postgres FTS (ts_rank+ts_headline) - Next.js 16 Web UI (home/doc SSG, search dynamic) + react-markdown render - MCP server (stdio) with 4 tools + in-memory smoke test - scripts/indexer walks content/ -> upserts into Postgres - 4 seed docs; README + PHASES status
916 B
916 B
id, title, type, tags, status, author, created_at, updated_at
| id | title | type | tags | status | author | created_at | updated_at | |||
|---|---|---|---|---|---|---|---|---|---|---|
| mcp-architecture | MCP Architecture Notes | research |
|
published | asep | 2026-08-19 | 2026-08-19 |
MCP Architecture Notes
The Model Context Protocol (MCP) lets an AI client treat a knowledge base as a first-class context source instead of yet another REST API. The server exposes tools and resources; the client decides what to read.
Tools vs resources
- Tools are actions the model calls (
search_documents,get_document). - Resources are addressable content the model can pull (
mcpedia://docs/...).
Why it matters here
MCPedia exposes both. The Web UI is for humans; the MCP server is for agents. Both go through the same Core layer, so there is exactly one copy of the business logic and one search implementation.
Reference
Related reading: the WebSocket contract and the tRPC type-safe API notes.