This guide walks you through setting up codeprism with the three major MCP clients: Claude Desktop, Cursor, and VS Code. By the end, you'll have a powerful AI assistant with graph-first code intelligence for your repositories.
- AI assistants that understand your code structure, not just text
- Real-time analysis of your repositories with automatic updates
- Cross-language intelligence for JavaScript, TypeScript, and Python projects
- Graph-based insights about dependencies, function calls, and relationships
- Node.js 18+ (for building codeprism)
- Rust 1.82+ (for building codeprism from source)
- Git (for cloning repositories)
- Claude Desktop (macOS/Windows) - Download from Claude.ai
- Cursor - Download from Cursor.sh
- VS Code (1.86+) - Download from code.visualstudio.com
# Check Node.js version
node --version # Should be 18.0.0 or higher
# Check Rust version
rustc --version # Should be 1.82.0 or higher
# Check Git
git --version# Clone the repository
git clone https://github.com/rustic-ai /codeprism
cd codeprism
# Build the release binary
cargo build --release
# The binary will be at: ./target/release/codeprism-mcp-server# Download from GitHub releases (when available)
# Extract and place in your PATH# Test the binary
./target/release/codeprism-mcp-server --help
# Should show usage information and available optionsmacOS:
# Configuration file location
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
# Configuration file location
%APPDATA%\Claude\claude_desktop_config.jsonOpen the configuration file in your preferred editor and add:
{
"mcpServers": {
"codeprism": {
"command": "/path/to/codeprism/target/release/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "development",
"RUST_LOG": "info"
}
}
}
}Replace the paths:
/path/to/codeprism/target/release/codeprism-mcp-server→ Your actual codeprism binary path
📝 Note: Repository paths are configured via MCP tools after the server starts. You don't need to set REPOSITORY_PATH in the environment.
{
"mcpServers": {
"codeprism-dev": {
"command": "/Users/username/code/codeprism/target/release/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "development",
"RUST_LOG": "info"
}
},
"codeprism-prod": {
"command": "/Users/username/code/codeprism/target/release/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "production",
"RUST_LOG": "warn"
}
}
}
}💡 Pro Tip: Each server instance can analyze different repositories as needed - you specify the repository path when using MCP tools.
- Quit Claude Desktop completely
- Reopen Claude Desktop
- Look for the 🔨 (hammer) icon in the chat input area
- Click it to see available MCP tools
Project-specific (recommended):
# Create in your project root
.cursor/mcp.jsonGlobal (all projects):
# macOS/Linux
~/.cursor/mcp.json
# Windows
%USERPROFILE%\.cursor\mcp.json{
"mcpServers": {
"codeprism": {
"command": "/path/to/codeprism/target/release/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "development",
"RUST_LOG": "info"
}
}
}
}{
"mcpServers": {
"codeprism-current": {
"command": "/Users/username/code/codeprism/target/release/codeprism-mcp-server",
"description": "Analyze current repository with codeprism",
"env": {
"CODEPRISM_PROFILE": "development",
"REPOSITORY_PATH": ".",
"RUST_LOG": "info"
}
},
"codeprism-parent": {
"command": "/Users/username/code/codeprism/target/release/codeprism-mcp-server",
"description": "Analyze parent directory",
"env": {
"CODEPRISM_PROFILE": "development",
"REPOSITORY_PATH": "..",
"RUST_LOG": "warn"
}
}
}
}- Open Cursor Settings (
Cmd/Ctrl + ,) - Search for "MCP"
- Enable "Model Context Protocol"
- Restart Cursor
- Open the Command Palette (
Cmd/Ctrl + Shift + P) - Run "MCP: List Servers"
- You should see your codeprism server listed
- In chat, you should see MCP tools available
- Open VS Code Settings (
Cmd/Ctrl + ,) - Search for "mcp"
- Enable
chat.mcp.enabled - Optionally enable
chat.mcp.discovery.enabledfor auto-discovery
- Open Command Palette (
Cmd/Ctrl + Shift + P) - Run "MCP: Add Server"
- Choose "CLI Server - Node.js"
- Fill in the details:
- Server Name: codeprism`
- Command: Full path to your codeprism-mcp binary
- Args:
["/path/to/your/repository"]
Create .vscode/mcp.json in your workspace:
{
"servers": {
codeprism": {
"type": "stdio",
"command": "/path/to/codeprism/target/release/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "development",
"REPOSITORY_PATH": ".",
"RUST_LOG": "info"
}
}
}
}In your VS Code settings.json:
{
"mcp": {
"servers": {
"codeprism-global": {
"type": "stdio",
"command": "/Users/username/code/codeprism/target/release/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "development",
"REPOSITORY_PATH": ".",
"RUST_LOG": "info"
}
}
}
}
}- Open GitHub Copilot Chat (
Ctrl/Cmd + Alt + I) - Select "Agent" mode from the dropdown
- Click the "Tools" button to see available MCP tools
- Enable the codeprism tools you want to use
Once you've configured your MCP client, try these prompts:
Claude Desktop:
What files are in this repository? Can you analyze the overall structure?
Cursor:
codeprism Analyze the dependencies in this JavaScript project
VS Code (Agent Mode):
Use the repository analysis tools to give me an overview of this codebase
Dependency Analysis:
Can you trace the function calls from the main entry point and show me the dependency graph?
Code Quality Assessment:
Analyze this repository for potential code quality issues and suggest improvements
Architecture Overview:
Generate a summary of the main modules and how they interact with each other
Cross-Language Analysis:
This repository has both Python and JavaScript. How do they interact?
For Large Repositories:
{
"mcpServers": {
codeprism": {
"command": "/path/to/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "production",
"CODEPRISM_MEMORY_LIMIT_MB": "4096",
"CODEPRISM_BATCH_SIZE": "50",
"REPOSITORY_PATH": "/path/to/repo",
"RUST_LOG": "warn"
}
}
}
}For Development:
{
"mcpServers": {
"codeprism-dev": {
"command": "/path/to/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "development",
"CODEPRISM_MEMORY_LIMIT_MB": "1024",
"REPOSITORY_PATH": "/path/to/repo",
"RUST_LOG": "debug"
}
}
}
}Different Projects:
{
"mcpServers": {
"codeprism-frontend": {
"command": "/path/to/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "development",
"REPOSITORY_PATH": "/path/to/frontend-app"
}
},
"codeprism-backend": {
"command": "/path/to/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "production",
"REPOSITORY_PATH": "/path/to/backend-api"
}
},
"codeprism-mobile": {
"command": "/path/to/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "development",
"REPOSITORY_PATH": "/path/to/mobile-app"
}
}
}
}1. "Command not found" or "Binary not executable"
# Make sure the binary is executable
chmod +x /path/to/codeprism/target/release/codeprism-mcp-server
# Test the binary directly
/path/to/codeprism/target/release/codeprism-mcp-server --help2. "Repository not found" or "Permission denied"
# Check the repository path exists
ls -la /path/to/your/repository
# Ensure read permissions
chmod -R +r /path/to/your/repository3. Server not appearing in MCP client
Claude Desktop:
- Check the JSON syntax is valid
- Restart Claude Desktop completely
- Look for error messages in the chat
Cursor:
- Verify MCP is enabled in settings
- Check if
.cursor/mcp.jsonexists and is valid - Restart Cursor
VS Code:
- Ensure
chat.mcp.enabledis true - Run "MCP: List Servers" to see status
- Check "Output" panel for MCP errors
Enable detailed logging:
{
"mcpServers": {
"codeprism-debug": {
"command": "/path/to/codeprism-mcp-server",
"env": {
"CODEPRISM_PROFILE": "development",
"REPOSITORY_PATH": "/path/to/repo",
"RUST_LOG": "debug",
"PRISM_DEBUG": "1"
}
}
}
}Claude Desktop Logs:
- macOS:
~/Library/Logs/Claude/mcp.log - Windows:
%APPDATA%\Claude\logs\mcp.log
VS Code:
- Open "Output" panel
- Select "MCP" from the dropdown
Cursor:
- View > Output > "Cursor MCP"
Check logs first:
# Claude Desktop (macOS)
tail -f ~/Library/Logs/Claude/mcp*.log
# VS Code: View > Output > MCPTest codeprism directly:
# Test with minimal configuration
CODEPRISM_PROFILE=development REPOSITORY_PATH=/path/to/small/test/repo ./target/release/codeprism-mcp-server
# Check for error messagesCommon Solutions:
- Rebuild codeprism:
cargo build --release - Check permissions:
chmod +x codeprism-mcp-server - Verify paths: Use absolute paths in configuration
- Check environment: Ensure CODEPRISM_PROFILE and REPOSITORY_PATH are set
- Restart client: Completely quit and restart MCP client
Once your setup is working:
- Try Multiple Languages: Test with repositories containing JavaScript, TypeScript, and Python
- Analyze Dependencies: Ask about function call graphs and module relationships
- Code Quality: Request refactoring suggestions and code quality analysis
- Architecture Insights: Get high-level overviews of complex codebases
- Rust Parser: Soon you'll be able to analyze Rust code (including codeprism itself!)
- Java Support: Enterprise language support coming
- Enhanced CLI: Additional commands for repository analysis
- Performance Improvements: Better handling of large repositories
- GitHub Issues: Report bugs and request features
- Discussions: Share your use cases and tips
- Contributing: Help improve codeprism for everyone
If you found CodePrism helpful in your development workflow, consider supporting our work:
Your support helps us:
- 🚀 Continue advancing AI-generated code intelligence
- 🔧 Maintain and improve the MCP server
- 📚 Expand language support and analysis capabilities
- 🌟 Develop new features based on community feedback
| Client | Location |
|---|---|
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Cursor (Project) | .cursor/mcp.json |
| Cursor (Global) | ~/.cursor/mcp.json |
| VS Code (Project) | .vscode/mcp.json |
| VS Code (User) | VS Code settings.json |
# Build codeprism
cargo build --release
# Test codeprism binary
./target/release/codeprism-mcp --help
# Run with debug logging
RUST_LOG=debug ./target/release/codeprism-mcp /path/to/repo# Basic analysis
"What's the overall structure of this repository?"
# Dependency tracing
"Show me how the authentication module connects to the rest of the system"
# Code quality
"Are there any potential issues or improvements you'd suggest for this codebase?"
# Cross-language
"How do the Python backend and JavaScript frontend communicate?"
Ready to supercharge your AI development workflow? Follow this guide and start experiencing graph-first code intelligence today!