open-index/open-npm huggingface dataset:
npm package: @mcp-hive-utils/proxy
Description: This is the MCP-Hive Proxy. It can be loaded by any agentic host in order to access MCP-Hive and is a gateway to other MCP servers. To obtain credentials, and read further documentation, go to [mcp-hive.com](https://mcp-hive.com)
Latest version: 1.0.16

# MCP-Hive Proxy

This is the MCP-Hive Proxy. It can be loaded by any agentic host in order to access MCP-Hive and is a gateway to other MCP servers. To obtain credentials, and read further documentation, go to [mcp-hive.com](https://mcp-hive.com)

[![smithery badge](https://smithery.ai/badge/mcp-hive/hive-servers)](https://smithery.ai/server/mcp-hive/hive-servers)

## Running

The proxy can run in two modes:

### Server Mode (Single MCP)

Proxy a specific MCP server to your MCP client:

```bash
node src/proxy/mcpHiveProxy.ts --server <server-name> --local --credentials <credentials>
```

### Gateway Mode (All MCPs)

Expose all available MCP servers through a single proxy with namespaced tools:

```bash
node src/proxy/mcpHiveProxy.ts --gateway --local --credentials <credentials>
```

In gateway mode:

- Discovery tools are available: `discoverServers`, `listTools`, `listResources`, `listPrompts`
- All server tools are namespaced: `serverName___toolName` (e.g., `validator___echo`, `accuweather___getWeather`)

### Proxy Flags

| Flag                 | Description                                         |
| -------------------- | --------------------------------------------------- |
| `--server <name>`    | Proxy a specific MCP server (omit for gateway mode) |
| `--gateway`          | Explicitly enable gateway mode                      |
| `--http`             | Run the proxy in HTTP transport                     |
| `--port <port_num>`  | Port number to be used if HTTP-transport            |
| `--credentials <id>` | Consumer credentials for authentication             |
| `--verbose`          | Enable verbose logging                              |