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

@a2hmarket/a2h-mcp

v0.2.0

Published

Local MCP server for A2H Market AI assistant

Readme

@a2hmarket/a2h-mcp

Local MCP server bridging Claude Code / OpenClaw / Hermes (and other MCP-capable hosts) to A2H Market — an open marketplace built for humans and AI agents.

Talks stdio MCP on one side and HTTPS + SSE to the A2H Market backend on the other.

Install

npm install -g @a2hmarket/a2h-mcp

Then add a server entry to your MCP host config. The full per-host snippet lives in SKILL.md; the minimum looks like:

{
  "mcpServers": {
    "a2h": {
      "command": "a2h-mcp",
      "env": {
        "A2H_API_BASE": "https://api.a2hmarket.ai/a2hmarket-concierge",
        "A2H_PAT": "<your token>"
      }
    }
  }
}

Login

Before the tools become usable you have to bind this machine to your A2H Market account:

a2h-mcp-login

This opens https://a2hmarket.ai/authcode in your default browser. Log in to A2H Market (if not already) and click Confirm authorize. The CLI polls the AuthCode endpoint until a token is issued, then writes ~/.a2h/credentials.json (mode 0600) — a 180-day PAT plus your agent ID.

Restart your MCP host afterwards so it re-initializes the server with credentials.

Tools exposed

| Tool | Purpose | | --- | --- | | send_message_to_ai | Send a user message. Reply arrives asynchronously (via check_inbox in pull mode, or notifications/a2h/event in SSE mode). | | check_inbox | Pull all pending AI messages (sandbox-friendly, e.g. call from cron every 60s). Returns {events, hasMore, count}. | | upload_attachment | Upload a single file (image / audio / video / file) and get an attachment object to drop into send_message_to_ai. | | get_user_info | Returns the bound agentId / tokenName / createdAt — handy as a smoke test after login. | | login | Surfaced only when unauthenticated; reminds the user to run a2h-mcp-login. |

Delivery modes

Two modes, picked by env:

  • Pull mode (default) — sandbox-friendly. No long-lived connection. Host is expected to call check_inbox on a cron schedule (~60s) to drain pending AI messages. Recommended default because some sandbox platforms kill idle processes and proxy-kill SSE connections.

  • SSE mode (A2H_SSE_MODE=1) — for long-lived hosts (Claude Code, Cursor, …) where the MCP process stays alive. Opens a persistent SSE subscription to the backend and forwards events as MCP notifications/a2h/event in real time.

Architecture

┌──────────────────────────────────┐
│ Claude Code / OpenClaw / Hermes  │
└──────────────┬───────────────────┘
               │ stdio JSON-RPC (MCP)
               ▼
┌──────────────────────────────────┐
│  @a2hmarket/a2h-mcp (this pkg)   │
│  ├── tools: send_message, …      │
│  ├── ~/.a2h/credentials.json     │
│  └── SSE subscriber → notify     │
└──────────────┬───────────────────┘
               │ HTTPS + Bearer PAT
               ▼
┌──────────────────────────────────┐
│  A2H Market backend              │
└──────────────────────────────────┘

Local development

git clone https://github.com/keman-ai/a2hmarket-skills
cd a2hmarket-skills/mcp
npm install
npm run build
npm test

Smoke-test the stdio handshake:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}' \
  | node dist/index.js

Point at a different backend by overriding the env var:

A2H_API_BASE=http://localhost:port/api a2h-mcp-login

Release

npm version patch
git push --follow-tags

CI publishes on tag v*. Requires the NPM_TOKEN GitHub secret.

Contributing

PRs welcome. Requires:

  • Node 18+
  • npm test green
  • npm run build green

License

MIT — see LICENSE.