arch-mcp
MCP server for Python API architecture controls. Validates code against architecture rules and best practices.
Quick Start
Option 1: Hosted (Recommended)
No install needed. Just add to your config:
Claude Code:
claude mcp add arch-controls --url https://arch-mcp.sid.sh/sse
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"arch-controls": {
"url": "https://arch-mcp.sid.sh/sse"
}
}
}
Option 2: Local via uvx
Run locally without installing:
Claude Code:
claude mcp add arch-controls -- uvx arch-mcp
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"arch-controls": {
"command": "uvx",
"args": ["arch-mcp"]
}
}
}
Option 3: Local Install
pip install arch-mcp
Claude Code:
claude mcp add arch-controls -- arch-mcp
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"arch-controls": {
"command": "arch-mcp"
}
}
}
Tools
| Tool | Description |
|---|---|
tool_list_rules |
List architecture rules (filter by category/severity) |
tool_get_rule |
Get rule details with code examples |
tool_validate_code |
Validate code against architecture rules |
tool_get_project_structure |
Get recommended folder structure |
tool_get_best_practices |
Get best practices by category |
tool_check_architecture |
Check codebase for layer violations |
tool_get_architecture_guide |
Complete architecture guide |
Rule Categories
- security - Secrets management, SQL injection prevention, input validation
- data-access - Repository pattern, async database operations
- error-handling - Custom exceptions, specific exception catches
- api-design - Pydantic schemas, dependency injection
- logging - Structured logging, no print statements
- configuration - Pydantic settings, environment variables
- testing - Pytest patterns, fixtures
Architecture Patterns
- clean-architecture - Domain-driven with clear layer separation
- feature-based - Organized by feature/module
- simple - Minimal structure for small projects
Example Usage
Once connected, ask your AI assistant:
- "List all security rules"
- "Validate this code against architecture rules"
- "Show me the recommended project structure"
- "Check if my imports follow clean architecture"
Development
git clone https://github.com/slahiri/arch.mcp.git
cd arch.mcp
pip install -e ".[dev]"
# Run tests
PYTHONPATH=src pytest tests/ -v
# Lint
ruff check src/
License
MIT
Metadata
Release files for arch-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arch_mcp-0.1.0.tar.gz | 28.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arch_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.7 kB
Release files / arch_mcp-0.1.0.tar.gz
| Download URL | arch_mcp-0.1.0.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0d6b1c72fba417af63df64a1df73d40fd674fb91c642968c283116156aded6c
|
|
BLAKE2b-256 checksum How to use checksums |
c5382bdb3867052beb61357493a9981c084df58571e82a238cccaf1415d7df66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 29, 2026.
Transparency logRelease files / arch_mcp-0.1.0-py3-none-any.whl
| Download URL | arch_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2dc5469973e52bbb59963a04d0792aace80147b1852739950a6ff614ae763600
|
|
BLAKE2b-256 checksum How to use checksums |
b7fcfe93527c79d1fe40af7a64c9ce3f3b3e1169654aeff330077d6136889385
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 29, 2026.
Transparency log