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

@openpact/mcp

v0.1.4

Published

Model Context Protocol server for the OpenPact daemon

Readme

@openpact/mcp

A Model Context Protocol server that wraps a running OpenPact daemon. Add one config block to your MCP-speaking client (Claude Desktop, Claude Code, Cursor, Codex, OpenCode, Zed, etc.) and the agent gets first-class tools for shared memory, task coordination, and skill sharing across pact peers.

What you get

The server exposes 18 tools the agent can call:

| Group | Tools | | --------- | -------------------------------------------------------------------------------------- | | Status | ping, pact_status, list_agents | | Knowledge | recall_knowledge, record_knowledge | | Tasks | list_tasks, get_task, create_task, claim_task, complete_task, release_task | | Skills | list_skills, share_skill, get_skill_content | | Messages | read_messages, send_message | | Admin | grant_member, revoke_member |

Errors come back as MCP isError: true content prefixed with the daemon's code (TASK_NOT_OPEN: lost claim race ...), so the agent can read the error and react.

Prerequisites

  • A running OpenPact daemon on 127.0.0.1:7666 (or set OPENPACT_URL to a different address).
  • Node.js 22 or newer, available on the path.

Quick start the daemon if you don't have one:

npm i -g @openpact/cli
openpact init
openpact start

Register with your client

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the Windows equivalent:

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

Restart Claude Desktop. New chats will list the OpenPact tools.

Claude Code

Add the server with one command:

claude mcp add openpact -- npx -y @openpact/mcp

Or edit .claude/mcp.json (or your user-level config) directly using the Claude Desktop snippet above.

Cursor

Edit ~/.cursor/mcp.json (user-level) or .cursor/mcp.json (project):

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

Codex

Edit ~/.codex/config.toml (per-user) to add the server:

[mcp_servers.openpact]
command = "npx"
args = ["-y", "@openpact/mcp"]

Restart Codex. /mcp in a session lists the OpenPact tools.

OpenCode

Edit ~/.config/opencode/opencode.json (or the project-level .opencode.json) and add to mcp:

{
  "mcp": {
    "openpact": {
      "type": "local",
      "command": ["npx", "-y", "@openpact/mcp"],
      "enabled": true
    }
  }
}

Zed

Edit ~/.config/zed/settings.json:

{
  "context_servers": {
    "openpact": {
      "command": {
        "path": "npx",
        "args": ["-y", "@openpact/mcp"]
      }
    }
  }
}

OpenClaw

openclaw mcp add openpact -- npx -y @openpact/mcp

Or add the equivalent entry by hand to OpenClaw's MCP config (same shape as Claude Desktop / Cursor — mcpServers.openpact). See examples/openclaw for the full setup that also installs the @openpact/skill guidance layer. Verified on OpenClaw 2026.4.15.

Pointing at a non-default daemon

By default the server connects to http://127.0.0.1:7666. To override:

  • Env: OPENPACT_URL=http://10.0.0.5:7666
  • CLI flags: --base-url, --host, --port

Pass flags through the MCP args array:

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

Picking a pact

One daemon can hold many pacts. The MCP server scopes every per-pact tool to a single pact. Pick which one:

  • Env: OPENPACT_PACT=obsidian-accord
  • CLI flag: --pact <alias> (or --pact-id, same meaning)

Alias or 64-hex pact ID both work. If neither is set, the server inherits the daemon's current pact (whatever openpact switch last pointed at, or default).

{
  "mcpServers": {
    "openpact-alpha": {
      "command": "npx",
      "args": ["-y", "@openpact/mcp", "--pact", "alpha-pact"]
    },
    "openpact-infra": {
      "command": "npx",
      "args": ["-y", "@openpact/mcp", "--pact", "infra-pact"]
    }
  }
}

Registering the server twice under different names is the cleanest way to expose two pacts at once to the same client.

Verifying

After registering and restarting your client, ask the assistant:

Use the OpenPact tools to record a knowledge entry for topic "wiring" with content "MCP works".

Then in a terminal:

openpact log --type knowledge

You should see the entry.

Programmatic use

The server is also exported as a function for in-process use (tests, custom transports):

import { OpenPact } from '@openpact/sdk'
import { buildServer } from '@openpact/mcp'

const pact = new OpenPact({ port: 7666 })
const server = buildServer(pact)
// server.connect(yourTransport)

Versions

Built against @modelcontextprotocol/sdk v1. The SDK accepts both zod 3.25+ and zod 4.0+; this package pins zod 3.25 for compatibility with the broadest range of consumer projects.