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

nstantcode-mcp

v0.1.5

Published

stdio MCP bridge to the hosted nstantcode MCP server for clients that require a local command

Readme

nstantcode-mcp

A stdio MCP bridge to the hosted nstantcode MCP server, for clients that cannot perform the remote OAuth flow themselves.

Claude web and Claude Code can add https://nstantcode.com/mcp directly. Codex CLI uses this package because its supported mcp add syntax launches a local command.

What it does

It is a transparent JSON-RPC proxy. Messages from the client are forwarded verbatim to https://nstantcode.com/mcp with a Bearer token, and replies are written back unchanged.

Because it does not model individual tools, all nc_* project tools added server-side show up without updating this package. nTasks is intentionally a separate connector.

Setup

Codex

codex mcp add nstantcode -- npx -y nstantcode-mcp@latest

Equivalent config:

# ~/.codex/config.toml
[mcp_servers.nstantcode]
command = "npx"
args = ["-y", "nstantcode-mcp@latest"]

Any client that launches a local command

{
  "mcpServers": {
    "nstantcode": {
      "command": "npx",
      "args": ["-y", "nstantcode-mcp@latest"]
    }
  }
}

First run

  1. The bridge finds no cached token and starts a device-authorization session.
  2. It prints a one-time URL to stderr, which your MCP client surfaces to you.
  3. Open it, sign in, approve.
  4. The token is cached at ~/.config/nstantcode-mcp/token.json (mode 0600) and reused.

Your password never reaches the bridge — only the resulting token does.

Sign out or change account

Codex does not currently provide a logout button for a local stdio MCP server. To clear this bridge's cached nstantcode credential, run:

npx -y nstantcode-mcp@latest logout

Then start a new Codex task. The bridge will show a browser approval URL again; sign in to the intended nstantcode account and approve it. This clears the local cache only. It does not revoke an already-issued token at the server.

In MCP clients that expose the tool, nc_logout performs the same local sign-out and tells the client to start a new MCP session.

nc_login starts a fresh device-authorization flow and returns the approval URL directly in the tool result. This is preferable in Codex when the local MCP server's stderr output is not visible.

Configuration

| Variable | Default | Purpose | | --- | --- | --- | | NSTANTCODE_BASE_URL | https://nstantcode.com | Backend base URL | | NSTANTCODE_MCP_TOKEN | (none) | Pre-issued token; skips the browser flow entirely | | NSTANTCODE_TOKEN_FILE | ~/.config/nstantcode-mcp/token.json | Token cache location | | NSTANTCODE_CLIENT_NAME | nstantcode-mcp (<platform>) | Name shown on the approval page |

Local development against a backend on port 5001:

NSTANTCODE_BASE_URL=http://localhost:5001 npx nstantcode-mcp

Tokens

The device flow returns two tokens. This bridge uses mcpToken, which is audience-bound to {origin}/mcp and carries the mcp_resource claim that endpoint requires. The other one, token, is the generic agent JWT used by the nstantcode CLI against /api/* routes; it is not accepted by /mcp.

If authorization fails with a complaint about a legacy agent token, the backend predates the dual-token device flow and needs updating.

On a 401 the bridge clears its cache, re-runs the browser flow once, and replays the request.

The bridge explicitly requests only mcp:projects. Cached entries record that scope; a cache created for the previous mixed connector is ignored so nTasks access cannot remain attached to nstantcode.

The bridge also filters every tools/list response to nc_* and rejects non-project tool calls locally. This protects the connector if it is temporarily used against an older backend that still exposes a mixed catalog.

Manual smoke test

(echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}'; \
 sleep 1; \
 echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'; \
 sleep 3) | npx nstantcode-mcp@latest

tools/list should return only the nc_* project tools.

If Codex was already running an older bridge, remove and add it again, then start a new Codex task so the MCP process and its cached tool catalog are replaced:

codex mcp remove nstantcode
codex mcp add nstantcode -- npx -y nstantcode-mcp@latest

nTasks is a separate remote connector:

codex mcp add ntasks -- npx -y mcp-remote https://ntasks.nstantcode.com/mcp

Related