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

@contextos/mcp

v0.3.1

Published

Model Context Protocol server for ContextOS - enables all AI tools (Claude, Cursor, Codex, Gemini, Windsurf) to access optimized context

Downloads

270

Readme

@contextos/mcp

Model Context Protocol server for ContextOS

npm version

Enables AI coding tools to access ContextOS's optimized context through the Model Context Protocol.

🎯 Supported Tools

| Tool | Integration | |------|-------------| | Claude Desktop | ✅ Native MCP | | Claude Code CLI | ✅ Native MCP | | Cursor | ✅ Native MCP | | Windsurf | ✅ Native MCP | | Kilo Code | ✅ Native MCP | | VS Code + Continue.dev | ✅ Native MCP |

🚀 Quick Setup

Recommended: Use Universal Setup

npx @contextos/setup

This automatically configures all your AI tools.

Manual Configuration

Claude Desktop / Claude Code CLI

Add to ~/.config/claude/claude_desktop_config.json (Linux/macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "contextos": {
      "command": "npx",
      "args": ["-y", "@contextos/mcp"]
    }
  }
}

Cursor

Add to settings.json:

{
  "mcp.servers": {
    "contextos": {
      "command": "npx @contextos/mcp",
      "cwd": "${workspaceFolder}"
    }
  }
}

Windsurf

Add to settings.json:

{
  "mcp.servers": {
    "contextos": {
      "command": "npx @contextos/mcp",
      "cwd": "${workspaceFolder}"
    }
  }
}

🔧 MCP Capabilities

Tools

| Tool | Description | |------|-------------| | contextos_build | Build optimized context for a goal | | contextos_analyze | Deep analysis using RLM engine | | contextos_find | Find files matching a pattern | | contextos_deps | Get file dependencies | | contextos_explain | Explain a file's purpose | | contextos_status | Get ContextOS status |

Resources

| Resource | Description | |----------|-------------| | contextos://context/current | Current built context | | contextos://project/info | Project information | | contextos://project/constraints | Coding constraints | | contextos://project/structure | File tree structure |

Prompts

| Prompt | Description | |--------|-------------| | code_with_context | Start coding with full context | | review_code | Review code with dependencies | | debug_issue | Debug with relevant context |

📋 Usage Examples

Once configured, your AI assistant can use ContextOS automatically:

Example Chat:

You: Add rate limiting to the AuthController

AI: [Calls contextos_build("Add rate limiting to AuthController")]
AI: Based on the context, I can see AuthController.ts imports RateLimitMiddleware...
    Here's the implementation:
    ...

Example with Tools:

You: What does PaymentService depend on?

AI: [Calls contextos_deps("src/payment/PaymentService.ts")]
AI: PaymentService depends on:
    - src/payment/StripeClient.ts
    - src/user/UserRepository.ts
    - src/common/Logger.ts

🏗️ How It Works

┌─────────────────────────────────────────────────────────────┐
│                     AI Tool (Cursor, Claude, etc.)           │
└─────────────────────────────────────────────────────────────┘
                              │
                              │ MCP Protocol
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                    @contextos/mcp                            │
│                                                              │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐       │
│  │    Tools     │  │  Resources   │  │   Prompts    │       │
│  │  (Actions)   │  │   (Data)     │  │ (Templates)  │       │
│  └──────────────┘  └──────────────┘  └──────────────┘       │
│                              │                               │
│                              ▼                               │
│  ┌─────────────────────────────────────────────────────┐    │
│  │                 @contextos/core                      │    │
│  │  RLM Engine | Hybrid Ranker | Parser | Graph | etc.  │    │
│  └─────────────────────────────────────────────────────┘    │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                    Your Codebase                             │
│  .contextos/ | src/ | package.json | ...                     │
└─────────────────────────────────────────────────────────────┘

🔍 Debugging

Check if MCP server starts correctly

npx @contextos/mcp

You should see: ContextOS MCP Server started

Enable debug logging

DEBUG=contextos:* npx @contextos/mcp

Check tool logs

Most MCP-compatible tools have a developer console or log file where you can see MCP communication.

📦 Requirements

  • Node.js 18+
  • A ContextOS-initialized project (npx @contextos/cli init)
  • An MCP-compatible AI tool

🤝 Contributing

Found an issue or want to add support for a new tool? Open an issue or PR!

📄 License

MIT © ContextOS Team