MC-PEA provides a comprehensive implementation and testing framework for MCP (Model Context Protocol) servers, with production-ready authentication and database integrations. The project includes reference implementations, development templates, and extensive validation tools.
mc-pea/
βββ π Documentation
β βββ README.md # This file
β βββ MCP_MASTER_REFERENCE.md # Master reference for all MCP development
β βββ docs/
β β βββ PROJECT_STRUCTURE.md # Detailed project structure
β β βββ REQUIREMENTS.md # Project requirements
β β βββ archive/ # Historical documentation
β
βββ ποΈ Implementation
β βββ mcp-servers/ # Production MCP servers
β β βββ auth-mcp-server/ # Authentication server (Keycloak + Infisical)
β β βββ db-mcp-server/ # Database server (PostgreSQL)
β β
β βββ templates/ # Development templates
β βββ mcp-server-template/ # Canonical template for new servers
β
βββ β
Testing & Validation
β βββ tests/ # All test and validation scripts
β β βββ test-auth-mcp-with-session.js # Primary MCP SDK validation
β β βββ test-database-mcp.js # Database server testing
β β βββ test-architecture-aware-mcp.js # Architecture testing
β β βββ validate-*.js # Various validation scripts
β β
β βββ debug/ # Debug and investigation scripts
β
βββ π§ Configuration
β βββ config/ # MCP client configurations
β βββ .vscode/ # VS Code MCP Inspector config
β βββ .env.example # Environment template
β βββ package.json # Project dependencies
β
βββ π Examples
βββ examples/ # Demo scripts and integrations
βββ setup-everything.sh # Quick setup script
# Clone and configure
git clone <repository>
cd mc-pea
cp .env.example .env
# Edit .env with your configurationcd mcp-servers/auth-mcp-server
npm install
npm run build
npm start# From project root
cd tests
node test-auth-mcp-with-session.js# Copy template
cp -r templates/mcp-server-template my-new-server
cd my-new-server
# Configure and build
cp .env.example .env
npm install
npm run build
npm run test- β Production-Ready Servers: Authentication and database MCP servers
- β Canonical Templates: Clean, validated patterns for new development
- β Comprehensive Testing: MCP SDK client validation and testing suite
- β Docker Deployment: Production containerization with security
- β Authentication Integration: Keycloak and Infisical support
- β Session Management: Proper MCP session and state handling
- β Development Guardrails: AI assistant instructions and protocol compliance
- Transport: StreamableHTTPServerTransport for HTTP-based communication
- Authentication: API key validation via HTTP headers
- Session Management: UUID-based session tracking with isolated state
- Registration: Dynamic tool/resource registration using SDK methods
- Stateful Servers: Database operations with persistent connections
- Stateless Servers: Authentication and utility operations
- Template Server: Minimal example with all patterns
CRITICAL: Read templates/mcp-server-template/prompts/ai-assistant-instructions.md
Key requirements:
- Use MCP SDK transports only (never custom HTTP)
- Use
server.registerTool()for tool registration - Validate with MCP SDK client
- Follow canonical template patterns
- Start with template: Copy
templates/mcp-server-template/ - Follow patterns: Use existing implementations as reference
- Validate thoroughly: Use all test scripts
- Deploy with Docker: Production-ready containerization included
# 1. Template validation
node tests/validate-template.js
# 2. Server implementation
npm run build
npm start
# 3. MCP SDK client testing
node tests/test-auth-mcp-with-session.js
# 4. Architecture-aware testing
node tests/test-architecture-aware-mcp.jsMCP_MASTER_REFERENCE.md- Master index and quick referencetemplates/mcp-server-template/- Canonical implementation patternsmcp-servers/auth-mcp-server/- Production reference implementationtests/test-auth-mcp-with-session.js- Validated client patterns
COMPLETED β :
- Production auth and database MCP servers
- Complete template system with validation
- Comprehensive testing and validation suite
- Development guardrails and documentation
- Docker deployment configurations
READY FOR USE π:
- Copy templates for new MCP servers
- Use validation scripts for any MCP implementation
- Deploy with provided Docker configurations
- Follow established patterns for protocol compliance
Transform frontend applications into full-stack applications by automatically generating production-ready backends that handle:
- Form data processing and validation
- Database operations (PostgreSQL)
- File storage management (NAS CDN)
- RESTful API endpoints
- Deployment automation
- Frontend Analysis: Parse React, Vue, Angular, and other frontend frameworks to understand data requirements
- Backend Generation: Create Golang services with proper architecture and best practices
- Database Integration: Automatic PostgreSQL schema generation and migrations
- File Storage: NAS CDN integration for media and document handling
- Git Integration: Automatic repository creation and management
- Continuous Updates: Keep backends in sync as frontends evolve
Frontend Repository β [Analysis Engine] β Backend Specification β [Generator] β Golang Backend
β
Database Schema + File Storage Config
β
[Deployment] β Production Environment
π§ In Planning Phase - See REQUIREMENTS.md for detailed specifications
This project is in the early planning stages. Contributions to requirements gathering, architecture design, and implementation are welcome!
For rapid local development without Docker hassles:
# Most MCP servers are Node.js/TypeScript - no containers needed
npm install -g @modelcontextprotocol/server-filesystem
npm install -g @modelcontextprotocol/server-github
# Run directly on your machine# Many servers available as Python packages
pip install mcp-server-postgres
pip install mcp-server-keycloak # When we build it
# Native execution, no virtualization# Lightweight Linux environment
wsl --install
# Better than Docker Desktop for development- HTTP APIs: Direct service-to-service calls
- Shared File System: Use Windows file sharing for data exchange
- Local Database: PostgreSQL/Redis running as Windows services
- Message Queues: Use local Redis for async communication
This repository includes an Auth MCP Server template that provides Keycloak and Infisical integration. To validate the deployed server:
- Create a
.envfile with your configuration:
cp .env.example .env
# Edit .env with your actual values:
# AUTH_MCP_URL="https://your-auth-server.com/mcp"
# AUTH_MCP_API_KEY="your-api-key"Option 1: Quick Node.js Validation
node validate-auth-mcp-simple.jsOption 2: Bash Script Validation
chmod +x validate-auth-mcp.sh
./validate-auth-mcp.shOption 3: Manual cURL Tests
# Load environment variables
source .env
# Test health endpoint (no auth)
curl "${AUTH_MCP_URL%/mcp*}/health"
# Test unauthenticated request (should return 401)
curl -X POST -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"initialize","id":1}' \
"$AUTH_MCP_URL"
# Test authenticated request (should work)
curl -X POST -H "Content-Type: application/json" \
-H "API_KEY: $AUTH_MCP_API_KEY" \
-d '{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"1.0","capabilities":{}}}' \
"$AUTH_MCP_URL"For development with MCP Inspector, use the environment-based config:
# Copy the environment-based MCP config
cp .vscode/mcp-env.json .vscode/mcp.json
# Ensure AUTH_MCP_API_KEY is in your environmentThis project includes comprehensive AI assistant guardrails through VS Code Copilot custom modes and instructions:
.github/
βββ copilot-instructions.md # Repository-wide AI guidelines
βββ chatmodes/ # Custom chat modes for specific workflows
β βββ mcp-server-development.chatmode.md # Creating MCP servers
β βββ mcp-server-validation.chatmode.md # Testing and validation
β βββ mcp-troubleshooting.chatmode.md # Debugging and fixes
βββ instructions/ # Domain-specific coding standards
β βββ instructions.instructions.md # General project standards
β βββ mcp-server-architecture.instructions.md # Submodule architecture
β βββ mcp-protocol-compliance.instructions.md # Protocol requirements
βββ prompts/ # Reusable prompt templates
βββ create-mcp-server.prompt.md # Server creation workflow
βββ validate-mcp-server.prompt.md # Validation procedures
βββ debug-mcp-server.prompt.md # Debugging assistance
- MCP Server Development: Comprehensive development mode with template enforcement and validation workflows
- MCP Server Validation: Testing and compliance checking with systematic validation procedures
- MCP Troubleshooting: Systematic debugging with guided troubleshooting and proven solutions
Critical Context: The Model Context Protocol (MCP) is NOT in AI training data. The guardrails ensure:
- Template Compliance: Always reference
templates/mcp-server-template/for canonical patterns - Protocol Adherence: Mandatory use of MCP SDK transports and proper tool registration
- Validation Requirements: All servers must pass MCP SDK client testing
- Security Standards: Integration with Keycloak and Infisical, proper input validation
- Submodule Architecture: Each server in
mcp-servers/is independent with own tests and docs
These guardrails prevent common MCP development mistakes and ensure all AI-assisted development follows proven patterns from the working reference implementations.
MIT License - Feel free to use this for your own projects!
"Bridging the gap between frontend dreams and backend reality"