Connect Your IDE — Setup Guide
Tentra connects to your IDE via the Model Context Protocol (MCP). Zero install — just add a URL.
Step 1: Sign in and get your API key
Sign in with GitHub at trytentra.com/login, then go to Settings to generate your API key.
Step 2: Add to your IDE
Cursor: Settings → Features → MCP → Add Server. Claude Code: Add to .mcp.json in your project root.
Step 3: Create your first architecture
Describe your system in natural language — "Design a payment system with Stripe, Kafka, and PostgreSQL." Your AI assistant will call create_architecture and return a link to the visual diagram on Tentra's interactive canvas.
Step 4: Export production code
Ask your agent to "Export that architecture as a Spring Boot project" (or FastAPI, Go chi, Rust Axum, Ruby Rails — 14 frameworks total). The export_architecture tool produces a real project scaffold you can unzip and run.
Step 5: Index your repo (optional secondary feature)
Tell your AI to "Index this codebase with Tentra". The tool walks your files, extracts symbols and imports locally via Tree-sitter, then the agent annotates each file with purpose and domain tags. Future AI sessions query the persistent graph for secondary code-graph queries (symbols, call graphs, architectural hotspots) and drift detection against your saved architecture.
Test the connection
In your IDE chat, type: "List my architectures". If you see a response from the list_architectures tool, you are all set.
Full MCP Tools Reference
Tentra exposes 36 MCP tools — architecture workspace (including mid-task spec-alignment), code-graph write-path, code-graph read-path (including find_references and safe_rename for refactor safety), and enrichment (contracts, decisions, ownership, domains). Your AI assistant will automatically choose the right tool based on your prompt.
- create_architecture — Design a new system from natural language
- update_architecture — Modify an existing architecture without recreating it
- get_architecture — Retrieve full details of a saved architecture
- list_architectures — Browse all saved architectures
- analyze_codebase — Scan code and auto-generate an architecture diagram
- lint_architecture — Run 9 quality rules: orphan nodes, SPOFs, god services, naming violations
- sync_architecture — Compare diagram vs codebase and detect drift (post-hoc, whole-repo)
- get_spec_alignment — Mid-task drift check: per service touched, returns declared edges + linked ADRs + drift signals for the files just edited
- export_architecture — Export to 14 frameworks: Java, Node.js, Python, Go, Rust, .NET, Kotlin, PHP, Ruby, Elixir, Docker, Terraform, Mermaid, ADR
- create_flow — Create step-by-step flow visualization for a use case
- index_code, index_code_continue, record_semantic_node, get_index_job — Walk a repo and populate the persistent code graph
- query_symbols, get_symbol_neighbors, get_service_code_graph, explain_code_path — Query the graph via MCP
- find_similar_code, record_embedding — pgvector cosine ANN with agent-generated embeddings
- list_god_nodes, get_quality_hotspots — Architectural smells and refactor candidates
- list_snapshots, diff_snapshots — Time-travel across indexed snapshots
Troubleshooting
- MCP tools not showing in IDE — Restart your IDE after adding or modifying .mcp.json. In Cursor, use Cmd+Shift+P and search "Reload Window". In Claude Code, restart the terminal session.
- API connection error — Verify that https://trytentra.com/api/health returns OK. Check your network connection and ensure no VPN or firewall is blocking the request.
- Architecture not found — The architecture ID may be incorrect or deleted. Use list_architectures to see all available architectures and verify the ID.
- npx tentra-mcp fails to start — Ensure Node.js 18+ is installed (node --version). Try clearing the npx cache: npx clear-npx-cache, then retry.
- Export generates empty files — Make sure the architecture has at least one service defined. Run get_architecture to verify the current state before exporting.