MCP server for Python API architecture controls
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arch_mcp-0.1.0.tar.gz.
File metadata
- Download URL: arch_mcp-0.1.0.tar.gz
- Upload date:
- Size: 28.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0d6b1c72fba417af63df64a1df73d40fd674fb91c642968c283116156aded6c
|
|
| MD5 |
4ca36665aec7621390c82a5f71e209e4
|
|
| BLAKE2b-256 |
c5382bdb3867052beb61357493a9981c084df58571e82a238cccaf1415d7df66
|
Provenance
The following attestation bundles were made for arch_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on slahiri/arch.mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arch_mcp-0.1.0.tar.gz -
Subject digest:
c0d6b1c72fba417af63df64a1df73d40fd674fb91c642968c283116156aded6c - Sigstore transparency entry: 870717632
- Sigstore integration time:
-
Permalink:
slahiri/arch.mcp@732be8d6f088be2b60b3c092eb43c171f2476497 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/slahiri
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@732be8d6f088be2b60b3c092eb43c171f2476497 -
Trigger Event:
release
-
Statement type:
File details
Details for the file arch_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arch_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dc5469973e52bbb59963a04d0792aace80147b1852739950a6ff614ae763600
|
|
| MD5 |
766c9e792783814d0174e06f8b54c3ca
|
|
| BLAKE2b-256 |
b7fcfe93527c79d1fe40af7a64c9ce3f3b3e1169654aeff330077d6136889385
|
Provenance
The following attestation bundles were made for arch_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on slahiri/arch.mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arch_mcp-0.1.0-py3-none-any.whl -
Subject digest:
2dc5469973e52bbb59963a04d0792aace80147b1852739950a6ff614ae763600 - Sigstore transparency entry: 870717637
- Sigstore integration time:
-
Permalink:
slahiri/arch.mcp@732be8d6f088be2b60b3c092eb43c171f2476497 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/slahiri
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@732be8d6f088be2b60b3c092eb43c171f2476497 -
Trigger Event:
release
-
Statement type: