Hatago Mcp Hub — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Hatago Mcp Hub (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
English | 日本語
Hatago (旅籠) — A relay point connecting modern AI tools with MCP servers.
Hatago MCP Hub is a lightweight hub that unifies access to multiple MCP (Model Context Protocol) servers from tools like Claude Code, Codex CLI, Cursor, Windsurf, and VS Code.
docs/README.mdpackages/mcp-hub/README.mdDev.to: Getting Started with Multi-MCP Using Hatago MCP Hub — One Config to Connect Them All
npx @himorishige/hatago-mcp-hub serve --http#### Configuration Updates
nodemon --exec "hatago serve --http" --watch hatago.config.jsonpm2 start "hatago serve" --watch hatago.config.jsonnotifications/tools/list_changed notification#### Progress Notification Forwarding
notifications/progress#### Built-in Internal Resource
hatago://servers - JSON snapshot of currently connected servers (id, status, type, tools, resources, prompts)#### Enhanced Features
${VAR} and ${VAR:-default} syntaxextends field for DRY principleExternal packages (server/test-utils) use a thin IHub interface to avoid tight coupling with the concrete class.
import type { IHub } from '@himorishige/hatago-hub';
import { createHub } from '@himorishige/hatago-hub/node';
const hub: IHub = createHub({
preloadedConfig: { data: { version: 1, mcpServers: {} } }
}) as IHub;
await hub.start();
hub.on('tool:called', (evt) => {
/* metrics, logs */
});
await hub.stop();Extracted modules for thin hub:
packages/hub/src/rpc/handlers.tspackages/hub/src/http/handler.tspackages/
├── mcp-hub/ # Main npm package (@himorishige/hatago-mcp-hub)
├── server/ # Server implementation (@himorishige/hatago-server)
├── hub/ # Hub core (@himorishige/hatago-hub)
├── core/ # Shared types (@himorishige/hatago-core)
├── runtime/ # Runtime components (@himorishige/hatago-runtime)
├── transport/ # Transport layer (@himorishige/hatago-transport)
├── cli/ # CLI tools (@himorishige/hatago-cli)
├── hub-management/ # Management components (@himorishige/hatago-hub-management)
└── test-fixtures/ # Test utilities# Initialize configuration
npx @himorishige/hatago-mcp-hub init
# Start in STDIO mode (for Claude Code)
# NOTE: STDIO requires a config file path
npx @himorishige/hatago-mcp-hub serve --stdio --config ./hatago.config.json
# Or start in HTTP mode without a config (demo/dev)
npx @himorishige/hatago-mcp-hub serve --http# Install globally
npm install -g @himorishige/hatago-mcp-hub
# Use with hatago command
hatago init
hatago serve# Install as dependency
npm install @himorishige/hatago-mcp-hub
# Add to package.json scripts
{
"scripts": {
"mcp": "hatago serve"
}
}#### STDIO Mode (Recommended)
##### Claude Code / Gemini CLI
Add to .mcp.json:
{
"mcpServers": {
"hatago": {
"command": "npx",
"args": [
"@himorishige/hatago-mcp-hub",
"serve",
"--stdio",
"--config",
"./hatago.config.json"
]
}
}
}##### Codex CLI
Add to ~/.codex/config.toml:
[mcp_servers.hatago]
command = "npx"
args = ["-y", "@himorishige/hatago-mcp-hub", "serve", "--stdio", "--config", "./hatago.config.json"]#### HTTP Mode
##### Claude Code / Gemini CLI
Add to .mcp.json:
{
"mcpServers": {
"hatago": {
"url": "http://localhost:3535/mcp"
}
}
}##### Codex CLI
Add to ~/.codex/config.toml:
[mcp_servers.hatago]
command = "npx"
args = ["-y", "mcp-remote", "http://localhost:3535/mcp"]For testing and debugging:
# Start in HTTP mode
hatago serve --http --port 3535
# Connect with MCP Inspector
# Endpoint: http://localhost:3535/mcpVisit MCP Inspector
Enable lightweight in-memory metrics and expose an HTTP endpoint:
HATAGO_METRICS=1 hatago serve --http --port 3535
# Then visit: http://localhost:3535/metricsNotes:
HATAGO_LOG=json (respecting HATAGO_LOG_LEVEL).Create hatago.config.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}"
}
}
}
}#### Strategy 1: Tag-based Filtering
Group servers with tags in a single configuration file:
{
"mcpServers": {
"filesystem-dev": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"tags": ["dev", "local"]
},
"github-prod": {
"url": "https://api.github.com/mcp",
"type": "http",
"tags": ["production", "github"]
},
"database": {
"command": "mcp-server-postgres",
"tags": ["dev", "production", "database"]
}
}
}Start with specific tags:
# Only start servers tagged as "dev"
hatago serve --tags dev
# Start servers with either "dev" or "test" tags
hatago serve --tags dev,test
# Japanese tags are supported
hatago serve --tags 開発,テスト#### Strategy 2: Configuration Inheritance
Split configurations by environment using the extends field:
Base configuration (~/.hatago/base.config.json):
{
"version": 1,
"logLevel": "info",
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
}
}
}Work configuration (./work.config.json):
{
"extends": "~/.hatago/base.config.json",
"logLevel": "debug",
"mcpServers": {
"github": {
"env": {
"GITHUB_TOKEN": "${WORK_GITHUB_TOKEN}",
"DEBUG": null
}
},
"internal-tools": {
"url": "https://internal.company.com/mcp",
"type": "http",
"headers": {
"Authorization": "Bearer ${INTERNAL_TOKEN}"
}
}
}
}Features:
"extends": ["./base1.json", "./base2.json"]~, relative, and absolute pathsnull to remove inherited env vars#### Choosing a Strategy
| Strategy | Tag-based | Inheritance-based |
|---|---|---|
| Files | Single config | Multiple configs |
| Switch | --tags option | --config option |
| Management | Centralized | Distributed |
| Best for | Team sharing, Simple setups | Complex environments, Personal customization |
Supports Claude Code compatible syntax:
${VAR} - Expands to the value of VAR (error if undefined)${VAR:-default} - Uses default value if VAR is undefinedhatago initCreate configuration file with interactive setup:
hatago init # Interactive mode
hatago init --mode stdio # STDIO mode config
hatago init --mode http # HTTP mode config
hatago init --force # Overwrite existinghatago serveStart 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 # Custom config
hatago serve --verbose # Debug logging
hatago serve --tags dev,test # Filter servers by tags
hatago serve --env-file ./.env # Load variables from .env before start (repeatable)
hatago serve --env-override # Override existing env vars when using --env-file#### Loading Environment Variables from Files
Use --env-file <path...> to load variables before config parsing. This helps resolve ${VAR} and ${VAR:-default} placeholders without exporting variables globally.
KEY=VALUE, export KEY=VALUE, # comments, blank lines.\n, \r, \t.~/ expanded to home.process.env keys are preserved unless --env-override is provided.import { 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();Client (Claude Code, etc.)
↓
Hatago Hub (Router + Registry)
↓
MCP Servers (Local, NPX, Remote)#### Local Servers
#### NPX Servers
@modelcontextprotocol/server-filesystem@modelcontextprotocol/server-github@modelcontextprotocol/server-memory#### Remote Servers
https://mcp.deepwiki.com/sse)--verbose flag for detailed logs# Enable verbose logging
hatago serve --verbose
# Check server status
hatago statusContributions are welcome! Please see our GitHub repository for more information.
MIT License
Built with the Hono and the Model Context Protocol SDK by Anthropic.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.