Skip to main content
Glama

tentra-mcp

npm version npm downloads CI License: MIT

AI 코딩 에이전트를 위한 메모리입니다. 영구 코드 그래프와 AI가 생성한 아키텍처 다이어그램을 제공하며, MCP를 기본 지원합니다. Cursor, Claude Code, Codex, Windsurf에서 작동합니다.

자체 모노레포에서 수행한 벤치마크 결과: 8개의 "X가 어디에 구현되어 있나요?" 쿼리에서 토큰 99.4% 절감 (156.8배 비율) — 파일 재읽기를 통한 114,644 토큰 대비 query_symbols를 통한 731 토큰. 전체 글 보기 →

빠른 시작 (60초)

cd your-repo
npx tentra-mcp init --hook

한 번의 명령어로:

  1. Cursor / Claude Code / Codex / Windsurf (설치된 항목)를 위한 MCP 설정을 작성합니다.

  2. git post-commit 훅을 설치하여 커밋할 때마다 코드 그래프가 자동으로 새로 고침되도록 합니다 (수동 인덱싱 불필요).

  3. git 원격 저장소에서 repo_id를 자동으로 추출하여 .tentra/metadata.json에 저장합니다.

그런 다음 trytentra.com/settings에서 API 키를 가져와 생성된 설정 파일의 YOUR_TENTRA_API_KEY를 교체하고, IDE를 다시 로드한 뒤 에이전트에게 다음과 같이 물어보세요:

Index this codebase with Tentra and list the god-nodes

이제부터 모든 git commit 시 백그라운드에서 재인덱싱이 실행됩니다. 에이전트는 자동으로 최신 상태를 유지합니다.

훅 건너뛰기: --hook을 제외하면 IDE 설정만 작성됩니다. 수동 stdio 설치: npx tentra-mcp (첫 도구 호출 시 GitHub 장치 흐름 인증을 위해 브라우저가 열립니다). API 키 사용: npx tentra-mcp --key YOUR_API_KEY.

Related MCP server: flaiwheel

Tentra란 무엇인가요?

Tentra는 AI 코딩 에이전트를 위한 영구 메모리 계층입니다. 시스템을 설명하면 다이어그램과 14개 프레임워크의 코드 내보내기를 제공합니다. 저장소를 인덱싱하면 에이전트가 매 세션마다 소스 코드를 다시 검색(grep)하는 대신 파일, 심볼, 임포트, 호출 엣지로 구성된 구조화된 그래프를 쿼리할 수 있습니다.

이 MCP 서버는 AI 어시스턴트에게 32개의 도구를 제공합니다:

아키텍처 (9개 도구)

도구

설명

create_architecture

설명으로부터 새로운 시스템 설계

update_architecture

기존 아키텍처 수정

get_architecture

아키텍처 세부 정보 읽기

list_architectures

저장된 모든 설계 탐색

analyze_codebase

로컬 코드 스캔 및 다이어그램 생성

lint_architecture

품질 검사 (9가지 규칙: 고아, SPOF, 갓 서비스 등)

sync_architecture

다이어그램과 코드 간의 드리프트 감지

export_architecture

14개 프레임워크로 내보내기 (Java, Python, Go, Rust 등)

create_flow

단계별 흐름 시각화 생성

코드 그래프 — 쓰기 (4개 도구)

도구

설명

index_code

저장소를 탐색하고 로컬에서 Tree-sitter를 실행하여 의미론적 인덱싱 작업 시작

index_code_continue

진행 중인 인덱싱 작업 재개

record_semantic_node

에이전트가 추출한 의미론적 주석 영구 저장

get_index_job

인덱싱 작업 상태 확인

코드 그래프 — 읽기 (10개 도구)

도구

설명

query_symbols

인덱싱된 심볼에 대한 퍼지 트라이그램 검색

get_symbol_neighbors

호출/임포트 그래프에서 BFS 탐색

get_service_code_graph

캔버스 서비스를 위한 서브그래프

explain_code_path

의미론적 맥락을 포함한 두 심볼 간의 최단 경로

find_similar_code

에이전트가 생성한 임베딩에 대한 pgvector 코사인 ANN

