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

@natomalabs/natoma-mcp-gateway

v1.0.5

Published

Natoma MCP Gateway

Readme

Natoma MCP Gateway

A robust, production-ready gateway that bridges stdio-based MCP clients (like Claude Desktop) with HTTP/SSE-based MCP servers on the Natoma platform.

Overview

The Natoma MCP Gateway acts as a translation layer that enables seamless communication between different MCP (Model Context Protocol) implementations. It operates exclusively in enterprise mode, providing production-grade features including automatic reconnection, health monitoring, and robust error handling.

Features

  • Enterprise Gateway: Production-ready gateway with enhanced reliability and monitoring
  • Protocol Translation: Converts stdio JSON-RPC messages to HTTP/SSE format and vice versa
  • Custom URL Support: Configure custom endpoints for private deployments

Installation

npm install @natomalabs/natoma-mcp-gateway

Usage

Environment Variables

Required environment variables:

  • NATOMA_MCP_SERVER_INSTALLATION_ID: Your MCP server installation ID/slug
  • NATOMA_MCP_API_KEY: Your Natoma API key for authentication

Optional environment variables:

  • NATOMA_MCP_CUSTOM_URL: Custom endpoint URL (overrides default api.natoma.app endpoint)

Corporate Proxy/Firewall Support

If you're running in a corporate environment with tools like ZScaler that perform TLS interception, you may encounter certificate validation errors. You can resolve this using Node.js's built-in support for custom CA certificates:

# Export your corporate CA bundle
export NODE_EXTRA_CA_CERTS="/path/to/corporate-ca-bundle.pem"

# Run the gateway
npx @natomalabs/natoma-mcp-gateway

This approach is the standard Node.js solution for corporate environments.

Command Line Usage

# Run the gateway (--enterprise flag is required)
npx @natomalabs/natoma-mcp-gateway --enterprise

Integration with Claude Desktop

Add to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "your-server-name": {
      "command": "npx",
      "args": [
        "@natomalabs/natoma-mcp-gateway",
        "--enterprise"
      ],
      "env": {
        "NATOMA_MCP_SERVER_INSTALLATION_ID": "your-installation-id",
        "NATOMA_MCP_API_KEY": "your-api-key"
      }
    }
  }
}

For custom endpoint URLs:

{
  "mcpServers": {
    "your-server-name": {
      "command": "npx",
      "args": [
        "@natomalabs/natoma-mcp-gateway",
        "--enterprise"
      ],
      "env": {
        "NATOMA_MCP_SERVER_INSTALLATION_ID": "your-installation-id",
        "NATOMA_MCP_API_KEY": "your-api-key",
        "NATOMA_MCP_CUSTOM_URL": "https://your-custom-endpoint.com/mcp"
      }
    }
  }
}

For corporate environments with custom certificates:

{
  "mcpServers": {
    "your-server-name": {
      "command": "npx",
      "args": [
        "@natomalabs/natoma-mcp-gateway",
        "--enterprise"
      ],
      "env": {
        "NATOMA_MCP_SERVER_INSTALLATION_ID": "your-installation-id",
        "NATOMA_MCP_API_KEY": "your-api-key",
        "NODE_EXTRA_CA_CERTS": "/path/to/corporate-ca-bundle.pem"
      }
    }
  }
}

Architecture

Enterprise Gateway

The gateway operates in enterprise mode with the following features:

  • Uses fetch API with enhanced reliability
  • Support for both JSON and SSE responses
  • Health check monitoring (every 5 minutes)
  • Extended timeouts (60 seconds)
  • Enhanced error recovery
  • Custom endpoint URL support

Protocol Flow

  1. Initialization: Gateway connects to Natoma MCP Platform
  2. Session Establishment: Secure session created with session ID tracking
  3. Message Processing: stdio JSON-RPC messages translated to HTTP/SSE
  4. Response Handling: Server responses converted back to stdio format
  5. Error Recovery: Automatic reconnection on connection failures

Configuration

The gateway accepts several configuration options through the MCPConfig interface:

  • slug: Server installation ID (required)
  • apiKey: Authentication API key (required)
  • isEnterprise: Must be set to true (mandatory for enterprise mode)
  • customUrl: Optional custom endpoint URL (overrides default api.natoma.app)
  • maxReconnectAttempts: Maximum reconnection attempts (default: 5)
  • reconnectDelay: Delay between reconnection attempts (default: 2000ms)
  • timeout: Request timeout (default: 60000ms)

What is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI assistants to external systems and data sources. Learn more at modelcontextprotocol.io.

Requirements

  • Node.js 18 or higher
  • Valid Natoma API credentials
  • Network access to api.natoma.app

Development

# Clone the repository
git clone <repository-url>
cd mcp-gateway

# Install dependencies
npm install

# Build the project
npm run build

# Run in development mode
npm run dev

# Run enterprise mode in development
npm run dev:enterprise

Error Handling

The gateway includes comprehensive error handling:

  • Connection Errors: Automatic reconnection with exponential backoff
  • Authentication Errors: Clear error messages for invalid API keys
  • Timeout Handling: Configurable timeouts with proper cleanup
  • Protocol Errors: Validation and error reporting for malformed messages
  • Resource Management: Proper cleanup of connections and timeouts

License

MIT

Support

For issues and support, please contact the Natoma team or file an issue in the repository.