Context Pods
Context-Pods is a comprehensive development framework for creating, testing, and managing Model Context Protocol (MCP) servers. It provides a Meta-MCP Server that can generate other MCP servers through natural language descriptions or by wrapping existing scripts.
README
Context-Pods
The MCP development framework that creates MCP servers
Context-Pods is a comprehensive development framework for creating, testing, and managing Model Context Protocol (MCP) servers. It provides a Meta-MCP Server that can generate other MCP servers through natural language descriptions or by wrapping existing scripts.
🚀 Quick Start
# Install and run Context-Pods CLI
npx @context-pods/create
# Or install globally
npm install -g @context-pods/cli
context-pods generate
✨ Features
🎯 Multiple Language Support
Create MCP servers in your preferred language:
- TypeScript - Full type safety with TurboRepo optimization
- Python - Async support with built-in data science tools
- Rust - High-performance servers with Tokio async runtime
- Shell - Wrap existing CLI tools and scripts as MCP servers
- JavaScript - Simple, no-build-step servers (coming soon)
🤖 Meta-MCP Server
The Meta-MCP Server exposes Context-Pods functionality through the MCP protocol itself:
{
"tools": [
"create-mcp", // Generate servers from descriptions
"wrap-script", // Convert scripts to MCP servers
"list-mcps", // Manage existing servers
"validate-mcp", // Validate MCP compliance
"analyze-codebase" // AI-powered MCP opportunity detection
]
}
🛠️ Advanced Features
- AI-Powered Analysis - Automatically identify MCP opportunities in existing codebases
- TurboRepo Integration - Optimized builds and caching
- Hot Reloading - Live development with automatic restarts
- Comprehensive Testing - Built-in MCP protocol compliance tests with 95%+ coverage
- Schema Validation - Zod-based runtime validation
- Multi-Transport Support - stdio, HTTP, and WebSocket
- Production Ready - Error handling, logging, and monitoring
📦 Templates
Basic Templates
basic (TypeScript)
Minimal TypeScript MCP server with essential features:
context-pods generate basic --name my-server
python-basic
Self-contained Python server with async support:
context-pods generate python-basic --name my_python_server
rust-basic
High-performance Rust server with Tokio:
context-pods generate rust-basic --name my_rust_server
shell-wrapper
Expose shell scripts and CLI tools via MCP:
context-pods generate shell-wrapper --name my_cli_wrapper
Advanced Templates
typescript-advanced
Full-featured TypeScript server with utilities, validation, and testing:
context-pods generate typescript-advanced --name my-advanced-server
🤖 AI-Powered Codebase Analysis
Context-Pods includes an intelligent codebase analyzer that identifies functions in your existing code that would make excellent MCP tools. This feature helps you discover MCP opportunities and provides implementation guidance.
How It Works
The analyzer uses a multi-phase approach:
- File Discovery - Recursively scans your codebase with intelligent filtering
- AST Parsing - Extracts function metadata using language-specific parsers
- Pattern Detection - Identifies MCP-suitable patterns (API calls, file operations, etc.)
- Scoring Algorithm - Ranks functions using a sophisticated scoring system (0-100)
- Template Matching - Suggests the best template for each opportunity
Supported Languages
- TypeScript/JavaScript - Full AST analysis with type information
- Python - AST-based function extraction (coming soon)
- Rust/Go - Pattern-based analysis (planned)
- Shell - Script pattern detection (planned)
Usage Examples
# Basic analysis
context-pods analyze ./src
# With filtering and output options
context-pods analyze ./src --min-score 80 --format summary --max-results 5
# Language-specific analysis
context-pods analyze ./src --languages typescript,python
# Include test files
context-pods analyze ./src --include-tests
Via Meta-MCP Server
{
"tool": "analyze-codebase",
"arguments": {
"path": "./src",
"minScore": 70,
"outputFormat": "detailed",
"maxResults": 10
}
}
What It Detects
The analyzer identifies functions with:
- API Integration Patterns - HTTP clients, REST calls, GraphQL queries
- File Processing Operations - File I/O, data transformation, parsing
- Database Interactions - SQL queries, ORM operations, data validation
- Utility Functions - Data validation, formatting, conversion
- External Service Integrations - Third-party API usage
Scoring Factors
Functions are scored based on:
- Complexity - Sweet spot is medium complexity (3-15 cyclomatic complexity)
- Accessibility - Exported functions score higher
- Documentation - Well-documented functions are preferred
- Parameters - Clear input parameters (1-5 params optimal)
- Patterns - Detected MCP-suitable patterns boost scores
- Async Nature - Async functions often perform useful I/O operations
Sample Output
🎯 Top MCP Opportunities Found (Score: 85+)
📁 src/api/weather.ts
└── fetchWeatherData (Score: 92/100)
├── Category: API Integration
├── Template: typescript-advanced
├── Complexity: Medium (8 cyclomatic)
├── Patterns: HTTP calls, JSON parsing
└── Reasoning:
• Exported async function with clear parameters
• Makes external API calls (confidence: 0.9)
• Well-documented with TypeScript types
• Optimal complexity for MCP tool
📁 src/utils/validator.ts
└── validateUserInput (Score: 88/100)
├── Category: Validation
├── Template: basic
├── Complexity: Low (4 cyclomatic)
├── Patterns: Zod validation, error handling
└── Implementation Guidance:
• Tool Name: validate-user-input
• Input Schema: { data: object, rules: string[] }
• Dependencies: zod, validator
• Estimated Effort: Low
🔧 CLI Commands
# Generate a new MCP server
context-pods generate [template] [options]
# Wrap an existing script as MCP server
context-pods wrap <script> [options]
# List all managed MCP servers
context-pods list
# Run development server with hot reload
context-pods dev
# Build all packages
context-pods build
# Run tests
context-pods test
# Validate MCP compliance
context-pods validate <path>
# Analyze codebase for MCP opportunities
context-pods analyze <path>
🏗️ Architecture
Context-Pods uses a monorepo structure powered by TurboRepo:
context-pods/
├── packages/
│ ├── core/ # Core utilities, schemas, and codebase analysis
│ ├── cli/ # Command-line interface
│ ├── templates/ # Server templates
│ ├── testing/ # MCP testing framework
│ ├── server/ # Meta-MCP server
│ └── create/ # npx runner
├── docs/ # Documentation
└── examples/ # Example implementations
🔌 Integration
Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"context-pods": {
"command": "npx",
"args": ["@context-pods/server"]
}
}
}
VS Code (Cody, Continue)
Configure in your extension settings:
{
"mcp.servers": {
"context-pods": {
"command": "npx",
"args": ["@context-pods/server"]
}
}
}
🧪 Testing
Context-Pods includes a comprehensive testing framework:
import { validateMCPServer, testHarness } from '@context-pods/testing';
// Validate MCP compliance
const validation = await validateMCPServer('./my-server');
// Test server communication
const harness = testHarness('./my-server');
await harness.testTool('my-tool', { input: 'test' });
📚 Documentation
🧪 Test Coverage
Context-Pods maintains comprehensive test coverage across all packages:
Coverage by Package
| Package | Coverage | Tests | Description |
|---|---|---|---|
@context-pods/server |
95%+ | 287+ | MCP server tools, registry, and protocol handling |
@context-pods/cli |
90%+ | 150+ | CLI commands, caching, and output formatting |
@context-pods/core |
90%+ | 75+ | Template engine, language detection, and utilities |
@context-pods/testing |
95%+ | 45+ | MCP protocol compliance and script wrapper testing |
@context-pods/templates |
85%+ | 25+ | Template validation and structure verification |
@context-pods/create |
75%+ | 30+ | NPX runner and package installation |
Test Categories
- Unit Tests - Individual function and class testing
- Integration Tests - End-to-end workflow validation
- Protocol Compliance - MCP specification adherence
- Template Validation - Generated code quality assurance
- Error Handling - Resilience and recovery testing
- Performance Tests - Scalability and resource usage
Quality Assurance
- Pre-commit Hooks - Automated linting, type-checking, and testing
- CI/CD Pipeline - Continuous testing on multiple Node.js versions
- Coverage Tracking - Minimum 80% coverage requirement
- Mutation Testing - Advanced test quality verification
Run tests locally:
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run specific package tests
npm test --workspace=@context-pods/server
# Run integration tests
npm run test:e2e
Development Setup
# Clone the repository
git clone https://github.com/conorluddy/ContextPods.git
cd ContextPods
# Install dependencies
npm install
# Build all packages
npm run build
# Run tests
npm test
# Start development
npm run dev
📈 Roadmap
- [ ] Additional language templates (Go, Ruby, Java)
- [ ] Visual template builder
- [ ] MCP server marketplace
- [ ] Cloud deployment options
- [ ] Performance profiling tools
- [ ] GraphQL transport support
📄 License
MIT © Conor Luddy
🙏 Acknowledgments
Built with the Model Context Protocol SDK by Anthropic.
<p align="center"> <i>Context-Pods: Where context creates context</i> </p>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。