Codemap MCP server
Commit 1 Nov 2026Enables AI agents to query codebase structure, symbols, and imports using a local SQLite index to reduce token usage and file reads.
Juga dikenal sebagai stainless-code/codemap
- Stars
- 8
- Tools
- —
- Unduhan, 30 hari
- —
- Versi terbaru
- —
- Commit terakhir
- 1 Nov 2026
- Lisensi
- MIT
Apa itu Codemap MCP?
Codemap adalah MCP server. Enables AI agents to query codebase structure, symbols, and imports using a local SQLite index to reduce token usage and file reads.
Ringkasan dibuat dari README proyek
Tentang Codemap MCP server
Navigating complex codebases by querying structural metadata instead of scanning entire file trees is what codemap enables for AI agents. It creates a local SQLite index containing symbols, imports, calls, and other structural information to help agents answer questions about where specific components or definitions reside. This approach reduces token consumption and the number of file reads required by an AI client during a session.
Developers can set this up locally using Node or Bun to index a repository. The server supports both direct SQL queries and pre-defined recipes, such as find-symbol-definitions, to simplify common tasks. While it is not a replacement for grep or ripgrep for raw text searches, users can opt-in to FTS5 for full-text search capabilities when they need to join body matches with structural data. It works through a CLI or a programmatic ESM API for integration into custom workflows.
Apa yang bisa Anda lakukan dengannya
- 1Locating symbol definitionsAn AI agent can find exactly where a specific function or variable is defined using a single SQL command.
- 2Analyzing import directionsDevelopers can use the index to understand how different parts of a codebase interact through their imports.
Ditulis berdasarkan README proyek. Setiap use case diperiksa terhadap kutipan dari README tersebut.
Pengecekan otomatis
Berjalan 15 Nov 2026Laporan lengkap →Belum diverifikasi. Sebuah server memerlukan skor 80, tidak ada temuan serius, dan data yang cukup untuk kami periksa. Cara kerja checks · Yang perlu diperbaiki untuk menambah poin
- Source repository terhubung dan dapat dijangkaustainless-code/codemap is public and reachablegithub.com/stainless-code/codemap ↗Lolos
- Nama paket mencantumkan repositori ini sebagai sumbernyaTidak diperiksa
- Provenance build (atestasi Sigstore)Tidak diperiksa
- Lisensi open source (OSI)MITspdx.org/licenses/MIT.html ↗Lolos
- Ada commit atau release dalam satu tahun terakhirLast commit or release 2026-11-01github.com/stainless-code/codemap ↗Lolos
- OpenSSF ScorecardTidak diperiksa
- Nama package tidak mirip dengan package populerTidak diperiksa
- Tidak ada advisory kritis pada paket atau dependensinyaTidak diperiksa
- Tidak ada instruksi tersembunyi untuk model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersLolos
- Tools yang bersifat destruktif telah diberi labelTidak diperiksa
- Endpoint remote merespons handshake MCPTidak diperiksa
README
Lihat di GitHubCodemap
Query your codebase. Local codebase intelligence for AI agents — a SQLite index of symbols, imports, calls, and more structural metadata so agents answer “where / what / who” with SQL and recipes instead of scanning the tree.
- Not grep by default — use ripgrep / your IDE for raw text. Opt-in FTS5 (
--with-fts/fts5: true) when body matches need to JOIN with structure. - Is a fast, token-efficient way to navigate structure.
Docs: https://stainless-code.com/codemap
What you get
Structural questions in one SQL round-trip instead of 3–5 file reads — symbol definitions, import direction, components, CSS tokens, @deprecated symbols, and more. Named patterns ship as recipes (codemap query --recipe …); full catalog and schema live in the docs.
Install
bun add @stainless-code/codemap
# or: npm install @stainless-code/codemap
Engines: Node >=22.12.0 and/or Bun >=1.0.31.
CLI
codemap # incremental index
codemap query --json --recipe find-symbol-definitions --params name=foo
codemap query --json "SELECT name, file_path FROM symbols WHERE name = 'foo'"
codemap show foo
codemap agents init --mcp # agent templates + MCP
Full command reference, recipes, MCP/HTTP, config, and the GitHub Action: docs site.
Programmatic API (ESM)
import { createCodemap } from "@stainless-code/codemap";
const cm = await createCodemap({ root: "/path/to/repo" });
await cm.index({ mode: "incremental" });
const rows = cm.query("SELECT name FROM symbols LIMIT 5");
API reference: https://stainless-code.com/codemap/reference/api.
Development
Contributor workflow, checks, and conventions: .github/CONTRIBUTING.md.
bun install
bun run check
Maintainer hub: docs/README.md.
License
MIT — see LICENSE.
Pertanyaan tentang Codemap MCP
How does Codemap differ from grep?
Codemap is not grep by default; you should use ripgrep or your IDE for raw text searches, whereas Codemap is designed for navigating structural metadata.
What kind of information can I query?
You can query symbol definitions, import directions, components, CSS tokens, deprecated symbols, and more via SQL.
What are the engine requirements for installation?
The tool requires Node version 22.12.0 or higher, or Bun version 1.0.31 or higher.