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 🙏

© 2025 – Pkg Stats / Ryan Hefner

codebase-context

v1.1.0

Published

MCP server for semantic codebase indexing and search - gives AI agents real understanding of your codebase

Downloads

375

Readme

codebase-context

AI coding agents don't know your codebase. This MCP fixes that.

Your team has internal libraries, naming conventions, and patterns that external AI models have never seen. This MCP server gives AI assistants real-time visibility into your codebase: which libraries your team actually uses, how often, and where to find canonical examples.

Quick Start

Add this to your MCP client config (Claude Desktop, VS Code, Cursor, etc.).

"mcpServers": {
  "codebase-context": {
    "command": "npx",
    "args": ["codebase-context", "/path/to/your/project"]
  }
}

What You Get

  • Internal library discovery@mycompany/ui-toolkit: 847 uses vs primeng: 3 uses
  • Pattern frequenciesinject(): 97%, constructor(): 3%
  • Pattern momentumSignals: Rising (last used 2 days ago) vs RxJS: Declining (180+ days)
  • Golden file examples → Real implementations showing all patterns together
  • Testing conventionsJest: 74%, Playwright: 6%
  • Framework patterns → Angular signals, standalone components, etc.

How It Works

When generating code, the agent checks your patterns first:

| Without MCP | With MCP | |-------------|----------| | Uses constructor(private svc: Service) | Uses inject() (97% team adoption) | | Suggests primeng/button directly | Uses @codeblue/prime wrapper | | Generic Jest setup | Your team's actual test utilities |

Tip: Auto-invoke in your rules

Add this to your .cursorrules, CLAUDE.md, or AGENTS.md:

When generating or reviewing code, use codebase-context tools to check team patterns first.

Now the agent checks patterns automatically instead of waiting for you to ask.

Tools

| Tool | Purpose | |------|---------| | search_codebase | Semantic + keyword hybrid search | | get_component_usage | Find where a library/component is used | | get_team_patterns | Pattern frequencies + canonical examples | | get_codebase_metadata | Project structure overview | | get_style_guide | Query style guide rules | | refresh_index | Re-index the codebase |

Configuration

| Variable | Default | Description | |----------|---------|-------------| | EMBEDDING_PROVIDER | transformers | openai (fast, cloud) or transformers (local, private) | | OPENAI_API_KEY | - | Required if provider is openai |

Performance Note

This tool runs locally on your machine using your hardware.

  • Initial Indexing: The first run works hard. It may take several minutes (e.g., ~2-5 mins for 30k files) to compute embeddings for your entire codebase.
  • Caching: Subsequent queries are instant (milliseconds).
  • Updates: Currently, refresh_index re-scans the codebase. True incremental indexing (processing only changed files) is on the roadmap.

Links

License

MIT