repowiserepowise
Features
Code health
A defect-validated 1 to 10 score per file. Zero LLM.
Agent provenance
See how much of your code AI wrote, and whether it is healthy.
AI context (MCP)
Ten MCP tools that give your agent real codebase context.
Change risk
A 0 to 10 defect-risk score for any commit or PR.
Security
Reachability-aware CVE triage on your dependency graph.
Auto wiki
A documented wiki of your codebase that rebuilds itself.
Git intelligence
Hotspots, ownership, hidden coupling, and bus factor.
Architecture (C4)
C4 system context, containers, and components.
Decisions
Architectural decisions mined from eight sources.
Solutions
developers
Give Claude Code, Cursor, and any MCP client a queryable model of your repo.
teams
One shared index, one credit pool, one org install. The whole team on the same brain.
team leads
Flag the risky PRs, the hotspots, and the hidden coupling, on every pull request.
engineering leaders
See how much of your code AI wrote, whether it is healthy, and who owns it.
security
CVE triage that knows whether you actually call the vulnerable code.
enterprise
Self-hosted, air-gapped, and commercially licensed for the whole org.
Book a demo →
Guides
Code healthAI context & MCPGit intelligenceChange riskArchitectureAuto-wikiDecisions & ADRsAgent provenanceSecurityAll guides →
Compare
vs CodeScenevs DeepWikivs Sourcegraphvs Cursorvs GitClearvs SonarQubeAll comparisons →
PricingExploreBlogDocs
Star—Sign in
Start free
Blog/MCP & AI Agents

How to Set Up an MCP Server for Claude Code, Cursor, and Cline

repowise team·April 1, 2026·8 min read

mcp server claude code · cursor mcp server setup · cline mcp tools · mcp server setup · mcp server for codebase

On this page
  • Why You Need an MCP Server for Your AI Editor
  • Prerequisites
  • Python 3.10+
  • A Repository to Index
  • An LLM API Key (Optional)
  • Step 1: Install repowise
  • Step 2: Index Your Codebase
  • What repowise init Does
  • Choosing Your LLM Provider (or Skipping It)
  • Understanding the Output
  • Step 3: Start the MCP Server
  • stdio Mode (Default)
  • SSE Mode (Remote/Shared)
  • Step 4: Configure Your Editor
  • Claude Code Setup
  • Cursor Setup
  • Cline (VS Code) Setup
  • Step 5: Verify It Works
  • Testing getoverview()
  • Testing getcontext()
  • Common Setup Issues and Fixes
  • Database Not Found
  • Permission Errors
  • Timeout Issues
  • Advanced Configuration
  • Environment Variables
  • Custom Database Path
  • Running as a Background Service
  • Key Takeaways
  • FAQ
  • Does repowise send my code to a third party?
  • Which languages are best supported?
  • Can I use this with VS Code's native Copilot?

The fundamental bottleneck in AI-assisted engineering isn't the model's reasoning capability; it’s the context window. Even with million-token windows, stuffing a raw codebase into a prompt leads to "lost in the middle" phenomena, high latency, and staggering API costs. The industry is shifting away from simple retrieval-augmented generation (RAG) toward structured codebase intelligence.

New to the why behind this shift? Start with the hub: giving AI coding agents real codebase context.

The Model Context Protocol (MCP) is the bridge that allows AI agents, like Claude Code, Cursor, and Cline, to query your codebase as if they were a senior engineer who has spent years in the repo. Instead of reading files one by one, an MCP server provides a standardized interface for agents to ask high-level questions: "What is the architecture here?", "Which modules are most at risk?", or "Where are the unused exports?"

In this guide, we will walk through setting up a professional-grade MCP server using repowise, an open-source platform designed to provide deep git intelligence and dependency analysis to AI agents.

MCP System ArchitectureMCP System Architecture

Why You Need an MCP Server for Your AI Editor

Most AI editors rely on simple keyword search or basic vector embeddings. While useful, these methods lack "structural awareness." They don't understand that a change in auth.ts might break a seemingly unrelated downstream consumer in billing.py.

An MCP server powered by repowise solves this by providing:

  1. Deterministic Relationships: It parses imports across 16 languages to build a true dependency graph.
  2. Git-Aware Context: It knows who owns which file and which files are "hotspots" (high churn and high complexity).
  3. Graph-Based Retrieval: Instead of just finding similar text, it can trace the path between two modules using repowise's architecture and graph algorithms like PageRank.
  4. Reduced Hallucinations: By providing LLM-generated documentation with freshness scores, the agent relies on verified facts rather than guessing what a function does based on its name.

Prerequisites

Before we begin, ensure your environment meets the following requirements:

Python 3.10+

repowise is built on a modern Python stack to handle heavy AST parsing and graph computations. We recommend using a virtual environment or a tool like uv for faster dependency management.

A Repository to Index

You’ll need a local clone of the codebase you want to analyze. repowise supports Python, TypeScript, JavaScript, Go, Rust, Java, C++, C, Ruby, and Kotlin.

An LLM API Key (Optional)

An LLM API key is not required to get value from the first index. repowise init --no-prose builds a full deterministic wiki, dependency graph, git intelligence, and code-health scores with no API key and no LLM spend. If you want LLM-generated prose summaries and "Why" write-ups on top of that, you can point repowise at OpenAI, Anthropic, Google Gemini, or a local Ollama instance and upgrade individual pages later with --prose.

Step 1: Install repowise

The easiest way to get started is via pip. This installs the CLI tool which includes both the indexer and the MCP server.

bash
pip install repowise

Alternatively, if you prefer running from source to contribute to the AGPL-3.0 project, you can clone the GitHub repository.

Step 2: Index Your Codebase

Before the MCP server can answer questions, it needs to "understand" your code. This happens during the indexing phase.

Navigate to your project root and run:

bash
repowise init

What repowise init Does

This command initiates a multi-stage pipeline:

  1. AST Parsing: It scans your files to identify classes, functions, and imports.
  2. Graph Construction: It builds a directed graph of how your code interacts.
  3. Git Mining: It analyzes your commit history to calculate bus factors and hotspots.
  4. Documentation Generation: It uses your configured LLM to write high-level summaries for every module.

Choosing Your LLM Provider (or Skipping It)

During the init process, you can choose --no-prose to skip LLM calls entirely and get the free deterministic wiki right away. If you want LLM-generated prose, you will be prompted for your provider; if you are concerned about data privacy, point repowise to a local Ollama instance instead of a cloud provider.

Understanding the Output

repowise creates a .repowise directory in your project root. This contains a SQLite database for structured data and a LanceDB/pgvector store for semantic search. You can see what repowise generates on real repos by checking out our live demos.

Step 3: Start the MCP Server

Once indexed, you can expose this data to your AI agents. The repowise MCP server supports two primary communication modes.

stdio Mode (Default)

This is the most common setup for local editors like Cursor and Claude Code. The editor starts the repowise process and communicates via standard input/output.

bash
repowise mcp start

SSE Mode (Remote/Shared)

If you are hosting repowise on a central server for a whole team, use Server-Sent Events (SSE). This allows multiple clients to connect to a single indexed instance of the codebase.

bash
repowise mcp start --mode sse --port 8000

MCP Tool RegistryMCP Tool Registry

Step 4: Configure Your Editor

This is where the magic happens. By connecting your editor to the MCP server, you give your AI agent "superpowers."

Claude Code Setup

Claude Code is Anthropic's command-line agent. To add repowise, edit your claude_desktop_config.json (usually located in ~/Library/Application Support/Claude/ on macOS or %APPDATA%/Claude/ on Windows).

json
{
  "mcpServers": {
    "repowise": {
      "command": "repowise",
      "args": ["mcp", "start"],
      "env": {
        "REPOWISE_PATH": "/path/to/your/repo"
      }
    }
  }
}

Cursor Setup

Cursor has built-in support for MCP.

  1. Go to Cursor Settings > Features > MCP Servers.
  2. Click + Add New MCP Server.
  3. Name: repowise
  4. Type: command
  5. Command: repowise mcp start

Cline (VS Code) Setup

Cline (formerly Claude Dev) allows for powerful open-source workflows.

  1. Open Cline in VS Code.
  2. Click the Settings (gear icon).
  3. Scroll to MCP Servers.
  4. Add the configuration similar to the Claude Desktop JSON above.

Step 5: Verify It Works

Once configured, restart your editor or agent. You can now verify the connection by asking the agent questions that require global codebase knowledge.

Testing get_overview()

Ask: "Give me a high-level overview of this project's architecture." The agent should call the get_overview() tool and return a summary of the tech stack, entry points, and module map. You can see all 10 MCP tools in action on our FastAPI demo page to compare the output.

Testing get_context()

Ask: "Who owns the auth module and what are its main dependencies?" The agent will use get_context() to pull git ownership data and import relationships. This is much more accurate than the agent trying to guess by reading the file content alone.

Editor Context LoopEditor Context Loop

Common Setup Issues and Fixes

Database Not Found

If the MCP server starts but the agent reports "No data found," ensure you have run repowise init in the correct directory. The server looks for the .repowise folder. You can explicitly set the path using the REPOWISE_DB_PATH environment variable.

Permission Errors

On macOS/Linux, ensure the repowise binary is in your PATH. If you installed via pip in a virtual environment, you may need to provide the full path to the executable in your editor configuration (e.g., /Users/name/env/bin/repowise).

Timeout Issues

Large repositories (1M+ lines) can occasionally cause timeouts during the initial get_overview() call. You can increase the timeout in Cursor settings or optimize your index by excluding large vendor directories (like node_modules or venv) in your .repowise/config.yaml.

Advanced Configuration

For professional setups, you can customize how the MCP server behaves.

Environment Variables

  • REPOWISE_LOG_LEVEL: Set to DEBUG to see the JSON-RPC traffic.
  • REPOWISE_LLM_PROVIDER: Switch between anthropic, openai, or ollama on the fly.
  • REPOWISE_GRAPH_DEPTH: Control how many layers of dependencies are returned in get_context.

Custom Database Path

If you are managing multiple projects, you can store your repowise indices in a central location:

bash
repowise mcp start --db-path ~/.cache/repowise/my-project.db

Running as a Background Service

For persistent SSE access, we recommend using systemd or docker. This ensures that the repowise architecture is always available for your agents without needing to manually start the server every morning.

Key Takeaways

Setting up an MCP server with repowise transforms your AI editor from a simple autocomplete tool into a deeply informed architectural partner. By moving beyond text-based retrieval and embracing git intelligence and dependency graphs, you significantly reduce the cognitive load of navigating complex codebases.

  • Structure over Search: Don't just search for text; query the graph.
  • Git Matters: Use hotspot analysis to identify where your AI agent should be most cautious.
  • Standardization: MCP is the future of AI-tool interoperability. Setting it up now prepares your workflow for the next generation of agents.

Ready to see it in action? Explore the ownership map for Starlette to see the kind of intelligence repowise brings to your MCP-enabled editor.

FAQ

Does repowise send my code to a third party?

Only if you configure a cloud LLM provider (like Anthropic or OpenAI). If you use the Ollama provider, all processing stays local.

Which languages are best supported?

TypeScript and Python have the deepest AST integration, but all 10+ supported languages benefit from full git intelligence and dependency mapping.

Can I use this with VS Code's native Copilot?

Currently, Copilot does not fully support the MCP standard. We recommend using Cursor or the Cline extension for the best experience.

Run this on your own codebase

repowise indexes a repo and generates the docs, the dependency graph and the MCP tools an agent reads from. Free for two public repos.

Index your repo freeBrowse the guides

On this page

  • Why You Need an MCP Server for Your AI Editor
  • Prerequisites
  • Python 3.10+
  • A Repository to Index
  • An LLM API Key (Optional)
  • Step 1: Install repowise
  • Step 2: Index Your Codebase
  • What repowise init Does
  • Choosing Your LLM Provider (or Skipping It)
  • Understanding the Output
  • Step 3: Start the MCP Server
  • stdio Mode (Default)
  • SSE Mode (Remote/Shared)
  • Step 4: Configure Your Editor
  • Claude Code Setup
  • Cursor Setup
  • Cline (VS Code) Setup
  • Step 5: Verify It Works
  • Testing getoverview()
  • Testing getcontext()
  • Common Setup Issues and Fixes
  • Database Not Found
  • Permission Errors
  • Timeout Issues
  • Advanced Configuration
  • Environment Variables
  • Custom Database Path
  • Running as a Background Service
  • Key Takeaways
  • FAQ
  • Does repowise send my code to a third party?
  • Which languages are best supported?
  • Can I use this with VS Code's native Copilot?

Related posts

mcp10 min read

Your MCP Server Is Probably Not Being Called

We ran the same MCP servers and questions on two agent harnesses. Under Claude Code most tools were barely called at all. Here is the measured cause of it.

2026-08-06Read →
mcp10 min read

Giving AI Coding Agents Real Codebase Context

Codebase context for AI agents turns one index into 10 task-shaped MCP tools, cutting real agent-loop output tokens 31.6% on Codex. See how structured context works, try repowise.

2026-06-26Read →
comparisons13 min read

Best MCP Servers for Coding Agents

best mcp servers for coding agents only matter if they answer a hard question: which server gives an agent the right context with the fewest extra tool…

2026-05-20Read →

Index your repo free

Index your repo freeRead the docs
repowiserepowise

Codebase intelligence for AI agents. Open source under AGPL-3.0, hosted SaaS for teams.

Features
  • Code health
  • Agent provenance
  • AI context (MCP)
  • Change risk
  • Security
  • Auto wiki
  • Git intelligence
  • Architecture (C4)
  • Decisions
Solutions
  • For developers
  • For teams
  • For team leads
  • For engineering leaders
  • For security
  • For enterprise
Compare
  • vs CodeScene
  • vs DeepWiki
  • vs Sourcegraph
  • vs Cursor
  • vs GitClear
  • vs SonarQube
  • vs Snyk Code
  • vs Codacy
  • vs Code Climate / qlty
  • vs Qodo
  • vs Greptile
  • vs Swimm
  • vs CodeRabbit
  • vs CodeGraph
  • vs Graphify
  • vs Serena
  • vs code-review-graph
  • All comparisons
Guides
  • Code health
  • AI context & MCP
  • Git intelligence
  • Change risk
  • Architecture
  • Auto-wiki
  • Decisions & ADRs
  • Agent provenance
  • Security
  • All guides
Product
  • Pricing
  • PR Bot
  • Browse indexed repos
  • Health leaderboard
  • Book a demo
Resources
  • GitHub
  • Docs
  • Benchmarks
  • Blog
  • Discord
About
  • Founder
  • Architecture
  • Contact
Legal
  • Privacy
  • Terms
  • Security
© 2026 repowise. AGPL-3.0.hello@repowise.dev
Featured on Aura++