Skip to main content

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)โ€‹

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โ€‹

# 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โ€‹

  1. Quit Claude Desktop completely
  2. Reopen Claude Desktop
  3. Look for the ๐Ÿ”จ (hammer) icon in the chat input area
  4. 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โ€‹

  1. Open Cursor Settings (Cmd/Ctrl + ,)
  2. Search for "MCP"
  3. Enable "Model Context Protocol"
  4. Restart Cursor

5. Verify Setupโ€‹

  1. Open the Command Palette (Cmd/Ctrl + Shift + P)
  2. Run "MCP: List Servers"
  3. You should see your codeprism server listed
  4. In chat, you should see MCP tools available

VS Code Setupโ€‹

1. Enable MCP Supportโ€‹

  1. Open VS Code Settings (Cmd/Ctrl + ,)
  2. Search for "mcp"
  3. Enable chat.mcp.enabled
  4. Optionally enable chat.mcp.discovery.enabled for auto-discovery

2. Add MCP Server (Method 1: GUI)โ€‹

  1. Open Command Palette (Cmd/Ctrl + Shift + P)
  2. Run "MCP: Add Server"
  3. Choose "CLI Server - Node.js"
  4. 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โ€‹

  1. Open GitHub Copilot Chat (Ctrl/Cmd + Alt + I)
  2. Select "Agent" mode from the dropdown
  3. Click the "Tools" button to see available MCP tools
  4. 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:

  1. Rebuild codeprism: cargo build --release
  2. Check permissions: chmod +x codeprism-mcp
  3. Verify paths: Use absolute paths in configuration
  4. Restart client: Completely quit and restart MCP client

๐ŸŽ‰ What's Next?โ€‹

Explore Advanced Featuresโ€‹

Once your setup is working:

  1. Try Multiple Languages: Test with repositories containing JavaScript, TypeScript, and Python
  2. Analyze Dependencies: Ask about function call graphs and module relationships
  3. Code Quality: Request refactoring suggestions and code quality analysis
  4. 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:

GitHub Sponsors

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

Become a sponsor โ†’


๐Ÿ“š Quick Referenceโ€‹

Configuration File Locationsโ€‹

ClientLocation
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!