MCP server that provides architecture design expertise to AI coding agents
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add architecture-pattern-mcp -- python -m -e{
"mcpServers": {
"architecture-pattern-mcp": {
"command": "python",
"args": ["-m", "src.main"],
"env": {
"GENERATOR_API_KEY": "<generator_api_key>"
}
}
}
}GENERATOR_API_KEYMCP Servers overview
# architecture-pattern-mcp
[](https://github.com/olk/architecture-pattern-mcp/actions)
[](https://www.python.org/downloads/)
[](LICENSE)
[](https://m8ven.ai/mcp/olk-architecture-pattern-mcp-1x6yt9)
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 40 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
- [⚡ Quickstart](#-quickstart)
- [🔌 Connect Your Agent](#-connect-your-agent)
- [Claude Code](#claude-code)
- [OpenCode](#opencode)
- [Codex CLI](#codex-cli)
- [🧑🏫 SKILL for AI Agents](#-skill-for-ai-agents)
- [🧪 Use the Tools](#-use-the-tools)
- [Design your first architecture](#design-your-first-architecture)
- [Explore the pattern catalog](#explore-the-pattern-catalog)
- [🛠️ Tools at a Glance](#️-tools-at-a-glance)
- [📖 Pattern Catalog](#-pattern-catalog)
- [Install Alternatives](#install-alternatives)
- [Docker (manual)](#docker-manual)
- [Local Development (uv)](#local-development-uv)
- [Configuration](#configuration)
- [Structured Reasoning (shannonthinking / code-reasoning)](#structured-reasoning-shannonthinking--code-reasoning)
- [Extending with Custom Patterns](#extending-with-custom-patterns)
- [Long-running tools & timeouts](#long-running-tools--timeouts)
- [Troubleshooting](#troubleshooting)
- [Building & Development](#building--development)
- [Publishing](#publishing)
- [systemd Service (Linux)](#systemd-service-linux)
- [License](#license)
---
## ⚡ Quickstart
```bash
# 1. Clone
git clone https://github.com/olk/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. Demo
make client
```
Server starts on **streamable-http** at `http://localhost:8060/mcp` (dev compose host port; systemd uses 8050). Then connect your agent below.
---
## 🔌 Connect Your Agent
### Claude Code
```bash
# 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 stdio
```
Or add to your project for the whole team:
```bash
claude mcp add --scope project architecture-pattern \
-e GENERATOR_API_KEY=your_key \
-- architecture-pattern-mcp --transport stdio
```
### OpenCode
OpenCode uses HTTP transport. Start the server first, then configure opencode:
```bash
# 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
```
```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"architecture-pattern": {
"type": "remote",
"url": "http://localhost:8060/mcp"
}
}
}
```
> **Note:** `GENERATOR_API_KEY` is read from the server's config file (`~/.config/architecture-pattern-mcp/config.json`), not from opencode's environment.
### Codex CLI
```bash
# Install (one-time)
uv pip install -e .
```
Add to `~/.codex/config.toml`:
```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:
```bash
codex mcp add architecture-pattern \
-e GENERATOR_API_KEY=your_key \
-- architecture-pattern-mcp --transport stdio
```
---
## 🧑🏫 SKILL for AI Agents
The SKILL in `skills/architecture-pattern-mcp/` is written for **Oh My Pi (OMP)**, where this server's tools are reached as `xd://mcp__architecture_pattern_*` devices and every MCP request is bounded by a deadline (`OMP_MCP_TIMEOUT_MS` → per-server `timeout` → 30 s). It teaches the agent which entry point fits that deadline, how to read the results, and the full workflow recipes.
```
skills/architecture-pattern-mcp/
├── SKILL.md # OMP constraints, entry-point decision guide, device quick reference
└── references/
├── tools.md # 11 tool signatures, output schemas, error codes, design-dict shape
└── workflows.md # 5 recipes, result interpretation, OMP troubleshooting
```
**Install for OMP** — copy the skill directory into the user skills root, or point `skills.customDirectories` at this repository's `skills/` directory in OMP's config:
```bash
cp -r skills/architecture-pattern-mcp ~/.omp/agent/skills/
```
The skill then tells the agent:
- Which entry point fits OMP's deadline: the async job trio by default, one-shot `design_architecture` only after raising the server's `timeout` (`analyze_architecture` alone measured 66 s, `evaluate_architecture` 197 s)
- How to phrase `requirements`, `domain`, and `style` as separate structured arguments
- How to interpret `final_quality_score`, `attempts > 1`, and `evaluation.recommendations`
- That `read mcp://pattern://…` is ambiguous while the sibling `agent-pattern` server is connected, so the tool route (`get_architecture_pattern`) is authoritative
The tool schemas, error codes and design-dict shape in `references/` are client-agnostic; only the deadline/device guidance is OMP-specific.
---
## Use the Tools
All tools accept `requirements` (free text) and `domain` (e.g. `data-processing`, `microservices`, `e-commerce`) as arguments. The examples below show the exact tool call shape so you can use them in any MCP client or API consumer.
### Try each tool
In Claude Code (or any MCP client), paste the natural-language instruction:
```
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.
```
Your agent calls `design_architecture` internally. 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.
**Or call tools directly** from your agent:
```
Call analyze_architecture with:
requirements: "Real-time data processing pipeline for 10k events/sec IoT sensor data"
domain: "data-processing"
Call generate_architecture with:
requirements: "ETL pipeline: Kafka → JSON parse → Redis geo-enrich → InfluxDB + S3"
domain: "data-processing"
selected_patterns: ["pipe-and-filter"]
Call evaluate_architecture with:
architecture: { ... paste a design dict here ... }
criteria: "scalability, reliability"
Call list_architecture_patterns() # all 40 patterns
Call list_architecture_patterns(category="messaging") # filter by category
Call get_architecture_pattern(name="event-driven") # full pattern JSON
```
### Async job pattern: `submit_architecture_design_job` + `get_architecture_design_status`
ONLY for clients with short request timeouts (Cursor, Claude Desktop, TS-SDK). The default is `design_architecture` with heartbeat defence. `submit_architecture_design_job` returns a `job_id` immediately; poll `get_architecture_design_status` until done:
```
# Step 1: start the job
Call submit_architecture_design_job with:
requirements: "ETL pipeline for IoT: Kafka → JSON → Redis geo-enrich → InfluxDB + S3"
domain: "data-processing"
# Step 2: poll every 10-30 seconds
Call get_architecture_design_status with:
job_id: "<job_id from step 1>"
# → status is "pending" | "running" | "completed" | "failed" | "cancelled"
# When status is "completed", the full design is in result.design
# When status is "failed", the error is in result.error
```
In Python (via the MCP HTTP API directly — see `examples/architecture_client_async.py`):
```python
import asyncio, aiohttp
SERVER = "http://localhost:8060/mcp"
POLL_EVERY = 15 # seconds
async def main():
async with aiohttp.ClientSession() as sess:
# Start
async with sess.post(SERVER, json={
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "submit_architecture_design_job",
"arguments": {
"requirements": "ETL pipeline for IoT: Kafka → JSON → Redis → InfluxDB + S3",
"domain": "data-processing",
}
},
"id": 1
}) as resp:
job_id = (await resp.json())["result"]["content"][0]["data"]["job_id"]
print(f"Job started: {job_id}")
# Poll
while True:
await asyncio.sleep(POLL_EVERY)
async with sess.post(SERVER, json={
"jsonrpc": "2.0",
"method": "tools/call",
"params": {"name": "get_architecture_design_status", "arguments": {"job_id": job_id}},
"id": 2
}) as resp:
result = (await resp.json())["result"]["content"][0]["data"]
print(f" status={result['status']}")
if result["status"] in ("completed", "failed", "cancelled"):
break
print(result.get("result", result)) # full design when completed
```
See `examples/architecture_client_async.py` for the complete runnable example. Run it with:
```bash
docker compose -f docker/docker-compose.yml up --build # Terminal 1
make client-async What people ask about architecture-pattern-mcp
What is olk/architecture-pattern-mcp?
+
olk/architecture-pattern-mcp is mcp servers for the Claude AI ecosystem. MCP server that provides architecture design expertise to AI coding agents It has 0 GitHub stars and its last recorded update is dated 2026-09-17.
How do I install architecture-pattern-mcp?
+
You can install architecture-pattern-mcp by cloning the repository (https://github.com/olk/architecture-pattern-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is olk/architecture-pattern-mcp safe to use?
+
Our security agent has analyzed olk/architecture-pattern-mcp and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains olk/architecture-pattern-mcp?
+
olk/architecture-pattern-mcp is maintained by olk. The last recorded GitHub activity is dated 2026-09-17, with 0 open issues.
Are there alternatives to architecture-pattern-mcp?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy architecture-pattern-mcp to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/olk-architecture-pattern-mcp)<a href="https://claudewave.com/repo/olk-architecture-pattern-mcp"><img src="https://claudewave.com/api/badge/olk-architecture-pattern-mcp" alt="Featured on ClaudeWave: olk/architecture-pattern-mcp" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ
The fastest path to AI-powered full stack observability, even for lean teams.