ArchMemory MCP
An MCP server that gives AI coding agents structured access to a project's architecture, rules, modules, and technical decisions.
README
ArchMemory MCP
Give AI coding agents a memory of your architecture.
Open source MCP server built with Laravel that gives AI coding agents (Cursor, Claude Code, etc.) structured access to your project's architecture, rules, modules, and technical decisions.
Features (MVP)
- 5 MCP Tools — project context, rules, modules, ADRs, change validation
- Artisan CLI — init, analyze, update
.archmemory/storage — Markdown + JSON, Git-versionable- Rules Engine — validates code changes against architecture rules
- DDD Architecture — Memory, Mcp, Rules, Analysis domains
Quick Start
composer install
cp .env.example .env
php artisan key:generate
# Initialize architecture memory (if not already present)
php artisan archmemory:init
# Analyze project and update architecture.md
php artisan archmemory:analyze
Cursor Integration
Add to .cursor/mcp.json (included in this repo):
{
"mcpServers": {
"archmemory": {
"command": "php",
"args": ["artisan", "mcp:start", "archmemory"],
"cwd": "${workspaceFolder}",
"env": {
"ARCHMEMORY_PATH": "${workspaceFolder}/.archmemory"
}
}
}
}
Then restart Cursor. The agent can call:
| Tool | Description |
|---|---|
get_project_context |
Project stack, architecture, rules summary |
get_architecture_rules |
Full rules from rules.md |
get_module_info |
Module details and dependencies |
get_decision_history |
ADR decision records |
validate_change |
Check code against architecture rules |
Artisan Commands
php artisan archmemory:init # Create .archmemory/ structure
php artisan archmemory:analyze # Generate architecture.md from project
php artisan archmemory:update # Refresh context after changes
php artisan mcp:start archmemory # Start MCP stdio server
Project Structure
app/Domains/
├── Memory/ # Read/write .archmemory files
├── Mcp/ # MCP server + tools
├── Rules/ # Rules engine
└── Analysis/ # Project analyzer
.archmemory/ # Architecture memory (committed to Git)
docs/ # Design documents
Documentation
- PROJECT_CONTEXT.md — Full project specification
- architecture-design.md — System architecture
- mcp-tools-design.md — MCP tool specs
Testing
php artisan test # 32 tests
vendor/bin/pint --test # Code style check
vendor/bin/pint # Auto-fix style
CI runs on push via GitHub Actions (.github/workflows/tests.yml).
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.