Skip to content
MCP server

Codna — repository intelligence

Repo triage, bug-fix pull requests and scanner reachability checks for coding agents

Runs locallyStatus and history
Install
Pricing
Freemium
Platforms
CLI, macOS, Linux
Runs
Locally
Version
0.2.113
Listing updated
3 days ago

About Codna — repository intelligence

Codna — repository intelligence is a freemium MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Five tools share the engine of the codna command line. Triage and secure spend no model tokens: triage maps the repository's symbols, dependencies and blast radius and names the suspect files for an issue, and secure reads SARIF 2.1.0 results from CodeQL, Semgrep, Snyk, Trivy or other scanners to show which findings are actually reachable. Recall searches a local on-device memory, semantic and lexical, fully offline.

The fix tool plans a root-cause fix in read-only mode by default and reports confidence, blast radius and regression risk. With open_pr set it pushes a branch and opens a real pull request, which needs a GitHub write token; the project says it never merges. Only the evidence bundle goes to your model provider, with your own key (Anthropic, OpenAI or Gemini), and secrets are redacted.

Every tool needs a one-time free codna login before it executes, although listing tools needs no credentials. The vendor's own benchmark compares it with Cursor on 87 matched bug-fix cases, reporting 16.2K against 81.0K average tokens per fix. It installs from PyPI for Python 3.12 or 3.13, with wheels for Apple-silicon macOS and x86_64 Linux.

Install

Run in a terminal

claude mcp add codna --env ANTHROPIC_API_KEY='<ANTHROPIC_API_KEY>' --env OPENAI_API_KEY='<OPENAI_API_KEY>' --env GEMINI_API_KEY='<GEMINI_API_KEY>' --env GITHUB_TOKEN='<GITHUB_TOKEN>' --env CODNA_API_KEY='<CODNA_API_KEY>' -- uvx codna

Add to claude_desktop_config.json

{
  "mcpServers": {
    "codna": {
      "command": "uvx",
      "args": [
        "codna"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>",
        "GITHUB_TOKEN": "<GITHUB_TOKEN>",
        "CODNA_API_KEY": "<CODNA_API_KEY>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "codna": {
      "command": "uvx",
      "args": [
        "codna"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>",
        "GITHUB_TOKEN": "<GITHUB_TOKEN>",
        "CODNA_API_KEY": "<CODNA_API_KEY>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "codna": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "codna"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>",
        "GITHUB_TOKEN": "<GITHUB_TOKEN>",
        "CODNA_API_KEY": "<CODNA_API_KEY>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "codna": {
      "command": "uvx",
      "args": [
        "codna"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>",
        "GITHUB_TOKEN": "<GITHUB_TOKEN>",
        "CODNA_API_KEY": "<CODNA_API_KEY>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "codna": {
      "command": "uvx",
      "args": [
        "codna"
      ],
      "env": {
        "ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "GEMINI_API_KEY": "<GEMINI_API_KEY>",
        "GITHUB_TOKEN": "<GITHUB_TOKEN>",
        "CODNA_API_KEY": "<CODNA_API_KEY>"
      }
    }
  }
}

Configuration

  • ANTHROPIC_API_KEYProvider key for codna_fix's planner — any one of ANTHROPIC_API_KEY (Anthropic), OPENAI_API_KEY (OpenAI/ChatGPT), or GEMINI_API_KEY (Gemini) works (or store one with `codna key set <provider>`). Every tool also requires the one-time free `codna login` device authorization before executing; introspection (initialize/tools/list) needs no credentials.
  • OPENAI_API_KEYAlternative provider key (OpenAI/ChatGPT) for codna_fix's planner — see ANTHROPIC_API_KEY.
  • GEMINI_API_KEYAlternative provider key (Gemini) for codna_fix's planner — see ANTHROPIC_API_KEY.
  • GITHUB_TOKENWrite token, only for codna_fix with open_pr=true (opens a pull request) and codna_report_bug (files an issue).
  • CODNA_API_KEYCodna key from the one-time free `codna login` (device authorization, free community license). Required to execute any of the five tools; introspection (initialize/tools/list) needs none.

Tools this server provides (5)

Taken from the project documentation; the running server may differ.

codna_triage
Understand a repo and locate code relevant to an issue, with zero model tokens.
codna_secure
Prove which SARIF scanner findings are reachable.
codna_recall
Recall code from local on-device memory, offline.
codna_fix
Root-cause and plan a fix; with open_pr=true opens a pull request.
codna_report_bug
File a bug, feature or question to the project's feedback repository.

What it does

Zero-token triage
Locate code relevant to an issue from a deterministic dependency graph.
Reachability for scanner findings
Show which SARIF findings can actually be reached.
Fix planning and pull requests
Plan a fix read-only, or push a branch and open a PR.
On-device recall
Search remembered code offline with semantic and lexical matching.
Bring your own key
Fixes call the provider you choose with a key stored locally.
Bug reporting
File a bug, feature request or question from the client.

Good for

  • Find which files matter for a bug before an agent opens any
  • Cut a long scanner report down to reachable findings
  • Have an agent propose a fix with a stated regression risk
  • Open a fix pull request from an issue while keeping merge control

Pricing

Freemium, from $20 a month

Free with your own model key; Pro $20/mo, Pro+ $60/mo, Ultra $200/mo, Team $40/mo

Prices change. Check codna.ai before you buy.

Codna — repository intelligence FAQ

Does it cost anything?

The CLI and MCP server are free with your own model key. Managed plans start at $20 a month for Pro.

Which model keys work for fixes?

Any one of ANTHROPIC_API_KEY, OPENAI_API_KEY or GEMINI_API_KEY, or a key stored with codna key set.

What do I need before the tools run?

The one-time free codna login. Fix also needs a provider key, and open_pr needs GITHUB_TOKEN.

Will it merge pull requests?

No. The project says it opens pull requests and leaves the merge to you.

Is Codna — repository intelligence free?

Codna — repository intelligence has a free plan, with paid plans for more usage or features. Paid plans start at $20 a month.

How do I add Codna — repository intelligence to Claude Code?

Run this command in your terminal: claude mcp add codna --env ANTHROPIC_API_KEY='<ANTHROPIC_API_KEY>' --env OPENAI_API_KEY='<OPENAI_API_KEY>' --env GEMINI_API_KEY='<GEMINI_API_KEY>' --env GITHUB_TOKEN='<GITHUB_TOKEN>' --env CODNA_API_KEY='<CODNA_API_KEY>' -- uvx codna

What are the best alternatives to Codna — repository intelligence?

The closest alternatives to Codna — repository intelligence are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Codna — repository intelligence

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools