# How to connect NPM to Hermes Agent (paste one key, 12 tools)

> Connect NPM to Hermes with ClawLink: paste your NPM key once and 12 tools work from chat. No MCP server to run, nothing stored on your machine.

Web version: https://claw-link.dev/hermes/npm

Most guides for giving Hermes Agent NPM access start with registering your own OAuth app or pasting API keys into env files, then leave the token refresh and tool wiring to you. ClawLink gives Hermes a more practical NPM setup: pair once in the browser and your always-on Hermes agent can act on NPM for you, reading and doing real work on your behalf with no auth, token refresh, or tool wiring to build yourself.

**Start here — paste this into Hermes to set up ClawLink:**

> Set up ClawLink for Hermes and tell me when it's ready.
> 1. Install the plugin: `hermes plugins install ClawLink-HQ/hermes-plugin --enable`
> 2. Start pairing with `hermes clawlink begin`. It prints an approval link, so show me the link and stop, don't wait.
> 3. I'll approve it in my browser, then reply "approved".
> 4. When I say approved, finish setup: `hermes clawlink finish`
> 5. Then run `hermes clawlink test` and tell me whether ClawLink is ready.

## Setup

It takes three steps to connect Hermes to NPM.

1. **Install ClawLink** — add the plugin to Hermes Agent once.
2. **Connect NPM** — one-click OAuth in the ClawLink dashboard.
3. **Use it from chat** — ask Hermes Agent in plain English.

**Alternative for any agent (no plugin needed):** if the Hermes Agent plugin route isn't available or doesn't work, any AI agent with shell access can use the ClawLink CLI instead:

```bash
npx -y @useclawlink/cli login          # sign in via browser — no API key to paste
npx -y @useclawlink/cli connect npm  # connect NPM (browser OAuth)
npx -y @useclawlink/cli actions npm  # list available actions
npx -y @useclawlink/cli run npm <action> --input '<json>'  # execute (add --confirm for writes)
```

### Install by command

The prompt above walks Hermes through this. By hand, it is four commands and a browser approval:

```bash
hermes plugins install ClawLink-HQ/hermes-plugin --enable
hermes clawlink begin    # prints an approval link — open it and approve
hermes clawlink finish   # after approving in the browser
hermes clawlink test
```

Then connect NPM in the [ClawLink dashboard](https://claw-link.dev/dashboard) — paste your NPM API key once.

Verify the connection by asking Hermes:

> Use npm_get_download_counts_range_package for packages \<a> and \<b> over the last 90 days and tell me which is growing faster and where the crossover happened, if any.

### Using a different agent?

The Hermes plugin is one client of ClawLink's MCP server. Claude Code, Cursor, Codex, or any agent that can run a shell command pairs with the same ClawLink account through the CLI:

```bash
npx -y @useclawlink/cli login
```

`login` opens the same browser approval and stores a credential locally. Once NPM is connected in the dashboard, that agent calls the same 12 NPM tools over MCP. Full setup for MCP clients and shell agents: [connect apps to any AI agent](https://claw-link.dev/learn/connect-apps-to-any-ai-agent).

## NPM MCP for Hermes

Looking for a NPM MCP server for Hermes Agent? ClawLink connects NPM to Hermes Agent and exposes 12 NPM tools your agent can call over [MCP](https://claw-link.dev/learn/what-is-an-mcp-server), with [hosted auth](https://claw-link.dev/learn/oauth-for-ai-agents) and nothing to run or maintain yourself. Using OpenClaw instead? The [OpenClaw NPM integration](https://claw-link.dev/openclaw/npm) works the same way.

First, which Hermes: this page connects Hermes Agent, the Nous Research agent runtime, to the npm registry. It is not about React Native's Hermes JavaScript engine, which is an npm-installable package and is what many npm developers mean when they search "Hermes and npm", and it is not Hermes One. Search engines currently answer "npm + Hermes" for those other products, and ChatGPT's first response to the connect question is literally "it depends on which Hermes you mean". With that settled: the 12 tools here are registry analytics, download counts, package metadata, security advisories, and search, all read-only, powered by an npm token you paste once and ClawLink holds server-side.

## What "safe" means for the npm tools

The fear in the search results is supply-chain damage: poisoned packages, postinstall scripts, credential harvesting. Here is how this toolset answers it structurally.

- **No install path.** None of the tools download, install, or execute a package, so the postinstall-script and typosquatted-install failure modes cannot occur through them.
- **No publish path.** Nothing in the set can write to the registry, so there is no package modification, no version overwrite, and no OTP or scope risk on publish.
- **No code execution.** The tools return registry data; the agent reads the same metadata the npmjs.com website renders.
- **The token is held, not harvested.** The npm token lives server-side, pasted once and revoked on disconnect, which removes the credential-from-an-env-file failure mode the safety answers fear most.
- **Reads still deserve judgment.** Registry metadata can be misleading, stale packages, suspicious names, and the agent should treat package descriptions as untrusted text rather than instructions.

The honest summary: this integration cannot do the things the supply-chain warnings describe, and that is the strongest safety claim the page can make.

## What the Hermes Agent NPM integration can do

12 NPM tools are ready for Hermes Agent once the account is connected. The 11 below are the ones people reach for most; your agent can call all 12.

### 11 of 12 NPM tools for Hermes

| Tool | What it does |
|---|---|
| **Get all packages download point** `npm_get_all_packages_download_point` | Get total registry download stats |
| **Get download counts point** `npm_get_download_counts_point` | Get package download counts |
| **Get download counts range package** `npm_get_download_counts_range_package` | Get downloads over a date range |
| **Get registry changes** `npm_get_registry_changes` | Get registry changes feed |
| **Get registry meta** `npm_get_registry_meta` | Get registry metadata and ping status |
| **Get version downloads** `npm_get_version_downloads` | Get version-specific downloads |
| **Query bulk security advisories** `npm_query_bulk_security_advisories` | Check security vulnerabilities for packages |
| **Registry get package** `npm_registry_get_package` | Get package metadata and versions |
| **Registry search packages** `npm_registry_search_packages` | Search for packages in the npm registry |
| **Get download range all** `npm_get_download_range_all` | Get daily download counts for all npm packages over a specified period |
| **Registry get root** `npm_registry_get_root` | Fetches npm registry root metadata including total package count and update sequence |

## Example prompts

**Compare download trends**

> Use npm_get_download_counts_range_package for packages \<a> and \<b> over the last 90 days and tell me which is growing faster and where the crossover happened, if any.

**Vet a package**

> Fetch npm_registry_get_package for \<package> and report its latest version, publish date, description, repository, and maintainers. Then check it with npm_query_bulk_security_advisories and flag anything unresolved.

**Search the registry**

> Search npm_registry_search_packages for \<term> and rank the top results by weekly downloads, recency of the last publish, and whether the name looks like it could be typosquatting a well-known package.

**Registry health check**

> Call npm_get_registry_meta and npm_registry_get_root and tell me the total package count, the update sequence, and whether the registry looks healthy right now.

## How the npm tools behave

Details that decide whether an npm prompt is a fast answer or a throttled crawl.

- **Everything is a registry read.** Downloads, metadata, advisories, search, and the registry meta tools: none of the 12 install, publish, or execute code, which is the supply-chain safety story of this integration.
- **Date ranges are per-request.** `npm_get_download_counts_range_package`, `npm_get_version_downloads`, and `npm_get_download_range_all` take explicit ranges, and each package-range pair is its own request, so broad comparisons are many calls.
- **Security advisories are a dedicated tool.** `npm_query_bulk_security_advisories` checks packages against advisory data, the fastest vetting path for a dependency question.
- **The registry meta is the health check.** `npm_get_registry_meta` and `npm_registry_get_root` answer whether the registry is reachable and current, the right first call when something looks wrong.
- **Search is real.** `npm_registry_search_packages` returns ranked results, which is how an agent answers "what is the standard package for X" and how a typosquat check starts.
- **The one non-read tool deletes a token.** `npm_delete_user_token_legacy` removes an npm access token; it does not touch packages, and it is the only tool here that changes anything about credentials.

## ClawLink vs. building it yourself

The alternative to ClawLink is usually manual API key setup plus your own token handling, permission troubleshooting, and tool plumbing for Hermes Agent. That is fine if you want to build and maintain the integration yourself. Most teams just want NPM working from chat.

| | Manual | ClawLink |
|---|---|---|
| **Credential handling** | Collect, validate, store, and rotate the NPM API key yourself, then make sure every tool call uses the right account. | Users complete the hosted ClawLink setup once and the connected NPM account becomes available to the agent without you building credential management. |
| **Ongoing maintenance** | You own refresh logic, permission debugging, environment config, and every provider-specific edge case for NPM. | ClawLink handles the repetitive integration plumbing so your team can focus on the workflow instead of the infrastructure. |
| **Agent usability** | You still need to expose the right NPM actions to the runtime in a format your agent can reliably use. | 12 tools for NPM are already exposed through ClawLink, so the agent can read and act from chat immediately. |

## ClawLink vs. Composio

Composio also exposes NPM to AI agents. It is developer infrastructure: Python and TypeScript SDKs, an MCP server, and a catalog past 1,000 apps, aimed at teams shipping agent products. ClawLink is built for Hermes Agent users instead. You install the plugin once, connect NPM in the browser, and the 12 tools above work from chat. There is no SDK and no config file, and the NPM key you paste at setup is stored server-side rather than kept in your environment. Choosing between them? Read the full [Composio alternatives](https://claw-link.dev/hub/composio-alternatives) comparison.

### Hermes paired but still can't use NPM
Pairing is a two-step handshake: run `hermes clawlink begin`, approve the link in your browser, then run `hermes clawlink finish`. If you ran finish before approving, or the approval link expired, run `hermes clawlink begin` again to get a fresh link. Confirm the plugin was installed with `--enable`, then verify with `hermes clawlink test`.

### Connection succeeds but no tools appear
Reconnect NPM from the dashboard, then start a fresh chat if the runtime still has the old tool catalog loaded.

### "Tool schema not loaded yet" error when calling NPM tools
NPM tool schemas load on demand the first time a tool runs and are cached after that, so this error usually clears on its own: wait a few seconds and retry the same request. If every NPM call keeps failing with it in a fresh chat, reconnect from the dashboard, and contact support if it still persists — that pattern points to a configuration problem on our side, not something you can fix by reconnecting again.

### NPM returns 403 or "permission denied" on one action while others work
Two usual causes. The connected account may not have access to the specific workspace, inbox, store, or project in the request — check that first. If access looks right, the agent may have sent a placeholder value (like "YOUR_ID" or an example id from documentation) instead of a real one: ask it to run a list or search tool first, then retry the action with a real id from those results. Most failures at this stage are one of these two, not ClawLink bugs.

### npm returns 401 invalid token while the account shows as connected
The engines answer this with token lifecycle mechanics, `.npmrc` `_authToken`, `npm login`, granular access tokens, and the classic-token deprecation, or, on the Hermes side, with Nous Hermes auth files and pasted-token corruption. Neither describes a hosted connection. Here the account-connected state and the credential-valid state are separate: the npm token was pasted at setup and held server-side, and if it was rotated, revoked, or narrowed upstream, every npm call 401s while the dashboard still shows a connection. The fix is to re-paste the current token from the dashboard, or reconnect if the connection is stale. Placeholder arguments, an example package name, produce a different error, but a 401 is the credential.

Ask the agent to diagnose it:

```text
Call npm_get_registry_meta and quote exactly what it returns including the status code. Do not retry the failing tools until we have that result.
```

### npm returns 403 on some packages while others work
For registry reads, a 403 on a subset of calls points at token scope: an npm granular access token can be limited to specific packages or scopes, and anything outside them returns 403 while in-scope reads succeed. If every call 403s, check the registry the calls target: a private registry or a misconfigured registry URL rejects tokens issued for the public registry. The publish-specific causes, version overwrites and OTP requirements, are part of the online answers for this error but cannot occur here because there is no publish tool. If nothing changed upstream, reconnect from the dashboard to re-issue the credential state.

Ask the agent to diagnose it:

```text
Call npm_registry_get_package for a package you know exists, then for the one that failed. Tell me the exact status and body of the failing call and what differs between the two.
```

### npm starts returning 429 or the agent stalls partway through a download analysis
npm applies acceptable-use limits to registry traffic, and the download-count tools are the ones that meet them: walking many packages over long date ranges generates one request per package per range. The response is to shape the work, a handful of packages per turn, narrower date ranges, and to have the agent report the 429 when it arrives rather than retrying in a loop. If a genuine bulk analysis is needed, staging it across turns is more reliable than one sweep.

Ask the agent to diagnose it:

```text
Tell me how many npm calls you have made in the last minute and which packages and ranges you were walking. Quote any 429 body from the last response. Do not call npm again until I reply.
```

### API key setup works but results look incomplete
Double-check that the API key for NPM has the right scopes or account access. A valid key can still be too limited for some reads or writes.

### Is there a Hermes Agent NPM integration?
Yes. ClawLink is the fastest way to connect Hermes to NPM: link your NPM account once in the browser and Hermes Agent can call the NPM API through 12 ready-made tools — no custom code or token handling.

### How do I connect NPM to Hermes with ClawLink?
Install the plugin with `hermes plugins install ClawLink-HQ/hermes-plugin --enable`, then pair once: run `hermes clawlink begin`, approve the link in your browser, and run `hermes clawlink finish`. Connect NPM in the dashboard and Hermes can use it from the next message — no config files, and the NPM key you paste is stored server-side instead of in your environment.

### How long does it take to connect NPM to Hermes Agent?
About two minutes. Sign in, click Connect next to NPM in the dashboard, authenticate, and Hermes Agent can use it from the next chat message.

### Why use ClawLink instead of wiring NPM up myself?
The alternative to ClawLink is usually manual API key setup plus your own token handling, permission troubleshooting, and tool plumbing for Hermes Agent. That is fine if you want to build and maintain the integration yourself. Most teams just want NPM working from chat.

### Which Hermes is this, and what is it not?
Hermes Agent is the Nous Research agent runtime, and it is the agent this page's pairing commands target: `hermes plugins install ClawLink-HQ/hermes-plugin --enable`, then `hermes clawlink begin` and `hermes clawlink finish`. The other Hermes that dominates npm searches is React Native's Hermes, the JavaScript engine you install as an npm package; if you arrived looking for it, this page is not that. A third product, Hermes One, appears in some search answers. ChatGPT enumerates all three at the top of its connect answer, which is why the disambiguation comes before anything else here.

### Can the agent publish or install packages?
No, and that is deliberate. There is no publish tool and no install tool in this set. The no-token-publish question deserves the precise answer the engines give it: npm Trusted Publishing (OIDC) works, but only inside a CI/CD platform that holds the OIDC identity, and ChatGPT's own answer concedes that a standalone agent service has no way to publish without a token. Hosted OAuth is the answer outside CI/CD: the credential is held server-side, so the agent's npm calls work anywhere the agent runs, without you creating or rotating a token. What the hosted flow does not do is add publish capability; the toolset is reads only, and publishing is simply not something these 12 tools do.

### Is it safe to connect npm to an AI agent?
The safety answers in search are a supply-chain story, malicious packages, hallucinated typosquatted installs, postinstall script execution, and credential harvesting, with the verdict "not safe without strict isolation". The answer for this integration is structural: none of those failure modes can happen through these tools, because none of them install, execute, or publish anything. The 12 tools read the public registry the way the npmjs.com website does: download counts, metadata, advisories, search. The one non-read tool deletes an npm access token (`npm_delete_user_token_legacy`), it does not change packages. The credential itself is held server-side and revoked on disconnect, which removes the harvested-token failure mode entirely.

### What does a 403 mean for these tools?
The npm 403 answers online are about publishing: a publish-version overwrite, not being logged in, 2FA requiring an OTP on publish, or a wrong registry scope. Publishing is not in this toolset, so those causes do not apply to anything on this page. For registry reads, a 403 means the token's scopes or the registry configuration reject the call: a token scoped to a specific package or scope cannot read beyond it, and a registry misconfiguration, like pointing at a private registry the token cannot reach, produces the same error. If the tool worked yesterday and 403s today, the token was narrowed or revoked upstream, see the 401 card.

### Hermes paired but still can't use NPM
Pairing is a two-step handshake: run `hermes clawlink begin`, approve the link in your browser, then run `hermes clawlink finish`. If you ran finish before approving, or the approval link expired, run `hermes clawlink begin` again to get a fresh link. Confirm the plugin was installed with `--enable`, then verify with `hermes clawlink test`.

## Related

- [Hermes GitHub integration](https://claw-link.dev/hermes/github) — Manage repositories, issues, pull requests, and workflows
- [PagerDuty](https://claw-link.dev/hermes/pagerduty) — Manage incidents, on-call schedules, and services
- [Connect SafetyCulture](https://claw-link.dev/hermes/safetyculture) — SafetyCulture (formerly iAuditor) is a workplace operations platform that enables teams to conduct digital inspections, manage audits, track issues, schedule tasks, and maintain compliance through mobile and web applications.
