8
languages: TS · JS · Java · Kotlin · Python · C# · Swift · YAML
@maplayer/maplayer · npm · v0.1.8
MapLayer indexes your repository into a local SQLite graph and serves it over MCP — giving Claude, Codex, Cursor, and other AI tools structured code navigation instead of raw file reads.
npm install -g @maplayer/maplayer
Three commands to give your AI agent a structured view of your codebase.
Install MapLayer globally. Requires Node.js 22+.
npm install -g @maplayer/maplayer
nvm or fnm and MapLayer will run independently.
Run from the root of the repository you want to use with your AI tool.
# scaffold .maplayer/ config + MCP wiring blocks
maplayer init
# parse the repo into the SQLite code graph
maplayer index
maplayer init injects managed blocks into existing CLAUDE.md, AGENTS.md, .cursorrules, and GEMINI.md. It does not create these files if they are missing — create them first, then rerun init.
maplayer serve into your AI toolAdd the MCP server entry to your agent's config. See the Integrations section for tool-specific instructions.
# Example: .claude/settings.json
{
"mcpServers": {
"maplayer": {
"command": "maplayer",
"args": ["serve"]
}
}
}
Once maplayer serve is running, these tools are available to your agent.
All results include a freshness field (fresh / stale / missing)
so the agent knows whether the index reflects the current file on disk.
| Tool | Description |
|---|---|
search_symbols |
Find functions, classes, and types by name or keyword |
find_by_intent |
FTS5 full-text search over file summaries and symbol names |
trace_dependencies |
List imports and dependents for a file |
find_callers |
Find all call sites of a function |
find_callees |
Find all functions called by a function |
get_symbol_body |
Read a symbol's exact source (policy-gated) |
get_file_slice |
Read a specific line range from a file (policy-gated) |
get_file_summary |
Return a cached file summary with freshness metadata |
describe_module |
Return a file's purpose, exports, and key behaviors |
list_changed_files |
List files changed since last index or a given commit |
Add maplayer serve as an MCP server in your AI tool's config.
Add to your project's .claude/settings.json:
{
"mcpServers": {
"maplayer": {
"command": "maplayer",
"args": ["serve"]
}
}
}
Add to .codex/config.toml in your repo:
[mcp_servers.maplayer]
command = "maplayer"
args = ["serve"]
startup_timeout_sec = 30
Add to .gemini/settings.json in your repo (or ~/.gemini/settings.json for all projects):
{
"mcpServers": {
"maplayer": {
"command": "maplayer",
"args": ["serve"]
}
}
}
settings.json at repo root is also supported.In Cursor settings, open the MCP section and add a new server:
Command: maplayer
Args: serve
Add to .continue/config.yaml in your repo (or ~/.continue/config.yaml for all projects):
mcpServers:
- name: maplayer
type: stdio
command: maplayer
args:
- serve
Add to .roo/mcp.json in your repo (or via the global MCP settings in VS Code):
{
"mcpServers": {
"maplayer": {
"command": "maplayer",
"args": ["serve"]
}
}
}
Control what gets indexed and what agents can retrieve. Every tool call is logged.
maplayer init creates .maplayer/policy.yaml — commit this file. It controls indexing scope and agent retrieval limits.
exclude:
paths:
- ".env*"
- "secrets/**"
- "**/*.pem"
retrieval:
allow_raw_file_slice: true
max_slice_lines: 120
stale_summary_mode: "flag"
Test any path:
maplayer policy check .env
# excluded tool=index path=.env
maplayer policy check src/main.ts
# allowed tool=index path=src/main.ts
Every tool call is appended to .maplayer/audit.log (gitignored). Inspect it with the built-in commands.
# last 20 entries
maplayer audit show
# filter by tool
maplayer audit show --tool get_symbol_body
# JSON output
maplayer audit show --json
# live stream
maplayer audit tail
Exits non-zero for excluded paths — usable in CI:
maplayer policy check .env || exit 1
maplayer timeline launches a local browser view of your repository's git lineage —
file events, symbol lifecycle, rename chains, and commit diffs, all backed by the indexed lineage tables.
# default (port 4312)
maplayer timeline
# filter by date range
maplayer timeline --from 2025-01-01 --to 2025-06-01
# filter by author
maplayer timeline --author alice
# filter by event type
maplayer timeline --event added,renamed,deleted
# filter by file path
maplayer timeline --file src/auth
# filter by symbol name
maplayer timeline --symbol authenticate
added, modified, deleted, renamed, copiedintroduced, changed, moved, removed--port | HTTP port (default 4312) |
--host | Bind address (default 127.0.0.1) |
--from | Start date YYYY-MM-DD |
--to | End date YYYY-MM-DD |
--author | Author name or email (substring) |
--event | Comma-separated event types |
--file | File path substring filter |
--symbol | Symbol name filter |
Launch a local, interactive visualization of your indexed symbol graph.
# default
maplayer visualize
# with limits
maplayer visualize --port 4311 \
--max-nodes 1200 \
--max-edges 4000
Load More Graph)maplayer init adds the correct entries automatically. To add manually:
# .gitignore
.maplayer/index.db
.maplayer/index.db-shm
.maplayer/index.db-wal
.maplayer/vectors.db
.maplayer/vectors.db-shm
.maplayer/vectors.db-wal
.maplayer/summaries/
.maplayer/audit.log
policy.yaml and config.yaml should be committed.
Node.js 22+ and a repository with one of the supported languages.
TypeScript · JavaScript · Java · Kotlin · Python · C# · Swift · YAML
Node.js 22+. Use nvm or fnm to install alongside other Node versions.
node:sqlite is experimental in Node 22 and may print an ExperimentalWarning to stderr. Suppress with NODE_NO_WARNINGS=1 maplayer index.