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

nominee-mcp

v3.0.0

Published

A connected MCP server can still exfiltrate if the model asks — registerNomineeTool checks allow/ask/deny before the handler runs.

Readme

nominee-mcp

Decision-bound MCP tool handlers for the official Model Context Protocol SDK.

MCP OAuth authorizes the connection. nominee authorizes the action. A connected server can still exfiltrate if the model asks; registerNomineeTool checks allow / ask / deny before the handler runs. That contains blast radius. It does not detect prompt injection.

Quickstart: https://nominee.dev/docs/mcp/

To inventory MCP tool callbacks before writing a policy, construct the same Nominee instance with mode: 'observe'. registerNomineeTool still routes through run(), but asks and denies are recorded rather than enforced. Observation reports do not retain raw string/boolean values or user IDs; numeric aggregates may be sensitive. Observe mode is not a security control and cannot be combined with production: true.

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
import { Nominee, allow, ask } from 'nominee'
import { mcpEndUser, registerNomineeTool } from 'nominee-mcp'
import { z } from 'zod'

const server = new McpServer({ name: 'support-tools', version: '1.0.0' })
const nominee = new Nominee({
  policy: {
    rules: [allow('github.issue.read'), ask('github.issue.close')],
    fallback: 'deny',
  },
})

registerNomineeTool(server, {
  name: 'close_issue',
  description: 'Close one GitHub issue',
  inputSchema: z.object({ repo: z.string(), issue: z.number() }),
  nominee,
  action: 'github.issue.close',
  user: ({ extra }) => mcpEndUser(extra, 'local-stdio-user'),
  resource: ({ input }) => `repo:${input.repo}#${input.issue}`,
  connection: 'github',
  scopes: ['issues:write'],
  execute: async ({ repo, issue }, { token }) => {
    await closeGitHubIssue({ repo, issue, token })
    return { content: [{ type: 'text', text: 'Issue closed' }] }
  },
})

await server.connect(new StdioServerTransport())

MCP does not define a universal human-approval resume protocol. The high-level McpServer catches thrown errors, so registerNomineeTool returns { isError: true, structuredContent: { nominee: 'pending_approval', actionId, approvalId } }. Persist that actionId and the original tool input, resolve it through your approval UI, then call resumeAction() and executeCapability(). The standalone nomineeMcpHandler() still throws ActionPendingError. Denied calls never reach the MCP handler.

What happens on ask

When the policy says ask and the approval outlives the request, that is what surfaces: registerNomineeTool converts the pending approval into the structured result above (use isNomineePendingResult() to recognize it), and the low-level nomineeMcpHandler() throws ActionPendingError directly at a custom transport. The recovery — persist the actionId and the original input, resolveActionApproval(), resumeAction(), executeCapability() with the original input — is the portable out-of-band path; the full walkthrough is on the Approvals that outlive the request page. Denied calls never reach execute.

More durable-approval notes for MCP, including Postgres wiring: docs/integrations/mcp.md and examples/mcp-action-server.