npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@maplayer/maplayer

v0.1.11

Published

Code intelligence for AI agents

Readme

MapLayer

Code intelligence for AI agents. 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

Quick start

maplayer init     # scaffold .maplayer/ config and update agent instruction files
maplayer index    # parse the repo into a local code graph

Then wire maplayer serve into your AI tool (see Wiring into AI tools).

maplayer init updates existing agent instruction files (CLAUDE.md, AGENTS.md, .cursorrules, GEMINI.md) but does not create them if they are missing. Create the ones you use first, then rerun maplayer init.

Requirements

  • Node.js 22+
  • Source code in one or more of: TypeScript, JavaScript, Java, Kotlin, Python, C#, Swift, YAML

If your project uses a different Node version, install Node 22 alongside it with nvm or fnm:

nvm install 22 && nvm use 22
npm install -g @maplayer/maplayer

node:sqlite is marked experimental in Node 22 and may print an ExperimentalWarning on stderr. This does not affect functionality. Suppress it with NODE_NO_WARNINGS=1 maplayer index if needed.

Wiring into AI tools

Claude Code

Add to .claude/settings.json in your project:

{
  "mcpServers": {
    "maplayer": {
      "command": "maplayer",
      "args": ["serve"]
    }
  }
}

Codex

Add to .codex/config.toml in your repo:

[mcp_servers.maplayer]
command = "maplayer"
args = ["serve"]
startup_timeout_sec = 30

Gemini CLI

Add to .gemini/settings.json (or ~/.gemini/settings.json for all projects):

{
  "mcpServers": {
    "maplayer": {
      "command": "maplayer",
      "args": ["serve"]
    }
  }
}

Cursor

In Cursor settings, add an MCP server with command maplayer and argument serve.

Continue.dev

Add to .continue/config.yaml:

mcpServers:
  - name: maplayer
    type: stdio
    command: maplayer
    args:
      - serve

MCP tools are only available in agent mode in Continue.

Roo Code

Add to .roo/mcp.json:

{
  "mcpServers": {
    "maplayer": {
      "command": "maplayer",
      "args": ["serve"]
    }
  }
}

MCP tools

Once the server is running, agents can call the following tools:

| Tool | Description | |------|-------------| | query_maplayer | Primary entry point. Intent-routed query planner — routes to the right tool, shapes the response, and logs telemetry. Use this for most queries. | | search_symbols | Find functions, classes, and types by name or keyword | | find_by_intent | 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 | Cached file-level summary with freshness metadata | | describe_module | A file's purpose, exports, and key behaviors | | list_changed_files | Files changed since last index or a given commit |

All results include a freshness field (fresh / stale / missing) so the agent knows whether the index reflects the current file on disk.

Git lineage indexing

Build a full commit history index for file and symbol lifecycle queries:

maplayer index --full-history

This enables agents to query when a symbol was introduced, how a file was renamed over time, and which commits touched a given path.

Graph explorer

Visualize your indexed symbol graph in a browser:

maplayer visualize
maplayer visualize --port 4311 --max-nodes 1200 --max-edges 4000

Features: force-directed layout, pan/zoom, node and edge detail panel, git history per symbol, unified and split diff view, neighborhood focus mode, and live reload when the index updates.

Timeline view

Explore git history as a filterable, chartable event stream:

maplayer timeline
maplayer timeline --port 4312

Filter by author, path, symbol, event type, or time range. Drill into individual commits to see file changes and symbol-level diffs.

Symbol search CLI

Search the index from the terminal without starting a server:

maplayer find "user service"
maplayer find --kind class,function "auth"
maplayer find --intent "file upload handling"
maplayer find --json "parse"

Policy

maplayer init creates .maplayer/policy.yaml — commit this file. It controls what gets indexed and what agents can retrieve. Secrets, keys, and generated files are excluded by default.

exclude:
  paths:
    - ".env*"
    - "secrets/**"
    - "**/*.pem"

retrieval:
  allow_raw_file_slice: true
  max_slice_lines: 120
  stale_summary_mode: "flag"   # flag | block | allow

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

Exits non-zero for excluded paths — usable in CI.

Audit log

Every MCP tool call is appended to .maplayer/audit.log (gitignored):

maplayer audit show                        # last 20 entries
maplayer audit show --tool get_symbol_body # filter by tool
maplayer audit show --json                 # machine-readable
maplayer audit tail                        # live stream
maplayer audit stats                       # zero-result rates, top missed queries

Gitignore

maplayer init adds the correct entries automatically. To add them manually:

.maplayer/index.db
.maplayer/index.db-shm
.maplayer/index.db-wal
.maplayer/audit.log

Commit policy.yaml and config.yaml.