Getting Started with CodeCodePrism - MCP Integration Guide
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.
๐ฏ What You'll Achieveโ
- 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
๐ Prerequisitesโ
Required Softwareโ
- Node.js 18+ (for building codeprism)
- Rust 1.82+ (for building codeprism from source)
- Git (for cloning repositories)
MCP Clients (Choose one or more)โ
- Claude Desktop (macOS/Windows) - Download from Claude.ai
- Cursor - Download from Cursor.sh
- VS Code (1.86+) - Download from code.visualstudio.com
Verify Prerequisitesโ
# 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
๐ Step 1: Install CodeCodePrismโ
Option A: Build from Source (Recommended)โ
# 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
Option B: Using Pre-built Binary (Coming Soon)โ
# Download from GitHub releases (when available)
# Extract and place in your PATH
Verify Installationโ
# Test the binary
./target/release/codeprism-mcp --help
# Should show usage information and available options
๐ง Step 2: Configure MCP Clientsโ
Claude Desktop Setupโ
1. Locate Configuration Fileโ
macOS:
# Configuration file location
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
# Configuration file location
%APPDATA%\Claude\claude_desktop_config.json
2. Create/Update Configurationโ
Open the configuration file in your preferred editor and add:
{
"mcpServers": {
codeprism": {
"command": "/path/to /codeprism/target/release/codeprism-mcp",
"args": ["/path/to/your/repository"],
"env": {
"RUST_LOG": "info"
}
}
}
}
Replace the paths:
/path/to /codeprism/target/release/codeprism-mcp
โ Your actual codeprism binary path/path/to/your/repository
โ Your project directory
3. Complete Setup Exampleโ
{
"mcpServers": {
"codeprism-main-project": {
"command": "/Users/username/code /codeprism/target/release/codeprism-mcp",
"args": ["/Users/username/code/my-project"],
"env": {
"RUST_LOG": "info"
}
},
"codeprism-client-app": {
"command": "/Users/username/code /codeprism/target/release/codeprism-mcp",
"args": ["/Users/username/code/client-app"],
"env": {
"RUST_LOG": "warn"
}
}
}
}
4. Restart Claude Desktopโ
- Quit Claude Desktop completely
- Reopen Claude Desktop
- Look for the ๐จ (hammer) icon in the chat input area
- Click it to see available MCP tools
Cursor Setupโ
1. Choose Configuration Locationโ
Project-specific (recommended):
# Create in your project root
.cursor/mcp.json
Global (all projects):
# macOS/Linux
~/.cursor/mcp.json
# Windows
%USERPROFILE%\.cursor\mcp.json
2. Create Configuration Fileโ
{
"mcpServers": {
codeprism": {
"command": "/path/to /codeprism/target/release/codeprism-mcp",
"args": ["."],
"env": {
"RUST_LOG": "info"
}
}
}
}
3. Advanced Configuration Exampleโ
{
"mcpServers": {
"codeprism-current": {
"command": "/Users/username/code /codeprism/target/release/codeprism-mcp",
"args": ["."],
"description": "Analyze current repository with codeprism",
"env": {
"RUST_LOG": "info"
}
},
"codeprism-parent": {
"command": "/Users/username/code /codeprism/target/release/codeprism-mcp",
"args": [".."],
"description": "Analyze parent directory",
"env": {
"RUST_LOG": "warn"
}
}
}
}
4. Enable MCP in Cursorโ
- Open Cursor Settings (
Cmd/Ctrl + ,
) - Search for "MCP"
- Enable "Model Context Protocol"
- Restart Cursor
5. Verify Setupโ
- 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
VS Code Setupโ
1. Enable MCP Supportโ
- Open VS Code Settings (
Cmd/Ctrl + ,
) - Search for "mcp"
- Enable
chat.mcp.enabled
- Optionally enable
chat.mcp.discovery.enabled
for auto-discovery
2. Add MCP Server (Method 1: GUI)โ
- 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"]
3. Add MCP Server (Method 2: Configuration File)โ
Create .vscode/mcp.json
in your workspace:
{
"servers": {
codeprism": {
"type": "stdio",
"command": "/path/to /codeprism/target/release/codeprism-mcp",
"args": ["."],
"env": {
"RUST_LOG": "info"
}
}
}
}
4. Add to User Settings (Global)โ
In your VS Code settings.json
:
{
"mcp": {
"servers": {
"codeprism-global": {
"type": "stdio",
"command": "/Users/username/code /codeprism/target/release/codeprism-mcp",
"args": ["."],
"env": {
"RUST_LOG": "info"
}
}
}
}
}
5. Use in Agent Modeโ
- 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
๐งช Step 3: Test Your Setupโ
Basic Functionality Testโ
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
Advanced Usage Examplesโ
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?
๐ง Configuration Tipsโ
Performance Optimizationโ
For Large Repositories:
{
"mcpServers": {
codeprism": {
"command": "/path/to/codeprism-mcp",
"args": ["/path/to/repo"],
"env": {
"RUST_LOG": "warn",
"PRISM_MAX_FILES": "10000"
}
}
}
}
For Development:
{
"mcpServers": {
"codeprism-dev": {
"command": "/path/to/codeprism-mcp",
"args": ["/path/to/repo", "--verbose"],
"env": {
"RUST_LOG": "debug"
}
}
}
}
Multiple Repositoriesโ
Different Projects:
{
"mcpServers": {
"codeprism-frontend": {
"command": "/path/to/codeprism-mcp",
"args": ["/path/to/frontend-app"]
},
"codeprism-backend": {
"command": "/path/to/codeprism-mcp",
"args": ["/path/to/backend-api"]
},
"codeprism-mobile": {
"command": "/path/to/codeprism-mcp",
"args": ["/path/to/mobile-app"]
}
}
}
๐ Troubleshootingโ
Common Issuesโ
1. "Command not found" or "Binary not executable"
# Make sure the binary is executable
chmod +x /path/to /codeprism/target/release/codeprism-mcp
# Test the binary directly
/path/to /codeprism/target/release/codeprism-mcp --help
2. "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/repository
3. 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.json
exists and is valid - Restart Cursor
VS Code:
- Ensure
chat.mcp.enabled
is true - Run "MCP: List Servers" to see status
- Check "Output" panel for MCP errors
Debug Modeโ
Enable detailed logging:
{
"mcpServers": {
"codeprism-debug": {
"command": "/path/to/codeprism-mcp",
"args": ["/path/to/repo", "--verbose"],
"env": {
"RUST_LOG": "debug",
"PRISM_DEBUG": "1"
}
}
}
}
Log Filesโ
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"
Getting Helpโ
Check logs first:
# Claude Desktop (macOS)
tail -f ~/Library/Logs/Claude/mcp*.log
# VS Code: View > Output > MCP
Test codeprism directly:
# Test with minimal arguments
./target/release/codeprism-mcp /path/to/small/test/repo
# Check for error messages
Common Solutions:
- Rebuild codeprism:
cargo build --release
- Check permissions:
chmod +x codeprism-mcp
- Verify paths: Use absolute paths in configuration
- Restart client: Completely quit and restart MCP client
๐ What's Next?โ
Explore Advanced Featuresโ
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
Upcoming Featuresโ
- 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
Communityโ
- GitHub Issues: Report bugs and request features
- Discussions: Share your use cases and tips
- Contributing: Help improve codeprism for everyone
๐ Support the Projectโ
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
๐ Quick Referenceโ
Configuration File Locationsโ
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 |
Essential Commandsโ
# 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
Example Promptsโ
# 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!