Skip to main content
Glama

Codna

Understand. Fix. Evolve.

Agents read your code. Codna understands it.

Codna maps a repository before it spends a token. It then reviews pull requests, fixes bugs and proves which scanner findings are reachable. The same codna command runs on your machine, in the GitHub Action and behind the GitHub App.

Runs on your machine or your cloud. Your code never leaves without your key.

Install

pip install codna          # or: pipx install codna · uv tool install codna
codna --version

Python 3.12–3.13. Wheels for macOS on Apple silicon and Linux x86_64. git on your PATH. Nothing else to install: no Node, Bun, Docker or server. The agent runtime ships inside the wheel.

Local commands need no Codna key. fix and review use your own model provider key, stored in the OS keychain and never printed:

codna key set anthropic    # also: openai, gemini, google, groq, mistral, openrouter, xai, cursor

Related MCP server: Probe Server

Commands

codna triage . --issue "checkout total is wrong"     # suspect files. Deterministic. 0 LLM tokens.
codna review . --pr 123 --post                        # findings with a verdict on the pull request
codna fix . --tests --apply --max-iterations 3        # patch, re-run your tests, re-fix until green
codna fix <git url> --ref <sha> --issue "…" --open-pr # push a branch and open a pull request
codna secure . --from-sarif results.sarif             # which scanner findings are reachable. 0 LLM tokens.

codna fix prints the root cause, the impacted symbols, the blast radius, its confidence and a regression risk. --open-pr needs a git URL and a GitHub write token. codna review posts one inline comment per finding with severity, category and a suggestion block, and an Approve when the diff is clean at medium and high. codna secure reads SARIF 2.1.0 from CodeQL, Semgrep, Snyk, Trivy or any other scanner.

Other commands: init, status, doctor, login, key, impact, memory export, report. Full reference: docs.codna.ai/reference/cli.

MCP server

Run Codna as a Model Context Protocol server over stdio — the same engine the CLI uses, inside Cursor, Claude Desktop, or your own agent:

pipx install "codna[mcp]"       # or: pip install "codna[mcp]"
codna mcp                       # serve over stdio
codna mcp install --client cursor     # optional: write the client config for you (or --client claude)

Five tools, each returning JSON; a failure comes back as codna_<tool> error: … text and never crashes the server:

Tool

What it does

Needs

codna_triage

Understand a repo and locate the code relevant to an issue. Deterministic, 0 LLM tokens.

free codna login

codna_secure

Prove which SARIF scanner findings (CodeQL, Semgrep, Snyk, Trivy) are reachable. Read-only, 0 LLM tokens.

free codna login

codna_recall

Recall code from local on-device memory — semantic + lexical search, fully offline.

free codna login (which also installs the on-device runtime)

codna_fix

Root-cause and plan a fix (read-only by default); with open_pr=true pushes a branch and opens a real PR.

free codna login + provider key (BYOK; + GITHUB_TOKEN for open_pr=true)

codna_report_bug

File a bug, feature, or question to thyn-ai/feedback.

free codna login + GITHUB_TOKEN (else returns a pre-filled URL)

Introspection (initialize/tools/list) needs no credentials. Executing any of the five tools requires the one-time free community login (codna login — device authorization, free community license) — fully offline thereafter. codna_fix additionally needs a provider key (BYOK, e.g. ANTHROPIC_API_KEY); codna_report_bug needs GITHUB_TOKEN or it returns a pre-filled issue URL; codna_recall additionally uses the on-device memory runtime that the same codna login installs. Full reference: docs.codna.ai/guides/mcp.

Code memory

Code memory and recall run on your machine after a one-time free codna login (device authorization), which also installs the signed on-device runtime. From then on, recall runs fully offline: no key, no network calls. The optional codna[memory] extra adds the on-device semantic reranker; without it, recall ranks lexically.

What leaves your machine

  • Repository mapping, triage, recall and impact run offline. No model is involved.

  • fix and review send one issue-specific evidence bundle to the provider you chose, under your key. Not the repository.

  • Secret redaction is always on and cannot be turned off.

  • privacy.egress: fail-closed in codna.yaml refuses to run tests without network denial and skips registry lookups during review.

  • Source distributions exclude runtime binaries, keys, .env files and logs.

Available Tools

5 tools
codna_fixA

Find and fix a bug. Runs the full Codna agent + engine + risk simulation.

Requires the one-time free codna login device authorization (free community license) plus a provider key (BYOK — e.g. ANTHROPIC_API_KEY or codna key set anthropic). Offline truth: planning calls the provider API (network), and only open_pr=true writes to GitHub — codna_triage, codna_secure and codna_recall are the fully-offline tools.

Returns the root cause, confidence, model, and (when open_pr) the pull_request_url. Failures come back as 'codna_fix error: ...' text — the tool never raises.

Inputs: ref, repo, issue, model, +1 more. Returns: result

codna_recallA
Read-onlyIdempotent

Recall relevant code from the local on-device Telys memory — semantic + lexical search over the symbols this machine has already indexed, with zero LLM tokens and zero network calls.

Use when you need the code behind a concept ("where is SARIF provenance validated?") rather than a whole-repo map (codna_triage) — and when you want it offline. The index is built on first use (an empty index auto-indexes the repo, once) and is stored outside the git checkout. On a fresh machine, first use requires the one-time free codna login device authorization (free community license); the on-device memory runtime arrives via the login-gated runtime install. After that, recall is fully offline with no key and no network calls.

repo: a local path or git URL (default: current directory, or the server default set by codna mcp start --repo). query: what to recall (required — an empty query returns an error string). service: optional service name to scope recall to one service in a monorepo (default: all services). language: optional language filter such as "python" (default: all indexed languages). final_k: maximum number of symbols to return (default: 8). Returns matching symbols, the ranking explanation, and the candidate count as JSON. Failure modes (missing query, Telys memory not installed, unreadable repo) come back as "codna_recall error: ..." text — the tool never raises.

Inputs: repo, query, final_k, service, +1 more. Returns: result

codna_report_bugA

File a report to thyn-ai/feedback — the public front door for algenta, codna, telys, and sqai. Files the same shape of issue codna report (the CLI) does. It only files the issue — codna_fix is the one that can open a PR with the fix.

Requires the one-time free codna login device authorization (free community license); auto-filing additionally needs a GitHub token (else a pre-filled URL).

title: a short summary, e.g. "codna fix hangs on a monorepo". body: what happened, or what you want — as much detail as you have. product: one of algenta, codna, telys, sqai, accounts, docs (default: codna). include_diagnostics: attach the same redacted output codna doctor prints — no secret values, only which config sources are set. Off by default. Returns the filed issue's URL, or — if it couldn't file automatically (no GitHub token reachable, offline) — a pre-filled URL for a human to finish submitting.

Inputs: title (required), body, product, include_diagnostics. Returns: result

codna_secureA
Read-onlyIdempotent

Prove which scanner findings are reachable. Ingests a SARIF 2.1.0 report (CodeQL / Semgrep / Snyk / Trivy), classifies each finding (exploitable / production-reachable / unreachable / unknown) via the local engine, and reports which are autofix-eligible. Read-only, deterministic, 0 LLM tokens — the SARIF file is the only input read; the repo is never scanned and the agent sidecar never starts.

sarif_path is REQUIRED (see the input schema) — there is no workspace scan or default-path fallback. SARIF provenance (tool name + revision) must be complete or the report is rejected. All failures come back as 'codna_secure error: ...' text — the tool never raises.

Requires the one-time free codna login device authorization (free community license); fully offline thereafter.

Inputs: sarif_path (required), ref, repo. Returns: result

codna_triageA
Read-onlyIdempotent

Understand a repository and locate the code relevant to an issue.

The sibling tools act, this one maps: codna_fix plans/acts on one bug and codna_recall retrieves stored code memory — triage is the zero-token map + suspect-file list you run first.

Requires the one-time free codna login device authorization (free community license); fully offline thereafter.

repo: a local path or a git URL (default: current directory). issue: optional description of what you're looking for. Returns suspect files + the context-reduction the engine achieved (0 LLM tokens).

Inputs: repo, issue. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a clearly distinct workflow: triage maps issues to suspect files, fix performs the actual bug fix, recall searches local code memory, secure classifies SARIF findings, and report_bug files feedback. There is minor conceptual overlap between triage and recall, but their descriptions draw a clear line between whole-repo mapping and concept-level symbol recall.

    Naming Consistency4/5

    All tools share the codna_ prefix and use lowercase imperative verbs, giving a predictable and recognizable pattern. The only small deviation is report_bug, which appends an object noun, while the others are bare verbs.

    Tool Count5/5

    Five tools is well-scoped for a coding-agent server: triage, fix, recall, secure, and bug reporting each cover a distinct high-level capability without redundancy. The count feels intentional rather than padded.

    Completeness4/5

    The toolset covers the main workflows an agent needs: locating relevant code, fixing bugs, recalling indexed symbols, verifying security findings, and reporting issues. Minor gaps exist such as no general issue-creation tool or explicit test/verify step, but these can be worked around via the CLI or GitHub.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for persistent code exploration and diff-aware review, exposing explore and review tools to map call paths, blast radius, and generate explainable risk-scored reports.
      4 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides a set of MCP tools to clone and analyze arbitrary MCP server repositories, run static and dynamic security probes in isolated Docker containers, and produce vulnerability verdicts with a human-in-the-loop approval step before filing public reports.
      MIT