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

datagraph-mcp

v1.0.1

Published

CodeGraph MCP server for semantic code intelligence

Downloads

226

Readme

Datagraph MCP

Datagraph MCP is a CodeGraph-first MCP server for semantic code intelligence. It publishes a stdio CLI that can be launched by any MCP client with:

npx datagraph-mcp

It also supports local project initialization:

npx datagraph-mcp init -i

That initializes CodeGraph in the current project and runs the first index pass.

For implementation and runtime notes, see codegraph.md.

What this project does

The server exposes CodeGraph tools that help agents understand codebases faster:

  • symbol search
  • contextual code exploration
  • caller and callee discovery
  • impact analysis
  • node detail lookups
  • deep file-grouped exploration
  • index status checks
  • indexed file tree inspection

Published CLI usage

Local project init

datagraph-mcp init -i

Use -i to index after initialization. You can also pass a project path:

datagraph-mcp init C:/path/to/project -i

Claude Desktop example

{
  "mcpServers": {
    "datagraph-mcp": {
      "command": "npx",
      "args": ["datagraph-mcp"],
      "env": {
        "CODEGRAPH_ENABLED": "true",
        "CODEGRAPH_AUTO_BOOTSTRAP": "true",
        "CODEGRAPH_PROJECT_PATH": "C:/path/to/project",
        "CODEGRAPH_ALLOWED_ROOTS": "C:/path/to"
      }
    }
  }
}

If you run it from a shell instead of an MCP client, set the same environment variables first.

Tool catalog

  • codegraph_search
  • codegraph_context
  • codegraph_callers
  • codegraph_callees
  • codegraph_impact
  • codegraph_node
  • codegraph_explore
  • codegraph_status
  • codegraph_files

Environment variables

CODEGRAPH_ENABLED=true
CODEGRAPH_AUTO_BOOTSTRAP=true
CODEGRAPH_PROJECT_PATH=C:\path\to\indexed\project
CODEGRAPH_ALLOWED_ROOTS=C:\path\to
CODEGRAPH_MAX_SEARCH_LIMIT=20
CODEGRAPH_MAX_CONTEXT_NODES=30
CODEGRAPH_MAX_CALL_LIMIT=30
CODEGRAPH_MAX_IMPACT_DEPTH=4
CODEGRAPH_MAX_EXPLORE_FILES=12
CODEGRAPH_MAX_FILES_DEPTH=10
MCP_UI_ORIGIN=https://your-allowed-ui.example.com

Notes:

  • CODEGRAPH_ENABLED=false disables all codegraph_* tools.
  • CODEGRAPH_AUTO_BOOTSTRAP=true initializes and indexes a target repository on first tool call if .codegraph/ is missing.
  • CODEGRAPH_ALLOWED_ROOTS is a comma-separated allowlist for optional projectPath inputs.

Local development

  1. Install dependencies:
    • npm install
  2. Copy .env.example to .env
  3. Set your CODEGRAPH_* variables
  4. Run local app:
    • npm run dev
  5. Build stdio bundle:
    • npm run mcp:stdio:build
  6. Run stdio MCP server:
    • npm run mcp:stdio

Publish to npm

  1. Ensure npm auth:
    • npm adduser
  2. Verify package contents:
    • npm pack --dry-run
  3. Publish:
    • npm publish --access public

Build commands

  • npm run dev
  • npm run build
  • npm run start
  • npm run mcp:stdio:build
  • npm run mcp:stdio
  • npm run lint