MCP Project Template
by th-an
MCP Project Template
A universal, architecture-agnostic blueprint for building Model Context Protocol servers.
Quick Start
# Install
pip install -e ".[dev]"
# Run tests
pytest tests/ -v
# Start server
python -m mcp_server.serverProject Structure
src/mcp_server/
├── server.py # MCP server entry point
├── engine/ # Domain logic (pure computation)
├── store/ # Persistence layer
├── security/ # Encryption, attestation
├── export/ # Output format renderers
├── ingest/ # Data ingestion pipeline
├── forensics/ # Analysis/detection modules
└── mcp/ # MCP protocol layerConfiguration
Set environment variables:
export MCP_PROJECT_DB_PATH=/path/to/database.db
export MCP_PROJECT_ENC_KEY=your-base64-encoded-keyTesting
# All tests
pytest tests/ -v
# Determinism tests
pytest tests/test_determinism.py -v
# With coverage
pytest tests/ --cov=mcp_serverLicense
MIT