record_embedding

에이전트가 생성한 임베딩 벡터 영구 저장

list_god_nodes

가장 높은 팬인/팬아웃 심볼 (아키텍처 악취)

get_quality_hotspots

변경률 × 복잡도 순위

list_snapshots

인덱싱된 스냅샷의 시간 여행 목록

diff_snapshots

스냅샷 간 추가/삭제된 파일 / 심볼 / 갓 노드

강화 — 계약, 결정, 소유권, 도메인 (9개 도구)

도구

설명

set_service_mapping

인덱싱된 파일이나 심볼을 캔버스 서비스에 연결

set_domain_membership

서비스나 파일을 도메인(경계 컨텍스트)에 할당

record_contract

파싱된 API 계약 페이로드 저장 (OpenAPI, GraphQL, Protobuf)

bind_contract

계약을 구현하는 심볼에 연결

record_decision

아키텍처 결정 기록(ADR) 생성 (선택적으로 코드 연결)

link_decision

ADR에서 다른 심볼, 파일 또는 서비스로 링크 추가

get_ownership

파일이나 서비스의 소유자(팀 또는 개인) 확인

get_decisions_for

특정 엔티티에 연결된 ADR 목록

get_contracts

종류나 서비스별로 필터링된 계약 목록

설정

옵션 1: SSE (설치 불필요)

IDE의 MCP 설정에 추가하세요 (로컬 설치 불필요):

Cursor (설정 > 기능 > MCP > 서버 추가):

{
  "tentra": {
    "type": "sse",
    "url": "https://trytentra.com/api/mcp?key=YOUR_API_KEY"
  }
}

Claude Code (프로젝트 루트의 .mcp.json):

{
  "mcpServers": {
    "tentra": {
      "type": "sse",
      "url": "https://trytentra.com/api/mcp?key=YOUR_API_KEY"
    }
  }
}

옵션 2: 로컬 설치 (코드베이스 스캔 시 필요)

npx tentra-mcp

첫 사용 시 GitHub를 통해 자동으로 인증됩니다. 자격 증명은 ~/.tentra/credentials에 저장됩니다.

로컬 서버를 위한 Cursor 설정:

{
  "tentra": {
    "command": "npx",
    "args": ["tentra-mcp"]
  }
}

Claude Code (.mcp.json):

{
  "mcpServers": {
    "tentra": {
      "command": "npx",
      "args": ["tentra-mcp"]
    }
  }
}

사용 예시

연결되면 AI에게 다음과 같이 말하세요:

"Design a payment system with Stripe, Kafka, and PostgreSQL"
→ AI calls create_architecture → diagram at trytentra.com/arch/xxx

"Scan this codebase and generate the architecture"
→ AI calls analyze_codebase → detects services, DBs, queues

"Export this architecture to Java Spring Boot"
→ AI calls export_architecture → downloads zip with project scaffold

"What changed since last time? Is my diagram outdated?"
→ AI calls sync_architecture → drift report with accuracy score

내보내기 형식

Java (Spring Boot), Node.js (Fastify), Python (FastAPI), Go (chi), Rust (Axum), .NET (ASP.NET), Kotlin (Ktor), PHP (Laravel), Ruby (Rails), Elixir (Phoenix), Docker Compose, Mermaid, ADR, Terraform

링크

개발

이 저장소에는 오픈 소스 MCP 서버가 포함되어 있습니다. Tentra API와 웹 앱은 trytentra.com에서 별도로 호스팅되는 서비스입니다.

npm install --legacy-peer-deps
npm run build      # tsc --noEmit + esbuild bundle → dist/index.js
npm start          # run the bundled server
npm test           # vitest

배포된 npm 패키지(tentra-mcp)는 번들된 dist/만 포함하며, 소스 코드는 감사 및 커뮤니티 기여를 위해 여기에 공개되어 있습니다.

라이선스

MIT

Available Tools

32 tools
analyze_codebaseA

Scan a local codebase directory and automatically generate an architecture diagram. Detects services from package.json, docker-compose, pom.xml, go.mod, and Python configs. Infers connections from dependencies, imports, env vars, and docker-compose depends_on. Detects databases, queues, external services, and API gateways automatically. After analysis, creates the architecture and returns the URL. Also runs lint rules and reports quality issues.

Inputs: path (required), name, description.

bind_contractA

Link a symbol to a contract as "provides", "consumes", or "documents". Use after record_contract to attach implementation evidence.

Inputs: contract_id (required), symbol_id (required), snapshot_id (required), relation (required).

create_architectureA

Create a new system architecture artifact. Call this tool whenever the user asks to design, plan, or describe any system, feature, or integration. NEVER respond with plain text architecture descriptions — always call this tool instead. After calling, share the returned URL with the user.

Inputs: name (required), services (required), connections (required), description, +1 more.

create_flowA

Create a step-by-step flow on an existing architecture. Flows visualize request paths, data pipelines, or business processes as sequential steps. Use when the user asks to describe, trace, or explain a flow through the system.

Inputs: architectureId (required), flow (required).

diff_snapshotsA

Compare two snapshots: files added/removed/modified, new/disappeared symbols, god-node deltas. Architectural diff between two commits.

Inputs: from_snapshot_id (required), to_snapshot_id (required).

explain_code_pathA

Finds the shortest call/import path between two symbols and annotates each hop with semantic purpose. Answers "how does X reach Y?"

Inputs: from_symbol (required), to_symbol (required), snapshot_id (required).

export_architectureB

Export an architecture as runnable code, docker-compose, Mermaid diagram, or ADR docs. Available formats: mermaid, markdown-adr, docker-compose, java-spring-boot, nodejs-typescript, python-fastapi, go-chi, dotnet-aspnet, rust-axum, kotlin-ktor, php-laravel, ruby-rails, elixir-phoenix. For code exports, provide output_dir to save files directly into your project.

Inputs: id (required), format (required), output_dir.

find_similar_codeC

Vector similarity search using pgvector cosine distance. Pass a query_vector (embed your text with your native embedding capability first). Returns semantically similar symbols or files.

Inputs: query_vector (required), entity_type, snapshot_id, limit.

get_architectureA

Retrieve a specific architecture by ID. Use this to read the current state before making updates.

Inputs: id (required).

get_contractsB

List all contracts in a workspace, optionally filtered by kind (http, grpc, event, graphql, rabbit, kafka).

Inputs: workspace_id (required), kind.

get_decisions_forA

Retrieve all decisions that affect a specific entity (service, file, symbol, contract, or domain). Use to surface architectural rationale while reviewing code.

Inputs: entity_type (required), entity_id (required), include_superseded.

get_index_jobC

Get the status of an indexing job

Inputs: job_id (required).

get_ownershipA

Resolve the owner(s) of a file path according to the workspace CODEOWNERS rules. Returns a list of team or user handles.

Inputs: workspace_id (required), path (required).

get_quality_hotspotsA

Rank files by a composite score of cyclomatic complexity × churn × (1 - test coverage). Top refactor candidates.

Inputs: repo_id, snapshot_id, top_n.

get_service_code_graphB

Returns the full code subgraph for a Tentra canvas service: files, symbols, and cross-service edges.

Inputs: service_id (required), snapshot_id (required), depth, include_semantics.

get_symbol_neighborsA

BFS graph traversal from a symbol — who calls it, what it calls, imports, inheritance. Eliminates 20+ file reads per question.

Inputs: symbol_id (required), snapshot_id (required), depth, edge_types, +1 more.

index_codeC

Index a code repository (Tier 1 local, Tier 2 via agent)

Inputs: repo_path (required), repo_id (required), service_id, force_reindex, +2 more.

index_code_continueC

Continue an in-progress indexing job

Inputs: job_id (required).

lint_architectureC

Validate an existing architecture for quality issues. Checks for: orphan nodes, duplicate connections, naming violations, single points of failure, god services, missing databases, sync overload, and more.

Inputs: id (required).

list_architecturesA

List all saved architectures. Use when the user asks to see, browse or find existing architectures.

Inputs: no named parameters.

list_god_nodesA

