How purrify4/servers works
Project type and purpose
• This is an open-source monorepo of reference implementations for the Model Context Protocol (MCP).
• It contains dozens of independent “server” packages (e.g., aws-kb-retrieval-server, brave-search, git, postgres, sqlite, etc.), each exposing a set of tools over the MCP transport (STDIO or SSE) for LLM clients to tap into external services and data sources.
Top-level file structure and indicators of architecture
• .github/workflows/: CI/CD pipelines for TypeScript, Python, release automation, version checks
• package.json + package-lock.json + scripts/: orchestrate builds, tests, and publishing to npm or PyPI
• src/
• One directory per MCP server implementation
• Each contains a README.md, a language-specific entrypoint (index.ts or server.py), a Dockerfile, and its own package.json or Python packaging files
• tsconfig.json: overarching TypeScript compiler config
Key components
A. Monorepo Codebase
• Single GitHub repo with multiple MCP server modules
• Shared CI/CD configs and release scripts
B. CI/CD Pipeline (GitHub Actions)
• Jobs:
• Lint / compile / test TypeScript packages
• Lint / test Python packages
• Build Docker images for each server
• Publish npm packages and PyPI artifacts
C. Artifact Registries
• npm registry (for TypeScript-based servers)
• PyPI (for Python-based servers)
• Docker registry (for Docker images, optional)
D. MCP Clients
• CLI wrappers: npx @modelcontextprotocol/server-<name>
• uvx or pip install mcp-server-<name>
• LLM UI clients (e.g., Claude Desktop) configured to spawn these servers as subprocesses or over SSE
E. Individual Server Modules
• Each is a microservice implementing the MCP interface
• Transport layers: STDIO or Server-Sent Events
• Core logic: translates MCP tool calls into external API calls (e.g., GitHub REST, AWS Bedrock, PostgreSQL queries, file system operations)
F. External Services & Data Sources
• Web APIs (GitHub, GitLab, Brave Search, Google Maps, etc.)
• Databases (Postgres, SQLite, Redis, Memory graph)
• Cloud services (AWS KB, Sentry, GDrive, etc.)
• Local filesystem, code repositories
Relationships and data flow
1. Developer commits code → GitHub
2. GitHub Actions CI builds & tests each language SDK sub-project → publishes to registries
3. User / LLM client invokes a server:
a. npx @modelcontextprotocol/server-memory or uvx mcp-server-git
b. Client spawns the process (STDIO/SSE) and sends JSON‐RPC style MCP requests
4. Server module receives requests → uses its SDK to call external service → returns structured JSON results
5. LLM client ingests results, grounds its reasoning
Architectural patterns and design principles
• Microservice modules: each server folder is a standalone package, Dockerfile, and tests
• Monorepo with tooling cohesion: shared CI, release scripts, linting across TS and Python
• Transport abstraction: servers can communicate over STDIO or HTTP/SSE without changing core logic
• Extensible plug-in style: add new servers simply by dropping a folder under src/ and configuring its build
Technologies and frameworks
• TypeScript + Node.js + @modelcontextprotocol/typescript-sdk
• Python + modelcontextprotocol Python SDK + uvx packaging
• Docker for containerizing each server
• GitHub Actions for CI/CD
• npm & PyPI for distribution
• STDIO & Server-Sent Events for transport
Elements
• Clear component labels (e.g., “GitHub Actions CI”, “npm Registry”, “MCP Server: postgres”, “LLM Client”)
• Repositories & code (e.g., blue rectangles)