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

@openagentid/mcp

v0.2.1

Published

OpenAgent middleware for the Model Context Protocol — adds OAS identity, Arsenal capability tokens, and AEGIS authorization to any MCP server in three lines.

Readme

@openagentid/mcp

Authenticated Model Context Protocol tools using the current OpenAgentID SDK. Works with SDK ^0.7.2 and MCP SDK ^1.27.0.

npm install @openagentid/sdk@^0.7.2 @openagentid/[email protected] @modelcontextprotocol/sdk@^1.27.0 zod

Run a real server and client

The complete stdio example creates real Ed25519 identities in separate signer and receiver workspaces, starts a separate MCP server process, authenticates a tool call and verifies unsigned and revoked callers are rejected. It needs no hosted account or API key.

git clone https://github.com/OpenAgentID/openagent-sdk.git
cd openagent-sdk/examples/typescript/02-mcp-server
npm install
npm start

Current SDK adapters

createWorkspaceMcpServer({ workspace, did, authorize }) returns an agent for withOpenAgent(server, { agent }) and an issueChallenge method. Expose challenge issuance on your trusted MCP transport before wrapping the server. authorize(verifiedIdentity) obtains scopes from your receiver policy. Identity trust alone never grants tool access.

createWorkspaceMcpClient({ workspace, did, audience, issueChallenge }) returns an agent for withOpenAgentClient(client, { agent }). Its challenge callback calls the receiver's challenge endpoint. The audience is explicit and must match the receiver; no keys travel in request metadata.

The receiver binds each nonce to the DID, tool name and canonical JSON arguments. The SDK verifies the signature, current trust, revocation and replay state. The middleware then checks mcp:<tool>:invoke scopes and any configured skills policy. Argument-changing beforeCall hooks run before signing. Custom verifiers receive the original transmitted tool request as their third argument, captured at the public MCP transport boundary before schema parsing. Authorization policies and tool handlers receive the parsed arguments. Defaults, coercion, transforms and unknown-field stripping therefore work without weakening request binding.

The workspace adapter is a single-process challenge coordinator backed by durable SDK trust/replay state. Keep one adapter alive for the process lifetime. Restart invalidates outstanding challenges. Distributed deployments should supply a shared atomic challenge authority through the custom Agent contract. The standard MCP server transport keeps raw request context isolated across asynchronous concurrent calls. Custom server implementations without a transport use the arguments they pass directly to the middleware callback.

Policy and audit

  • requireScopes(toolName, args) overrides the per-tool scope set.
  • scopeFormat(toolName) customizes the default scope name.
  • createSkillsPolicy rejects unlisted skill names and unauthorized DIDs.
  • preCall, postCall and onError receive verified identity context.
  • Results include _meta.openagent with verified_did, scopes and an audit ID.

requireIdentity: false explicitly permits anonymous calls; do not enable it on protected tools. Callbacks and bespoke Agent implementations are trusted application configuration, not substitutes for signature verification.

Migration from 0.1

The SDK's OpenAgentInstance was never the adapter's Agent interface. Use the workspace factories or implement the declared signing/verifier contract. The new factories make that conversion explicit and exercise the current SDK with real keys. Existing custom adapters remain supported; bind the verifier's new request argument to your signed request data.