# Tentra — AI-native architecture for engineering teams > Describe a system in natural language, get an interactive diagram, export to production code in 14 frameworks, detect drift between diagrams and code. Built for Cursor, Claude Code, Codex, and Windsurf via MCP. Tentra is an AI-native architecture platform for engineering teams. Describe a system in natural language, get an interactive diagram, export to production code in 14 frameworks, detect drift between diagrams and code. Built for Cursor, Claude Code, Codex, and Windsurf via MCP. ## What Tentra Does - Generates architecture diagrams from natural-language system descriptions (no DSL, no manual drag-and-drop) - Provides an interactive canvas with 167 drag-drop cloud components (AWS, GCP, Azure, Kubernetes) - Exports production-ready project scaffolds in 14 frameworks (Java Spring Boot, Node.js, Python FastAPI, Go chi, Rust Axum, .NET ASP.NET, Kotlin Ktor, PHP Laravel, Ruby Rails, Elixir Phoenix, Docker Compose, Terraform, Mermaid, ADR) - Scans existing codebases to auto-generate architecture (analyze_codebase detects services from 8+ languages) - Detects architecture drift automatically — compares saved diagrams against live code, reports accuracy score 0–100 - Runs 9 quality lint rules (orphan nodes, SPOFs, god services, naming violations) - Operates as 36 MCP tools inside Cursor, Claude Code, Codex, and Windsurf ## Three Pillars **Pillar 1 — AI-native architecture generation.** Describe a system in natural language, get a typed, interactive diagram with services (api_gateway, service, database, queue, external) and connections (sync_http, async_event, db_access, grpc). Generated diagrams are first-class, versioned, shareable artifacts — not pictures. Tools: `create_architecture`, `update_architecture`, `analyze_codebase`, `lint_architecture`. **Pillar 2 — Export to real production code (14 frameworks).** Not boilerplate generators — real project scaffolds with service definitions, connections, health checks, and config. Java Spring Boot 3.2, Node.js Fastify + TypeScript, Python FastAPI + SQLAlchemy, Go chi + pgx, Rust Axum + tokio, .NET ASP.NET Core 8, Kotlin Ktor, PHP Laravel 11, Ruby Rails 7 API, Elixir Phoenix 1.7, Docker Compose, Terraform, Mermaid, ADR. Tool: `export_architecture`. **Pillar 3 — Drift detection: diagram vs code.** Saved architecture vs current codebase → accuracy score + structured diff. Runs any time, in CI, or during PR review. Tools: `sync_architecture` (post-hoc, whole-repo) and `get_spec_alignment` (mid-task; for the files the agent just edited, returns per-service spec context + linked ADRs + drift signals). ## Also Includes: Persistent Code-Graph Layer (secondary feature) Tentra also includes a persistent code-graph layer for AI coding agents: `index_code` walks a repo and stores files, symbols, imports, call edges, contracts, ADRs, and ownership in a queryable graph. Agents query symbols, call graphs, and architectural hotspots across sessions via MCP. Free in local mode (`npx tentra-mcp --local init`), complementing the architecture workspace. The semantic extraction runs inside the calling agent's own LLM context (agent-as-LLM pattern), so there is zero LLM spend on Tentra's side and no API-key setup for end users. ## MCP Tools (36 tools) ### Architecture (10 tools — primary) - create_architecture: Design a new system from natural language - update_architecture: Modify an existing architecture - get_architecture: Read architecture details - list_architectures: Browse saved designs - analyze_codebase: Scan code → diagram - lint_architecture: Quality checks (9 rules) - sync_architecture: Detect drift vs code (post-hoc, whole-repo) - get_spec_alignment: Mid-task spec drift — given just-edited files + architecture, returns per-service declared edges + linked ADRs + drift signals (unmapped files, orphan services) - export_architecture: Export to 14 frameworks - create_flow: Step-by-step flow visualization ### Code Graph Write (4 tools — secondary) - index_code: Walk a repo, run Tree-sitter extraction locally, start a semantic indexing job for the agent - index_code_continue: Resume an indexing job - record_semantic_node: Persist an agent-extracted semantic annotation for a file or symbol - get_index_job: Check status of an indexing job ### Code Graph Read (10 tools — secondary) - query_symbols: Fuzzy trigram search across indexed symbols - get_symbol_neighbors: BFS traversal in the call/import graph - get_service_code_graph: Subgraph for a canvas service - explain_code_path: Shortest path between two symbols with semantic context - find_similar_code: pgvector cosine ANN over agent-generated embeddings - record_embedding: Persist an agent-generated embedding vector - list_god_nodes: Highest fan-in/out symbols (architectural smells) - get_quality_hotspots: Churn × complexity ranking of refactor candidates - list_snapshots: Time-travel listing of indexed snapshots - diff_snapshots: Files / symbols / god-nodes added/removed between snapshots ### Enrichment (9 tools — secondary) — contracts, decisions, ownership, domains - set_service_mapping: Link an indexed file or symbol to a canvas service - set_domain_membership: Assign a service or file to a domain (bounded context) - record_contract: Store a parsed API contract payload (OpenAPI, GraphQL, Protobuf) - bind_contract: Link a contract to the symbol that implements it - record_decision: Create an Architecture Decision Record, optionally linking code - link_decision: Append a link from an ADR to another symbol, file, or service - get_ownership: Resolve the owner (team or person) for a file or service - get_decisions_for: List ADRs linked to a given entity - get_contracts: List contracts, optionally filtered by kind or service ## Export Formats Java (Spring Boot), Node.js (Fastify), Python (FastAPI), Go (chi), Rust (Axum), .NET (ASP.NET Core), Kotlin (Ktor), PHP (Laravel), Ruby (Rails), Elixir (Phoenix), Docker Compose, Mermaid, ADR, Terraform ## Who This Is For - Engineering teams that already spend on diagramming tools (IcePanel $40–80/editor/mo, Lucidchart $30–40/editor/mo, Structurizr on-prem ~$300/mo) and want AI generation + code export at comparable or better pricing. - Teams adopting AI coding workflows (Cursor, Claude Code in daily use) that want architecture to keep up — not stale docs that rot over sprints. - CTOs and lead engineers building new services who want "describe → diagram → code scaffold" in a single workflow. ## Setup (60 seconds, zero install) 1. Sign in at https://trytentra.com/login 2. Get API key at https://trytentra.com/settings 3. Add to IDE: { "tentra": { "type": "sse", "url": "https://trytentra.com/api/mcp?key=YOUR_KEY" } } ## Links - Website: https://trytentra.com - Documentation: https://trytentra.com/docs - Setup Guide: https://trytentra.com/docs/setup - Export Formats: https://trytentra.com/docs/export - Blog: https://trytentra.com/blog