How to Use MCP with Multiple Projects
This guide shows you how to use a single Aichaku MCP server installation across all your projects. You’ll learn the global installation model and how to manage MCP for multiple projects efficiently.
Before you begin
Section titled “Before you begin”Ensure you have:
- Aichaku installed on your system
- Claude Code configured and working
- Access to multiple projects that need code review
- Basic understanding of command-line operations
Overview
Section titled “Overview”The Aichaku MCP server works as a global service, not a per-project tool. This means:
- Install once - The MCP server lives in
~/.aichaku/mcp-server/ - Use everywhere - All projects on your machine can use the same server
- Single configuration - Configure Claude Code once for all projects
- Automatic availability - Projects with Aichaku can use the MCP server
- No port conflicts - MCP uses stdio by default (HTTP/SSE mode available on port 7182)
Understanding the architecture
Section titled “Understanding the architecture”graph TB subgraph "Your Machine" MCP[MCP Server<br/>~/.aichaku/mcp-server/]
subgraph "Claude Code" CC[Claude Client] end
subgraph "Projects" P1[Project A<br/>.claude/] P2[Project B<br/>.claude/] P3[Project C<br/>.claude/] end end
CC -->|stdio| MCP MCP -->|reads| P1 MCP -->|reads| P2 MCP -->|reads| P3Key points:
- Claude Code spawns the MCP server as needed
- Communication uses stdio (no network ports)
- The server reads project configurations dynamically
- No background services or daemons required
Setting up for multiple projects
Section titled “Setting up for multiple projects”Step 1: Global MCP installation
Section titled “Step 1: Global MCP installation”If you haven’t already, install the MCP server globally:
aichaku mcp --installThis installs to ~/.aichaku/mcp-server/ - a location accessible from any project.
Step 2: Configure Claude Code once
Section titled “Step 2: Configure Claude Code once”Add the MCP configuration to Claude Code:
aichaku mcp --configThis configuration in Claude’s settings file works for all projects:
{ "mcpServers": { "aichaku-reviewer": { "command": "/Users/yourname/.aichaku/mcp-server/mcp-code-reviewer", "args": [], "env": {} } }}Step 3: Initialize each project
Section titled “Step 3: Initialize each project”For each project that needs code review, initialize Aichaku:
cd /path/to/project-aaichaku initaichaku integrateaichaku standards --add nist-csf,tdd
cd /path/to/project-baichaku initaichaku integrateaichaku standards --add owasp-web,solidEach project gets its own:
.claude/directory with methodologies.claude/.aichaku-standards.jsonwith selected standards- Custom CLAUDE.md with project rules
How the MCP server finds project configuration
Section titled “How the MCP server finds project configuration”When Claude asks the MCP server to review a file, the server:
- Identifies the project root by looking for
.claude/directory - Reads project standards from
.claude/.aichaku-standards.json - Detects methodologies from project structure
- Applies the correct rules for that specific project
Example project identification:
/Users/yourname/projects/web-app/src/auth.ts ↑ Finds .claude/ here Reads this project's standardsManaging different standards per project
Section titled “Managing different standards per project”Each project can have completely different standards:
Project A: Web Application
Section titled “Project A: Web Application”cd ~/projects/web-appaichaku standards --add owasp-web,clean-arch,tddConfiguration in .claude/.aichaku-standards.json:
{ "version": "1.0.0", "selected": ["owasp-web", "clean-arch", "tdd"], "methodologies": ["scrum"]}Project B: CLI Tool
Section titled “Project B: CLI Tool”cd ~/projects/cli-toolaichaku standards --add nist-csf,solid,conventional-commitsConfiguration in .claude/.aichaku-standards.json:
{ "version": "1.0.0", "selected": ["nist-csf", "solid", "conventional-commits"], "methodologies": ["shape-up"]}Project C: Microservice
Section titled “Project C: Microservice”cd ~/projects/microserviceaichaku standards --add 15-factor,dora,test-pyramidThe MCP server automatically applies the right standards for each project.
Working with monorepos
Section titled “Working with monorepos”For monorepos with multiple sub-projects:
Option 1: Root-level configuration
Section titled “Option 1: Root-level configuration”monorepo/├── .claude/ # Shared configuration│ └── .aichaku-standards.json├── packages/│ ├── frontend/│ ├── backend/│ └── shared/All packages share the same standards.
Option 2: Per-package configuration
Section titled “Option 2: Per-package configuration”monorepo/├── packages/│ ├── frontend/│ │ └── .claude/ # Frontend-specific standards│ ├── backend/│ │ └── .claude/ # Backend-specific standards│ └── shared/│ └── .claude/ # Shared library standardsEach package has its own standards.
Switching between projects
Section titled “Switching between projects”The MCP server handles project switching automatically:
# Work on project Acd ~/projects/web-app# Ask Claude to review auth.ts - uses web-app standards
# Switch to project Bcd ~/projects/cli-tool# Ask Claude to review parser.ts - uses cli-tool standards
# No restart needed - it just works!Using HTTP/SSE mode for better performance
Section titled “Using HTTP/SSE mode for better performance”When you frequently switch between projects or run multiple terminals:
# Start the shared HTTP/SSE server onceaichaku mcp --start-server
# Now in any project, reviews are faster:cd ~/projects/web-appaichaku review src/auth.ts # Uses shared server automatically
# In another terminal simultaneouslycd ~/projects/cli-toolaichaku review src/parser.ts # Also uses the same shared serverThe HTTP/SSE server:
- Eliminates process startup time
- Handles multiple concurrent requests
- Maintains project isolation
- Runs on port 7182
Updating the MCP server
Section titled “Updating the MCP server”When updating Aichaku, update the MCP server for all projects:
# Check current versionaichaku mcp --status
# Update Aichakuaichaku upgrade
# Reinstall MCP server with new versionaichaku mcp --installAll projects automatically use the updated server.
Troubleshooting multiple projects
Section titled “Troubleshooting multiple projects”Projects not found
Section titled “Projects not found”Problem: MCP server doesn’t find project configuration
Solution: Ensure each project has:
project-root/├── .claude/ # Required│ ├── .aichaku-standards.json # Required for standards│ └── CLAUDE.md # Required for methodology configurationWrong standards applied
Section titled “Wrong standards applied”Problem: Project A standards used in Project B
Solution: Check the working directory:
- Ensure you’re in the correct project root
- Run
pwdto verify location - Check
.claude/.aichaku-standards.jsonexists
Performance with many projects
Section titled “Performance with many projects”The MCP server is stateless and lightweight:
- No background processes
- No memory usage when not reviewing
- Fast startup (< 100ms)
- No cleanup needed
Best practices
Section titled “Best practices”1. Consistent initialization
Section titled “1. Consistent initialization”Create a script for new projects:
#!/bin/bashaichaku initaichaku integrateaichaku standards --add nist-csf,tdd,conventional-commitsecho "✅ Aichaku configured with security-first standards"2. Document project standards
Section titled “2. Document project standards”In each project’s README:
## Code Standards
This project uses Aichaku with:
- NIST CSF - Security framework- TDD - Test-driven development- Conventional Commits - Standardized commit messages
Run `aichaku standards --list --selected` to see current standards.3. Team synchronization
Section titled “3. Team synchronization”Share standards across team:
# Export standardscat .claude/.aichaku-standards.json > project-standards.json
# Import on teammate's machinecp project-standards.json .claude/.aichaku-standards.json4. CI/CD integration
Section titled “4. CI/CD integration”While MCP is for local development, document standards for CI:
name: Verify Standardson: [push]jobs: check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Check standards file exists run: test -f .claude/.aichaku-standards.jsonSecurity considerations
Section titled “Security considerations”Global installation security
Section titled “Global installation security”The MCP server installation is secure because:
- User-specific - Installed in your home directory
- No elevated privileges - Runs as your user
- No network access - Communicates via stdio only
- Read-only - Only reads files, never modifies
Project isolation
Section titled “Project isolation”Each project is isolated:
- Standards are project-specific
- No cross-project data sharing
- File access limited to project directory
- No persistent state between reviews
Audit trail
Section titled “Audit trail”Track MCP usage across projects:
# See all projects with Aichakufind ~ -maxdepth 10 -name ".aichaku-standards.json" -type f 2>/dev/null | \ xargs -I {} dirname {} | \ xargs -I {} dirname {}Summary
Section titled “Summary”The Aichaku MCP server’s global installation model provides:
✅ Simplicity - Install once, use everywhere ✅ Flexibility - Different standards per project ✅ Performance - No overhead or background services ✅ Security - Isolated, read-only operation ✅ Maintainability - Single binary to update
Remember: Think of the MCP server as a tool like git or npm - installed globally but aware of project context.
Related guides
Section titled “Related guides”- Setup MCP Server - Initial installation
- MCP API Reference - Available tools
- Configure Your Project - Project setup