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

mcp-i-proxy

v0.0.3

Published

Lightweight stdio-to-HTTP proxy for MCP-I agents, enabling session persistence for Claude Desktop and other MCP clients

Readme

mcp-i-proxy

A lightweight stdio-to-HTTP proxy for MCP-I agents, enabling session persistence for Claude Desktop and other MCP clients.

Why This Exists

Claude Desktop (and some other MCP clients) re-establishes connections for every tool call, generating new session IDs each time. This breaks OAuth flows that rely on session persistence.

mcp-i-proxy solves this by:

  • 🔌 Bridging stdio (Claude Desktop) to HTTP (your MCP-I server)
  • 🔐 Maintaining session IDs across tool calls
  • 💾 Persisting sessions across restarts
  • 🌐 Auto-opening browser for OAuth consent (popup-style, like Google OAuth!)
  • ⚡ Being lightweight (~30KB, zero heavy dependencies)

Installation

# No installation needed! Just use npx:
npx mcp-i-proxy https://your-agent.example.com/mcp

# Or install globally:
npm install -g mcp-i-proxy

Usage

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "my-agent": {
      "command": "npx",
      "args": ["-y", "mcp-i-proxy", "https://your-agent.example.com/mcp"]
    }
  }
}

With debug logging:

{
  "mcpServers": {
    "my-agent": {
      "command": "npx",
      "args": ["-y", "mcp-i-proxy", "--debug", "https://your-agent.example.com/mcp"]
    }
  }
}

CLI Commands

# Start proxy (main usage)
mcp-i-proxy https://your-agent.example.com/mcp

# Health check
mcp-i-proxy health https://your-agent.example.com/mcp

# Check status
mcp-i-proxy status https://your-agent.example.com/mcp

# With options
mcp-i-proxy --debug --timeout 60000 https://your-agent.example.com/mcp

Options

| Option | Description | Default | |--------|-------------|---------| | --debug | Enable debug logging | false | | --no-auto-auth | Don't auto-open browser for OAuth | false | | --no-session | Disable session persistence | false | | --transport <type> | Transport type: streamablehttp or sse | streamablehttp | | --timeout <ms> | Request timeout in milliseconds | 30000 | | --header <key:value> | Add custom header (repeatable) | - |

Features

🔐 Session Persistence

Sessions are automatically persisted to ~/.mcp-i-proxy/sessions.json. When Claude Desktop restarts, the proxy restores the session, avoiding re-authentication.

🌐 Auto-Open Browser for OAuth

When a tool requires authorization, the proxy automatically opens your browser to the consent URL:

🔐 Authorization Required

Tool "greet" requires your permission.
Scopes: greet:execute

→ Please visit this URL to authorize:
  https://your-agent.example.com/consent?session=abc123

🌐 Browser opened for authorization

📊 Health Check

Quickly verify your MCP server is reachable:

$ mcp-i-proxy health https://your-agent.example.com/mcp

┌─────────────────────────────────────────────┐
│  🏥 MCP-I Server Health Check               │
├─────────────────────────────────────────────┤
│  Server:  https://your-agent.example.com    │
│  Status:  ✓ Healthy                         │
│  Latency: 42   ms                           │
└─────────────────────────────────────────────┘

🐛 Debug Mode

Enable detailed logging to troubleshoot issues:

mcp-i-proxy --debug https://your-agent.example.com/mcp

Architecture

┌─────────────────┐     stdio      ┌─────────────────┐     HTTP     ┌─────────────────┐
│  Claude Desktop │ ────────────▶ │   mcp-i-proxy   │ ──────────▶ │   MCP-I Server  │
│  (MCP Client)   │ ◀──────────── │   (this pkg)    │ ◀────────── │   (your agent)  │
└─────────────────┘               └─────────────────┘             └─────────────────┘
                                         │
                                         ▼
                                  ~/.mcp-i-proxy/
                                   sessions.json

The proxy:

  1. Reads JSON-RPC messages from stdin (Claude Desktop)
  2. Forwards them to your MCP-I server via HTTP
  3. Manages the Mcp-Session-Id header
  4. Persists sessions to disk
  5. Writes responses to stdout (back to Claude Desktop)

Programmatic Usage

import { MCPIProxy, createLogger } from 'mcp-i-proxy';

const proxy = new MCPIProxy({
  serverUrl: 'https://your-agent.example.com/mcp',
  debug: true,
  autoAuth: true,
});

await proxy.start();

Comparison with Other Solutions

| Feature | mcp-i-proxy | Python mcp-proxy | |---------|-------------|------------------| | Runtime | Node.js | Python | | Install | npx (auto) | pip install | | Size | ~30KB | ~50KB | | MCP-I Features | ✅ Built-in | ❌ Generic | | Auto-Open Browser | ✅ | ❌ | | Session Persistence | ✅ File-based | ❌ Memory only |

Requirements

  • Node.js 18 or later
  • Internet connection to MCP-I server

Troubleshooting

"Session expired" errors

Try clearing the session cache:

rm ~/.mcp-i-proxy/sessions.json

Browser doesn't open for OAuth

Check that you have a default browser set. You can also manually copy the consent URL from the logs.

Connection timeout

Increase the timeout:

mcp-i-proxy --timeout 60000 https://your-agent.example.com/mcp

License

MIT © Kya OS

Related