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

@mdp-framework/mcp-server

v1.1.99

Published

MCP Server - Expose MDP capabilities as tools for Claude Code, Cursor, and other MCP clients

Readme

@mdp-framework/mcp-server

MCP Server implementation for the MDP Framework. Exposes MDP capabilities (policies, memory, evidence) as tools for Claude Code, Cursor, and other MCP clients.

Features

  • MCP Protocol Compliant: Implements the Model Context Protocol specification
  • 5 Core Tools: Policy management, capsule search, and evidence recording
  • Dual Transport: stdio (for Claude Code/Cursor) and HTTP modes
  • Gateway Integration: Run via mlang gateway --mode mcp

Installation

npm install @mdp-framework/mcp-server

Usage

As a Library

import { createMCPServer } from '@mdp-framework/mcp-server';
import { createResolver } from '@mdp-framework/gateway';
import { createCapsuleStore } from '@mdp-framework/gateway/store';
import { PolicyRegistry } from '@mdp-framework/adapters';

// Setup resolver
const registry = new PolicyRegistry({ basePath: '.mlang/policies' });
const resolver = createResolver({ registries: [registry] });

// Setup store
const store = await createCapsuleStore({
  backend: 'file',
  baseDir: '.mlang/state/capsules',
});

// Create and start server
const server = createMCPServer({ resolver, store });
await server.start('stdio'); // or 'http' with port

console.log('MCP server running with', server.getTools().length, 'tools');

Via CLI

# stdio mode (for Claude Code/Cursor)
mlang gateway --mode mcp --stdio

# HTTP mode (for web clients)
mlang gateway --mode mcp --http --port 8080

Via Standalone Binary

# stdio mode
npx @mdp-framework/mcp-server

# HTTP mode
npx @mdp-framework/mcp-server --http --port=8080

Available Tools

1. policy.get

Get a policy by ID and optional version.

Input:

{
  "id": "ios.swift.no-force-unwrap",
  "version": "2025.01.15"  // optional
}

Output:

{
  "success": true,
  "data": {
    "policy": { /* PolicyCard */ },
    "uri": "policy://org/[email protected]"
  }
}

2. policy.search

Search policies by tags, owner, or scope.

Input:

{
  "tags": ["ios", "security"],
  "scope": "org",
  "limit": 10
}

Output:

{
  "success": true,
  "data": {
    "policies": [ /* PolicyCard[] */ ],
    "total": 5
  }
}

3. memory.get

Get a state capsule by ID.

Input:

{
  "id": "capsule://mdp-framework/TEAM_A/pr/pr-123"
}

Output:

{
  "success": true,
  "data": {
    "capsule": { /* StateCapsule */ }
  }
}

4. memory.search

Search capsules by natural language query.

Input:

{
  "query": "authentication implementation",
  "filters": {
    "kind": "pr",
    "team": "TEAM_A"
  },
  "limit": 5
}

Output:

{
  "success": true,
  "data": {
    "capsules": [ /* StateCapsule[] */ ],
    "total": 3
  }
}

5. evidence.record

Attach evidence to a state capsule.

Input:

{
  "capsule_id": "capsule://mdp-framework/TEAM_A/pr/pr-123",
  "evidence": {
    "type": "link",
    "ref": "gh://mdp-framework/mdp/PR/123/diff@abc123",
    "title": "PR diff snapshot",
    "metadata": {
      "files_changed": 5,
      "lines": 234
    }
  }
}

Output:

{
  "success": true,
  "data": {
    "capsule_id": "capsule://mdp-framework/TEAM_A/pr/pr-123",
    "evidence_added": { /* Evidence */ }
  }
}

Claude Code Integration

Add to your .claude/claude_desktop_config.json:

{
  "mcpServers": {
    "mdp-framework": {
      "command": "mlang",
      "args": ["gateway", "--mode", "mcp", "--stdio"],
      "cwd": "/path/to/your/project"
    }
  }
}

Then ask Claude:

  • "Show me the force unwrap policy"
  • "Search for PRs related to authentication"
  • "Record this PR diff as evidence for capsule X"

Cursor Integration

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "mdp-framework": {
      "command": "mlang",
      "args": ["gateway", "--mode", "mcp", "--stdio"]
    }
  }
}

Architecture

┌─────────────────────────────────────┐
│     MCP Client (Claude Code)        │
└───────────────┬─────────────────────┘
                │ JSON-RPC 2.0
┌───────────────▼─────────────────────┐
│         MCP Protocol Handler        │
│   (tools/list, tools/call, init)    │
└───────────────┬─────────────────────┘
                │
┌───────────────▼─────────────────────┐
│          Tool Handlers              │
│  ┌─────────────────────────────┐   │
│  │ PolicyGetTool               │   │
│  │ PolicySearchTool            │   │
│  │ MemoryGetTool               │   │
│  │ MemorySearchTool            │   │
│  │ EvidenceRecordTool          │   │
│  └─────────────────────────────┘   │
└───────────────┬─────────────────────┘
                │
┌───────────────▼─────────────────────┐
│     Gateway (PolicyResolver,        │
│     CapsuleStore)                   │
└─────────────────────────────────────┘

Development

# Build
npm run build

# Watch mode
npm run dev

# Run tests
npm test

# Type check
npm run typecheck

License

MIT