# Tentra — Memory for AI Coding Agents

An MCP server that keeps a code graph for AI agents, maps architecture, and exposes call relationships before you change a symbol.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: rdanieli
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rdanieli/tentra-mcp
- Updated: 2026-06-11
- HTML: https://affpapa.org/en/nevibecode/mcp/tentra-memory-for-ai-coding-agents

## What it does

Tentra gives an agent a persistent model of a repository: files, symbols, imports, and call edges can be queried through MCP tools. It supports fuzzy symbol search, reference lookup, call-graph traversal, rename planning, hotspot reports, and snapshot comparisons. The same server can analyze a codebase into an architecture diagram, check diagram drift, and store contracts, ownership links, and architecture decisions.

Run `npx tentra-mcp init --hook` to generate IDE configuration, add a Git `post-commit` hook, and save the derived repository ID in `.tentra/metadata.json`. A generated configuration uses `TENTRA_API_KEY`; the local `npx tentra-mcp` mode can authenticate through GitHub. Codebase scanning requires the local server, while SSE is the remote connection option. That distinction matters when an agent must inspect files rather than query a hosted endpoint.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://trytentra.com/api/mcp`
- Environment variables: `TENTRA_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport sse tentra https://trytentra.com/api/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env TENTRA_API_KEY=<TENTRA_API_KEY> --transport stdio tentra-memory-for-ai-coding-agents -- npx -y tentra-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add tentra-memory-for-ai-coding-agents --env TENTRA_API_KEY=<TENTRA_API_KEY> -- npx -y tentra-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "tentra-memory-for-ai-coding-agents": {
            "url": "https://trytentra.com/api/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "tentra-memory-for-ai-coding-agents": {
            "command": "npx",
            "args": [
                "-y",
                "tentra-mcp"
            ],
            "env": {
                "TENTRA_API_KEY": "<TENTRA_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "tentra-memory-for-ai-coding-agents": {
            "type": "sse",
            "url": "https://trytentra.com/api/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "tentra-memory-for-ai-coding-agents": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "tentra-mcp"
            ],
            "env": {
                "TENTRA_API_KEY": "<TENTRA_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t sse tentra-memory-for-ai-coding-agents https://trytentra.com/api/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e TENTRA_API_KEY=<TENTRA_API_KEY> tentra-memory-for-ai-coding-agents npx -y tentra-mcp
```
Replace <…> with your own values

## When to use it
- index a repository and search its symbols
- trace every caller before changing a function
- prepare a rename plan for a symbol and its call sites
- compare an architecture diagram with the code
- rank highly connected code nodes

## Example prompts
- Index this repository with Tentra and list the symbols with the highest fan-in and fan-out.
- Find every caller of `processPayment` and prepare a safe rename plan.
- Check the architecture against the current code and report any drift.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
