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

@rakettitiede/mcp-ai-ccode

v1.0.0

Published

Local MCP server that bridges Claude.ai to Claude Code CLI

Readme

ai-ccode

A minimal MCP bridge that connects any Claude interface to a Claude Code CLI session running on your local machine.

What it does

Exposes two MCP tools:

  • run_claude_code(prompt, session_id?) — spawns claude -p "<prompt>" asynchronously, returns { job_id, status: "running" } immediately
  • check_status(job_id) — reads the result once the job finishes, returns { status, output, exit_code, session_id }

This lets Claude delegate code writing, git operations, and gh CLI work directly to Claude Code — without copy-pasting prompts.

How it works

Claude (browser / CLI / desktop)
    ↓  MCP tool call over HTTPS
your-domain.com  ← public HTTPS endpoint (see Cloudflare setup below)
    ↓  Cloudflare Tunnel
    ↓  TCP → localhost:8080
ai-ccode Express server  ← this repo, running on your machine
    ↓  child_process spawn
claude -p "<prompt>"  ← Claude Code CLI
    ↓  stdout captured async
check_status(job_id)  ← polled after job finishes

Prerequisites

Installation

git clone https://github.com/rakettitiede/ai-ccode.git
cd ai-ccode
npm install
npm start
# → Listening on :8080

Exposing via Cloudflare Tunnel

The MCP endpoint must be reachable over HTTPS. Cloudflare Tunnel handles this without opening firewall ports.

Option A — Free tier (random URL)

cloudflared tunnel --url http://localhost:8080
# → https://random-name.trycloudflare.com

The URL changes every time you restart the tunnel. Use this for testing.

Option B — Named tunnel with custom domain (stable URL)

A stable URL requires a Cloudflare account and a registered domain (can be purchased via Cloudflare Registrar for ~$10/year).

# Authenticate
cloudflared tunnel login

# Create a named tunnel
cloudflared tunnel create my-bridge

# Route your domain to the tunnel
cloudflared tunnel route dns my-bridge mcp.your-domain.com

# Start the tunnel
cloudflared tunnel run my-bridge

The tunnel URL (https://mcp.your-domain.com) stays stable across restarts. Use this for production use.

Connect to Claude

In your Claude project settings → MCP connector:

URL: https://your-tunnel-url/mcp

Claude will discover the run_claude_code and check_status tools automatically.

Session management

Claude Code sessions persist across multiple run_claude_code calls via the session_id returned by check_status. Pass it to the next call to resume the same session — preserves working directory, in-memory state, and tool context.

# First call
run_claude_code("git status") → { job_id: "abc...", status: "running" }
check_status("abc...") → { status: "done", session_id: "xyz..." }

# Resume same session
run_claude_code("git add -A && git commit -m 'fix'", session_id: "xyz...")

Environment variables

| Variable | Default | Description | |---|---|---| | PORT | 8080 | Port for the Express server |

YubiKey / SSH note

Git push and SSH operations require hardware key authentication if configured. With SSH multiplexing, a single touch caches credentials for the session duration — subsequent operations within the window don't re-prompt.

License

Apache 2.0 — see LICENSE.