List symbols flagged as god nodes (very high fan-in or fan-out). Use to identify architectural coupling hotspots.

Inputs: repo_id, snapshot_id, top_n.

list_snapshotsA

List all indexed snapshots for a repo, newest first. Use for time-travel — pick two snapshot IDs and call diff_snapshots.

Inputs: repo_id (required).

query_symbolsA

Search for symbols by name or qualified name using fuzzy trigram matching. Replaces 10+ grep calls. Returns symbol kind, file path, fan-in/out, semantic role.

Inputs: snapshot_id (required), q (required), kind, role, +1 more.

record_contractA

Persist a service contract (OpenAPI, proto, event schema, etc.) to the code graph. Returns a contract_id to use with bind_contract.

Inputs: workspace_id (required), kind (required), name (required), version (required), +2 more.

record_decisionB

Persist an Architecture Decision Record (ADR) to the code graph. Supports supersession, lifecycle status, and immediate entity links.

Inputs: workspace_id (required), slug (required), title (required), context (required), +6 more.

record_embeddingA

Store an embedding vector for a symbol or file. Call this after generating an embedding with your native capability. Used to populate the vector search index.

Inputs: entity_type (required), entity_id (required), model (required), vector (required), +2 more.

record_semantic_nodeC

Persist an agent-extracted semantic node for a file or symbol

Inputs: job_id (required), snapshot_id (required), purpose (required), extracted_by (required), +7 more.

set_domain_membershipC

Assign a file, symbol, or service to a domain. Supports AI-inferred or human-confirmed assignments with a confidence score.

Inputs: domain_id (required), entity_type (required), entity_id (required), confidence, +1 more.

set_service_mappingA

Assign one or more files in a snapshot to a Tentra canvas service ID. Use after indexing to declare which service owns each file.

Inputs: snapshot_id (required), mappings (required).

sync_architectureA

Compare a saved architecture against the current codebase to detect drift. Scans the codebase and diffs the detected services/connections against the saved diagram. Reports added, removed, and changed services/connections with an accuracy score.

Inputs: architectureId (required), codebasePath (required).

update_architectureA

Update an existing architecture artifact. Call this when the user wants to modify, evolve, or improve an architecture that already exists. NEVER create a new one if you have an existing ID in context — always update instead. Preserves all existing services/connections unless explicitly replaced.

Inputs: id (required), name, description, services, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 32 tools

    Disambiguation4/5

    Most tools have distinct purposes with clear boundaries, such as analyze_codebase for scanning, create_architecture for design, and diff_snapshots for comparison. However, some overlap exists between tools like get_architecture and list_architectures, or index_code and index_code_continue, which could cause minor confusion in selection.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, such as analyze_codebase, create_architecture, and diff_snapshots. This predictability makes it easy for agents to understand and navigate the toolset without ambiguity.

    Tool Count3/5

    With 32 tools, the count feels heavy for a single server, potentially overwhelming for agents to manage efficiently. While the domain of code analysis and architecture management is broad, the toolset could benefit from consolidation to reduce complexity and improve usability.

    Completeness5/5

    The toolset provides comprehensive coverage for codebase analysis, architecture management, and decision tracking, including CRUD operations (e.g., create, get, update, list architectures) and advanced features like diffing, linting, and exporting. No obvious gaps are present, ensuring agents can handle full workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Persistent codebase knowledge layer for AI agents. Pre-digests codebases into structured knowledge (symbols, dependency graphs, co-change patterns, architectural decisions) and serves via MCP. 28 languages, 14 tools, ~85% token reduction.
      22 npm
      10
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Self-hosted memory and governance layer for AI coding agents. 28 MCP tools with hybrid search, structured knowledge capture, behavioral nudges, and git-native storage. Zero cloud dependencies.
      30
      6
      Business Source 1.1
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP memory server for AI coding agents to remember decisions, patterns, and bugs between sessions. Provides persistent memory with 37 MCP tools, multi-session coordination, and token-efficient recall.
      225 npm
      12
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Persistent, self-curating memory for coding agents. It enables local, zero-cost context recall through MCP tools with hybrid retrieval and autonomous consolidation.
      -