architecture-pattern-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@architecture-pattern-mcpDesign a scalable architecture for a real-time chat application."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
architecture-pattern-mcp
An MCP (Model Context Protocol) server that provides architecture design expertise to AI coding agents. Given a requirements string and a domain, it analyses the problem, selects matching architecture patterns (from 36 built-in patterns), generates a concrete architecture design with components, relationships, API contracts, data models, and event contracts, and evaluates it against quality attributes (maintainability, scalability, reliability, security, performance).
Table of Contents
Related MCP server: MarkdownLM MCP Server
โก Quickstart
# 1. Clone
git clone https://github.com/architecture-pattern/architecture-pattern-mcp.git
cd architecture-pattern-mcp
# 2. Add your API key
export GENERATOR_API_KEY=your_key_here
# 3. Start (Docker builds + starts everything)
docker compose -f docker/docker-compose.yml up --build
# 4. Verify
make docker-verifyServer starts on streamable-http at http://localhost:8050/mcp. Then connect your agent below.
๐ Connect Your Agent
Claude Code
# Install (one-time)
uv pip install -e .
# Run as stdio subprocess โ pass API key via env
claude mcp add architecture-pattern \
-e GENERATOR_API_KEY=your_key \
-e GENERATOR_PROVIDER=openai \
-- architecture-pattern-mcp --transport stdioOr add to your project for the whole team:
claude mcp add --scope project architecture-pattern \
-e GENERATOR_API_KEY=your_key \
-- architecture-pattern-mcp --transport stdioOpenCode
OpenCode uses HTTP transport. Start the server first, then configure opencode:
# Terminal 1: start the server
docker compose -f docker/docker-compose.yml up --build
# or locally:
uv run python -m src.main --port 8050
# Terminal 2: add to ~/.config/opencode/opencode.json{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"architecture-pattern": {
"type": "remote",
"url": "http://localhost:8050/mcp"
}
}
}Note:
GENERATOR_API_KEYis read from the server's config file (~/.config/architecture-pattern-mcp/config.json), not from opencode's environment.
Codex CLI
# Install (one-time)
uv pip install -e .Add to ~/.codex/config.toml:
[mcp_servers.architecture-pattern]
command = "architecture-pattern-mcp"
args = ["--transport", "stdio"]
[mcp_servers.architecture-pattern.env]
GENERATOR_API_KEY = "your_key"
GENERATOR_PROVIDER = "openai"Or via CLI:
codex mcp add architecture-pattern \
-e GENERATOR_API_KEY=your_key \
-- architecture-pattern-mcp --transport stdioUse the Tools
Design your first architecture
In Claude Code (or your agent), try:
Build a scalable ETL pipeline for IoT sensor data: ingest 10k events/sec
from Kafka, parse JSON, enrich with geolocation from Redis, write to InfluxDB
and S3.Then call the design_architecture tool with:
requirements: "ETL pipeline for IoT sensor data: ingest 10k events/sec from Kafka, parse JSON, enrich with geolocation from Redis, write to InfluxDB and S3"domain: "data-processing"style: "pipe-and-filter"
The server returns a full architecture design: components (Kafka source, JSON parser filter, geolocation enricher, InfluxDB sink, S3 sink), quality attribute scores (scalability: 9.1, maintainability: 8.2, โฆ), and specific recommendations.
Explore the pattern catalog
Ask your agent to list all available patterns:
Call list_architecture_patterns() with no filters to see all 36 patterns.Or get details on a specific pattern:
Show me the event-driven architecture pattern.๐ ๏ธ Tools at a Glance
Tool | Description |
| Analyse requirements and domain โ recommended style, patterns, quality metrics |
| Generate an architecture design from requirements and selected patterns |
| Score an existing design against quality attributes |
| Full pipeline: analyse โ generate โ evaluate โ refine (up to 3 attempts) |
| List all 36 patterns; filter by |
| Get full JSON for a specific pattern by name |
Domain and Style are structured parameters โ pass them as separate tool arguments, not embedded in the requirements text.
Example prompts:
Build a scalable distributed system for processing IoT sensor data with
100k events per second throughput, written in Python, deployed on Kubernetes.Design an architecture for an e-commerce platform handling flash-sales events.
Domain: e-commerce. Style: microservices.Show me details about the blackboard pattern.๐ Pattern Catalog
Via MCP tools (recommended โ works in all clients)
list_architecture_patterns() # all 36 patterns
list_architecture_patterns(category="messaging") # filter by category
list_architecture_patterns(domain="microservices") # filter by domain
get_architecture_pattern(name="event-driven") # full pattern JSONValid category values: messaging, structural, cloud, data, ai_cognitive, specialized, api_gateway, coordination, dataflow, presentation.
Via MCP resources
mcp_list_resources(server="architecture-pattern")
mcp_read_resource(server="architecture-pattern", uri="pattern://microservices")Pattern JSON structure
Each pattern includes: name, category, context, benefits, tradeoffs, quality_attributes (scalability/maintainability/reliability/security/performance/simplicity, scores 1โ10), suitable_domains, component_types, technology_stack, design_principles, best_practices.
Install Alternatives
Docker (manual)
# Build the image
make docker-build
# Run with your API key
MINIMAXAI_API_KEY=your_key docker compose -f docker/docker-compose.yml up -dLocal Development (uv)
Prerequisites: Python 3.12+, uv
# Install
make install
# Configure
cp config/config.json ~/.config/architecture-pattern-mcp/config.json
# Edit ~/.config/architecture-pattern-mcp/config.json and set your GENERATOR_API_KEY
# Run the server
uv run python -m src.main --transport stdio # for Claude Code / Codex
uv run python -m src.main --port 8050 # for OpenCode (HTTP, default)Or use the installed console script (after make install):
architecture-pattern-mcp --transport stdioThe TEI embedder (Qwen3-Embedding-0.6B) is required for domain-scoped pattern retrieval. Without it, the server falls back to the default pattern. Docker compose starts it automatically; local users must run it separately on port 8080.
Configuration
config.json
The server reads ~/.config/architecture-pattern-mcp/config.json (override with --config-path):
{
"generator": {
"provider": "openai",
"config": {
"model": "gpt-4o-mini",
"base_url": "https://api.openai.com/v1",
"api_key": "{env:GENERATOR_API_KEY}"
}
},
"embedder": {
"provider": "tei",
"config": {
"model": "data/qwen3-embedding-0.6b",
"base_url": "http://127.0.0.1:8080/v1",
"embedding_dim": 1024
}
},
"retrieval": {
"bm25_top_k": 0,
"dense_top_k": 0,
"top_k_patterns": 5,
"mode": "reciprocal_rerank",
"min_quality_score": 50.0
},
"pattern_directory": "~/.config/architecture-pattern-mcp/pattern"
}{env:VAR:-default} syntax expands environment variables at load time.
Key environment variables
Variable | Default | Description |
| (required) | API key for your LLM provider |
|
| Provider: |
|
| API base URL |
|
| Model name |
|
| TEI embedder URL |
|
| Config file path |
CLI flags
Flag | Description |
| Override transport mode |
| Override HTTP bind host (default: 0.0.0.0) |
| Override HTTP port (default: 8050) |
| Path to config file |
| Run health check and exit |
Extending with Custom Patterns
Pattern files are loaded from ~/.config/architecture-pattern-mcp/pattern/ (configurable via PATTERN_DIRECTORY). Drop a JSON file alongside the 36 built-in patterns.
Minimal pattern structure:
{
"category": "structural",
"name": "my-custom-pattern",
"context": "Describe when this pattern applies.",
"benefits": ["Benefit 1", "Benefit 2"],
"tradeoffs": ["Tradeoff 1"],
"quality_attributes": {
"scalability": 7,
"maintainability": 8,
"reliability": 7,
"security": 6,
"performance": 7,
"simplicity": 5
}
}Required fields: category, name, context, benefits, tradeoffs, quality_attributes.
Valid category values: messaging, structural, cloud, data, ai_cognitive, specialized, api_gateway, coordination, dataflow, presentation.
Full JSON Schema with all enums: docs/pattern-schema.json
Troubleshooting
Server starts but tools are not visible
Check the agent's MCP connection: Claude Code
/mcp, OpenCodeopencode mcp list, Codexcodex mcp listVerify the server process started: compose logs should show
MCPArchitectServer initializedConfirm the TEI embedder is healthy:
curl http://127.0.0.1:8080/healthinside the container
"Connection refused" or timeout errors
The server waits for the TEI embedder to become healthy:
docker compose -f docker/docker-compose.yml logs teiLLM provider errors (502 / 401)
Confirm
GENERATOR_API_KEYis set and not expiredVerify
GENERATOR_BASE_URLmatches your provider's endpointIf using a proxy, check reachability from inside the container
Pattern JSON files not loading
Files must have
.jsonextensionRequired fields:
category,name,context,benefits,tradeoffs,quality_attributesValidate against
docs/pattern-schema.json
Building & Development
Common make targets:
Target | Description |
| Install package in editable mode with dev dependencies |
| Run ruff linting |
| Auto-fix lint issues and format |
| Run pyright type checking |
| Run integration tests |
| Run the example MCP client demo (requires server running) |
| Build the production Docker image |
| Build and start all services |
| Stop all services |
| Smoke-test the running MCP server |
| Run unit tests inside Docker |
Development workflow:
make install # First-time setup
make lint typecheck # Before pushing
make docker-up && make docker-verify # Start and verify
make docker-logs-follow # Watch logs
make docker-down # StopLicense
MIT License. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAssists AI developers with intelligent requirement analysis and architecture design through guided clarification questions, branch-aware management, and automated architecture generation with persistent storage.133MIT

MarkdownLM MCP Serverofficial
FlicenseAqualityCmaintenanceProvides a persistent memory and governance layer that allows AI coding agents to query documented architecture rules and validate code against team standards. It enables agents to verify compliance across categories like security and testing before suggesting changes to ensure consistency across development sessions.317- AlicenseAqualityBmaintenanceAn architecture consulting server that reviews multi-agent systems against a knowledge graph of patterns derived from expert literature. It provides grounded recommendations with chapter citations, maturity scoring, and interactive architecture diagrams to identify and fix structural gaps.175AGPL 3.0
- Alicense-qualityAmaintenanceProvides architectural memory for AI coding agents, enabling reuse of existing abstractions and advisory-first guidance on code placement and imports.9MIT
Related MCP Connectors
Design intelligence for coding agents: audits, design systems, and a taste profile agents consult.
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
Architecture-grounded query for AI agents. Governance constraints, system dependencies, evidence.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/olk/architecture-pattern-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server