The MCP ADR Analysis Server provides AI-powered architectural analysis for intelligent development workflows. Unlike typical AI assistants, it returns actual analysis results rather than prompts to submit elsewhere, offering architectural insights with 95% confidence scoring.
npm install -g mcp-adr-analysis-server
npx mcp-adr-analysis-server
curl -sSL https://raw.githubusercontent.com/tosin2013/mcp-adr-analysis-server/main/scripts/install-rhel.sh | bash
Get an API Key from OpenRouter.ai/keys
Set Environment Variables:
OPENROUTER_API_KEY=your_key
EXECUTION_MODE=full
Configure your MCP client (Claude Desktop, Cline, Cursor, or Windsurf):
{
"mcpServers": {
"adr-analysis": {
"command": "mcp-adr-analysis-server",
"env": {
"PROJECT_PATH": "/path/to/your/project",
"OPENROUTER_API_KEY": "your_key_here",
"EXECUTION_MODE": "full"
}
}
}
}
You can ask your MCP client (Claude or other compatible assistants) questions like:
// Basic project analysis
const analysis = await analyzeProjectEcosystem({
projectPath: '/path/to/project',
analysisType: 'comprehensive',
});
// Generate ADRs from requirements
const adrs = await generateAdrsFromPrd({
prdPath: 'docs/PRD.md',
outputDirectory: 'docs/adrs',
});
// Smart Code Linking - Find code related to ADR decisions
const relatedCode = await findRelatedCode(
'docs/adrs/001-auth-system.md',
'We will implement JWT authentication with Express middleware',
'/path/to/project',
{
useAI: true, // AI-powered keyword extraction
useRipgrep: true, // Fast text search
maxFiles: 10, // Limit results
includeContent: true, // Include file contents
}
);
For enhanced web research capabilities, you can integrate with Firecrawl:
# Option 1: Cloud service (recommended)
export FIRECRAWL_ENABLED="true"
export FIRECRAWL_API_KEY="fc-your-api-key-here"
# Option 2: Self-hosted
export FIRECRAWL_ENABLED="true"
export FIRECRAWL_BASE_URL="http://localhost:3000"
# Option 3: Disabled (default - server works without web search)
EXECUTION_MODE=full
and provide API keynpm install && npm run build
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "adr-analysis" '{"command":"npx","args":["mcp-adr-analysis-server"],"env":{"PROJECT_PATH":"${workspaceFolder}","ADR_DIRECTORY":"docs/adrs","LOG_LEVEL":"ERROR"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"adr-analysis": {
"command": "npx",
"args": [
"mcp-adr-analysis-server"
],
"env": {
"PROJECT_PATH": "${workspaceFolder}",
"ADR_DIRECTORY": "docs/adrs",
"LOG_LEVEL": "ERROR"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"adr-analysis": {
"command": "npx",
"args": [
"mcp-adr-analysis-server"
],
"env": {
"PROJECT_PATH": "${workspaceFolder}",
"ADR_DIRECTORY": "docs/adrs",
"LOG_LEVEL": "ERROR"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect