Codevira MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add codevira -- uvx codevira-mcp --project-dir /path/to/your-project
README.md

Persistent memory and project context for AI coding agents

Codevira MCP

Persistent memory and project context for AI coding agents — across every session, every tool, every file.

Works with: Claude Code · Cursor · Windsurf · Google Antigravity · any MCP-compatible AI tool


The Problem

Every time you start a new AI coding session, your agent starts from zero.

It re-reads files it has seen before. It re-discovers patterns already established. It makes decisions that contradict last week's decisions. It has no idea what phase the project is in, what's already been tried, or why certain files are off-limits.

You end up spending thousands of tokens on re-discovery — every single session.

Codevira fixes this.


What It Does

Codevira is a Model Context Protocol server you drop into any project. It gives every AI agent that works on your codebase a shared, persistent memory:

Capability What It Means
Context graph Every source file has a node: role, rules, dependencies, stability, do_not_revert flags
Semantic code search Natural language search across your codebase — no grep, no file reading
Roadmap Phase-based tracker so agents always know what phase you're in and what comes next
Changeset tracking Multi-file changes tracked atomically; sessions resume cleanly after interruption
Decision log Every session writes a structured log; past decisions are searchable by any future agent
Agent personas Seven role definitions (Planner, Developer, Reviewer, Tester, Builder, Documenter, Orchestrator) with explicit protocols

The result: ~1,400 tokens of overhead per session instead of 15,000+ tokens of re-discovery.


How It Works

Agent Session Lifecycle

flowchart TB

Start([Start Session])

subgraph Orientation
A[Check Open Changesets]
B[Get Project Roadmap]
C[Search Past Decisions]
D[Load Graph Context\nget_node • get_impact]
end

subgraph Execution
E[Plan Task]
F[Implement Code]
G[Run Tests / Validation]
end

subgraph Completion
H[Update Graph Metadata]
I[Write Session Log]
J[Complete Changeset]
end

Start --> A
A --> B
B --> C
C --> D
D --> E
E --> F
F --> G
G --> H
H --> I
I --> J

Code Intelligence Model

flowchart TB

A[Source Code]

subgraph Structural Analysis
B[AST Parser]
C[Function / Class Extraction]
D[Dependency Analysis]
end

subgraph Knowledge Stores
E[(Semantic IndexChromaDB)]
F[(Context GraphYAML Nodes)]
end

subgraph Runtime Access
G[MCP Query Layersearch_codebase • get_node • get_impact]
end

H[AI Coding AgentClaude Code • Cursor]

A --> B
B --> C
C --> E

B --> D
D --> F

E --> G
F --> G

G --> H

Quick Start

1. Install

pip install codevira-mcp

2. Initialize in your project

cd your-project
codevira-mcp init

This single command:

  • Creates .codevira/ with config, graph, and log directories
  • Adds .codevira/ to .gitignore (index is auto-regenerated, no need to commit)
  • Prompts for project name, language, source directories (comma-separated), and file extensions
  • Builds the full code index
  • Auto-generates graph stubs for all source files
  • Bootstraps .codevira/roadmap.yaml from git history
  • Installs a post-commit git hook for automatic reindexing
  • Prints the MCP config block to paste into your AI tool

3. Connect to your AI tool

Depending on your IDE and environment, codevira-mcp may not automatically be in your PATH. You can use uvx (the easiest option) or provide the absolute path to your Python virtual environment.

Option A: Using uvx (Recommended for all IDEs without local install) If you use `uv`, you can run the MCP server seamlessly without managing virtual environments per project.

Claude Code (.claude/settings.json), Cursor / Windsurf (Settings → MCP):

{
  "mcpServers": {
    "codevira": {
      "command": "uvx",
      "args": ["codevira-mcp", "--project-dir", "/path/to/your-project"]
    }
  }
}

Option B: Using Local Venv (Recommended, works everywhere) Point your AI tool directly to the Python runtime inside your .venv where codevira-mcp is installed.

Claude Code (.claude/settings.json) or Cursor / Windsurf (Settings → MCP):

{
  "mcpServers": {
    "codevira": {
      "command": "/path/to/your-project/.venv/bin/python",
      "args": ["-m", "mcp_server", "--proje

Tools (3)

search_codebasePerforms natural language semantic search across the codebase
get_nodeRetrieves context graph node information for a specific file
get_impactAnalyzes the impact of changes on the project graph

Configuration

claude_desktop_config.json
{"mcpServers": {"codevira": {"command": "uvx", "args": ["codevira-mcp", "--project-dir", "/path/to/your-project"]}}}

Try it

Search the codebase for where the authentication logic is defined.
What is the current phase of our project roadmap?
Get the context graph node for the main API controller to understand its dependencies.
Summarize the past decisions made regarding the database schema migration.
Analyze the impact of modifying the user service file on the rest of the project.

Frequently Asked Questions

What are the key features of Codevira MCP?

Persistent context graph tracking roles, rules, and dependencies for every file. Natural language semantic code search across the entire codebase. Phase-based project roadmap tracking for AI agents. Atomic changeset tracking for multi-file updates. Structured decision logging for session continuity.

What can I use Codevira MCP for?

Maintaining project context across multiple AI coding sessions to reduce token overhead. Ensuring AI agents adhere to established project patterns and architectural decisions. Tracking project progress through phases to keep agents aligned with current goals. Quickly identifying dependencies and impact of code changes before implementation.

How do I install Codevira MCP?

Install Codevira MCP by running: pip install codevira-mcp

What MCP clients work with Codevira MCP?

Codevira MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Codevira MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare