
Product
Microsoft Teams Notifications Are Now Available in Socket
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.
@himorishige/hatago-mcp-hub
Advanced tools
Unified MCP Hub for managing multiple Model Context Protocol servers
Unified MCP (Model Context Protocol) Hub for managing multiple MCP servers. Works with Claude Code, Codex CLI, Cursor, Windsurf, VS Code and other MCP-compatible tools.
# Initialize configuration
npx @himorishige/hatago-mcp-hub init
# Start server in STDIO mode (for Claude Code)
# NOTE: STDIO mode requires a config file path
npx @himorishige/hatago-mcp-hub serve --stdio --config ./hatago.config.json
# Start server in HTTP mode (for development/debugging)
npx @himorishige/hatago-mcp-hub serve --http --port 3535
# Use directly with npx (no installation needed)
npx @himorishige/hatago-mcp-hub init
# STDIO requires config
npx @himorishige/hatago-mcp-hub serve --stdio --config ./hatago.config.json
# Or HTTP without config (for demo/dev)
npx @himorishige/hatago-mcp-hub serve --http
# Or install globally
npm install -g @himorishige/hatago-mcp-hub
hatago init
hatago serve
npm install @himorishige/hatago-mcp-hub
hatago initCreate a default configuration file with interactive mode selection:
hatago init # Interactive mode selection
hatago init --mode stdio # Create config for STDIO mode
hatago init --mode http # Create config for StreamableHTTP mode
hatago init --force # Overwrite existing config
hatago serveStart the MCP Hub server:
hatago serve --stdio --config ./hatago.config.json # STDIO mode (default, requires config)
hatago serve --http # HTTP mode (config optional)
hatago serve --config custom.json # Use custom config file
hatago serve --verbose # Enable debug logging
hatago serve --env-file ./.env # Load variables from .env before start (can repeat)
hatago serve --env-override # Override existing process.env with values from env-file(s)
--env-file <path...> loads environment variables from one or more files before configuration is parsed. This allows ${VAR} and ${VAR:-default} placeholders in hatago.config.json to resolve without exporting variables manually.
KEY=VALUE, export KEY=VALUE, comments starting with #, and empty lines.\n, \r, \t escapes are expanded.~/ is expanded to the home directory.process.env keys are preserved. Use --env-override to overwrite.Examples:
hatago serve --http --env-file ./.env
hatago serve --http --env-file ./base.env ./secrets.env
hatago serve --http --env-file ./local.env --env-override
Terminology: In this document, "HTTP mode" refers to the MCP SDK's StreamableHTTP transport. We mention "StreamableHTTP" only once here for clarity; elsewhere we say "HTTP mode". [ISA]
Add to your .mcp.json:
{
"mcpServers": {
"hatago": {
"command": "npx",
"args": [
"@himorishige/hatago-mcp-hub",
"serve",
"--stdio",
"--config",
"./hatago.config.json"
]
}
}
}
Add to your ~/.codex/config.toml:
[mcp_servers.hatago]
command = "npx"
args = ["-y", "@himorishige/hatago-mcp-hub", "serve", "--stdio", "--config", "./hatago.config.json"]
Add to your .mcp.json:
{
"mcpServers": {
"hatago": {
"url": "http://localhost:3535/mcp"
}
}
}
Add to your ~/.codex/config.toml:
[mcp_servers.hatago]
command = "npx"
args = ["-y", "mcp-remote", "http://localhost:3535/mcp"]
Note: Codex CLI connects via STDIO; use mcp-remote to bridge HTTP endpoints.
Start in HTTP mode and connect:
hatago serve --http --port 3535
# Connect MCP Inspector to:
# - Endpoint: http://localhost:3535/mcp
### Metrics (opt-in)
Enable lightweight metrics and expose an endpoint (HTTP mode only):
```bash
HATAGO_METRICS=1 hatago serve --http --port 3535
# Then visit: http://localhost:3535/metrics
JSON logs can be enabled with HATAGO_LOG=json (respects HATAGO_LOG_LEVEL).
## Configuration
### Basic Configuration
Create a `hatago.config.json`:
```json
{
"$schema": "https://raw.githubusercontent.com/himorishige/hatago-mcp-hub/main/schemas/config.schema.json",
"version": 1,
"logLevel": "info",
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}
{
"mcpServers": {
"deepwiki": {
"url": "https://mcp.deepwiki.com/sse",
"type": "sse"
},
"custom-api": {
"url": "https://api.example.com/mcp",
"type": "http",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}
Hatago supports configuration inheritance through the extends field:
{
"extends": "~/.hatago/base.config.json",
"mcpServers": {
"local-server": {
"command": "node",
"args": ["./server.js"]
}
}
}
Features:
"extends": ["./base1.json", "./base2.json"]~ for home directory, relative and absolute pathsnull to remove inherited env varsExample with env override:
{
"extends": "~/.hatago/global.json",
"mcpServers": {
"github": {
"env": {
"GITHUB_TOKEN": "${WORK_GITHUB_TOKEN}",
"DEBUG": null
}
}
}
}
Hatago supports Claude Code-compatible environment variable expansion:
${VAR} - Expands to the value of VAR (error if undefined)${VAR:-default} - Uses default value if VAR is undefinedExample:
{
"mcpServers": {
"api-server": {
"url": "${API_URL:-https://api.example.com}/mcp",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}
docs/configuration.md)notifications/tools/list_changedhatago://servers: Returns a JSON snapshot of currently connected servers and their basic details.hatago initimport { startServer } from '@himorishige/hatago-mcp-hub';
// Start server programmatically
await startServer({
mode: 'stdio',
config: './hatago.config.json',
logLevel: 'info'
});
import { createHub } from '@himorishige/hatago-mcp-hub';
const hub = createHub({
mcpServers: {
memory: {
command: 'npx',
args: ['@modelcontextprotocol/server-memory']
}
}
});
// Use hub directly in your application
const tools = await hub.listTools();
Hatago uses a modular architecture with platform abstraction:
Client (Claude Code, etc.)
↓
Hatago Hub (Router + Registry)
↓
MCP Servers (Local, NPX, Remote)
@modelcontextprotocol/server-filesystem@modelcontextprotocol/server-github@modelcontextprotocol/server-memoryhttps://mcp.deepwiki.com/sse)"No onNotification handler set" warning
Server connection failures
--verbose flagTool name collisions
Enable verbose logging for troubleshooting:
hatago serve --verbose
MIT License
Contributions are welcome! Please see our GitHub repository for more information.
FAQs
Unified MCP Hub for managing multiple Model Context Protocol servers
We found that @himorishige/hatago-mcp-hub demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.