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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@zoeylabs/mcpx

v0.1.0

Published

MCP stdio-to-HTTP bridge for connecting Claude Desktop, Cursor, and other MCP clients to HTTP-based MCP servers

Readme

mcpx

MCP stdio-to-HTTP bridge for connecting Claude Desktop, Cursor, and other MCP clients to HTTP-based MCP servers.

Why?

MCP clients like Claude Desktop communicate via stdio (standard input/output), but many MCP servers expose an HTTP endpoint. This bridge translates between the two, enabling seamless connectivity.

┌─────────────────┐       stdio        ┌─────────┐       HTTP        ┌─────────────┐
│  Claude Desktop │  ←──────────────→  │  mcpx   │  ←─────────────→  │  MCP Server │
│  Cursor         │                    │         │                    │  (Gateway)  │
│  Windsurf       │                    └─────────┘                    └─────────────┘
└─────────────────┘

Installation

No installation required! Use directly with npx:

npx @zoeylabs/mcpx

Or install globally:

npm install -g @zoeylabs/mcpx

Usage

Claude Desktop

Add to your claude_desktop_config.json:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "@zoeylabs/mcpx"],
      "env": {
        "MCP_URL": "https://mcp-server.example.com/mcp",
        "MCP_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project or configure via Settings → MCP Servers:

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "@zoeylabs/mcpx"],
      "env": {
        "MCP_URL": "https://mcp-server.example.com/mcp",
        "MCP_API_KEY": "your-api-key"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "@zoeylabs/mcpx"],
      "env": {
        "MCP_URL": "https://mcp-server.example.com/mcp",
        "MCP_API_KEY": "your-api-key"
      }
    }
  }
}

Continue (VS Code)

Add to ~/.continue/config.json:

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@zoeylabs/mcpx"],
          "env": {
            "MCP_URL": "https://mcp-server.example.com/mcp",
            "MCP_API_KEY": "your-api-key"
          }
        }
      }
    ]
  }
}

Cline (VS Code)

Open VS Code Command Palette → "Cline: Open MCP Settings" and add:

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["-y", "@zoeylabs/mcpx"],
      "env": {
        "MCP_URL": "https://mcp-server.example.com/mcp",
        "MCP_API_KEY": "your-api-key"
      }
    }
  }
}

Configuration

All configuration is via environment variables:

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | MCP_URL | Yes | - | MCP server URL (HTTP or HTTPS) | | MCP_API_KEY | No | - | API key for authentication | | MCP_USE_BEARER | No | false | Use Authorization: Bearer instead of X-API-Key header | | MCP_TIMEOUT | No | 30000 | Request timeout in milliseconds | | MCP_INSECURE | No | false | Skip SSL certificate validation (for self-signed certs) | | MCP_DEBUG | No | false | Enable debug logging to stderr |

Legacy Environment Variables

For backward compatibility, these are also supported:

| Variable | Maps To | |----------|---------| | GATEWAY_URL | MCP_URL | | GATEWAY_API_KEY | MCP_API_KEY | | DEBUG | MCP_DEBUG |

Features

  • Zero dependencies - Pure Node.js, no external packages
  • Streamable HTTP transport - Implements MCP 2025-03-26 specification
  • Session management - Automatic session ID handling
  • SSE support - Handles Server-Sent Events responses
  • Configurable auth - Supports X-API-Key and Bearer token authentication
  • Timeout handling - Configurable request timeouts
  • Debug mode - Detailed logging for troubleshooting

Troubleshooting

Enable debug logging

Set MCP_DEBUG=true to see detailed logs:

{
  "env": {
    "MCP_URL": "https://server.example.com/mcp",
    "MCP_DEBUG": "true"
  }
}

Debug output goes to stderr so it won't interfere with the stdio protocol.

Self-signed certificates

For development with self-signed SSL certificates:

{
  "env": {
    "MCP_URL": "https://localhost:8100/mcp",
    "MCP_INSECURE": "true"
  }
}

Connection refused

  1. Verify the MCP server is running
  2. Check the URL is correct (including /mcp path)
  3. Ensure firewall allows the connection
  4. Try with MCP_DEBUG=true for more details

Protocol Support

mcpx implements the Streamable HTTP transport from the MCP specification:

  • Individual POST requests for each JSON-RPC message
  • Session ID tracking via Mcp-Session-Id header
  • SSE responses for streaming results
  • Proper handling of 202 Accepted for notifications

License

MIT