# Codna — repository intelligence

> Codna — repository intelligence is a freemium MCP server for developer tools. Repo triage, bug-fix pull requests and scanner reachability checks for coding agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $20 a month
- **Platforms:** CLI, macOS, Linux, API
- **Website:** https://codna.ai
- **Repository:** https://github.com/thyn-ai/codna-cli
- **MCP Registry name:** io.github.thyn-ai/codna
- **Categories:** developer tools, security
- **Listing updated:** 2026-11-14

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

```sh
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
```

### Claude Desktop (claude_desktop_config.json)

```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>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```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>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```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>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```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>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## Tools

- `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.

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/codna-repository-intelligence
