Skip to content

Connecting CodeNavi to Kiro

Kiro is an agentic IDE (with a CLI) that speaks MCP natively. Point it at CodeNavi and its agent gets CodeNavi's tools: semantic search, the call graph (find_callers, impact_analysis, diff_impact), the overview and the index tools by default, with grep, file reading and the rest one reveal_tools() call away (config.md).

The endpoint

  • URL: http://localhost:8765/mcp (unscoped) or /mcp/<codebase> (scoped)
  • Header: Authorization: Bearer <CODENAVI_AUTH_TOKEN>
  • Get the token from your install's .env: grep '^CODENAVI_AUTH_TOKEN=' .env | cut -d= -f2- (run from your install directory)

The /connect page on your server builds the exact block for you, with your server's address and token filled in.

Configure it

Kiro reads two files and merges them; the workspace file wins:

  • ~/.kiro/settings/mcp.json: every workspace
  • .kiro/settings/mcp.json: this workspace only

Add:

{
  "mcpServers": {
    "codenavi": {
      "url": "http://localhost:8765/mcp",
      "headers": { "Authorization": "Bearer <PASTE_TOKEN>" }
    }
  }
}

If your server runs with auth turned off, drop the headers line.

To keep the token out of the file, write "Bearer ${CODENAVI_AUTH_TOKEN}" and export that variable. Kiro expands only the variables you approve: add CODENAVI_AUTH_TOKEN to the Mcp Approved Env Vars setting, or Kiro shows a warning and sends the header unexpanded.

Verify

Save the file. Kiro reconnects on save. Open the MCP panel: codenavi should show as connected with its tools listed. Then try:

"Use semantic_search to find where payment processing happens."

The things that bite people

  1. Plain HTTP works only for localhost. Kiro accepts http:// for a server on the same machine. For a server on another machine, give Kiro an HTTPS address: your tailnet name, or a reverse proxy with a certificate (Remote access).
  2. Unapproved variables are not expanded. A ${CODENAVI_AUTH_TOKEN} header gets a 401 until the variable is in Mcp Approved Env Vars.
  3. Unscoped vs scoped /mcp. Use unscoped /mcp unless you know the codebase name. /mcp/<name> returns Unknown codebase (404) for a name that isn't configured; a single-codebase install is usually named default.

Agent instructions

Kiro has no CodeNavi plugin. To make it prefer semantic_search over grep, copy the usage rules from the /connect page into a steering file (.kiro/steering/codenavi.md).

Privacy

Kiro's agent sends your prompts, and the code chunks CodeNavi returns, to its hosted models. Whatever leaves the agent leaves your machine. Scope CodeNavi to codebases you're comfortable sharing. The CodeNavi server itself never phones home.