Architecture

Architecture

Einstein MCP is a lightweight MCP server built on the official mcp-go library and served over stdio.

Key Components

  • cmd/mcp/main.go - Entry point, flag parsing, and server bootstrap.
  • internal/tools/knowledge - KnowledgeManager and MCP tools for memory operations.
  • internal/prompts - The memorize-project setup prompt.

Data Flow

  1. An MCP client sends a tool call over stdio.
  2. The MCP server routes the request to a knowledge tool.
  3. The tool reads or writes .mdk files in .ai-knowledge.
  4. The response is returned to the client.