コンテンツにスキップ

@himorishige/hatago-server

NPX-ready MCP Hub server for Claude Code and other AI assistants.

Terminal window
# Run with npx (STDIO mode by default)
npx @himorishige/hatago-server
# Run in HTTP mode for development
npx @himorishige/hatago-server --http
# With custom configuration
npx @himorishige/hatago-server --config ./hatago.config.json

Add to your .mcp.json:

{
"mcpServers": {
"hatago": {
"command": "npx",
"args": ["@himorishige/hatago-server", "--stdio"]
}
}
}
  • Designed for Claude Code and MCP-compatible clients
  • Uses LSP-style framing over STDIO
  • Protocol on stdout, logs on stderr
  • For development and debugging
  • Provides /mcp, /sse, and /health endpoints
  • Provides /metrics when metrics are enabled (HATAGO_METRICS=1)
  • Enable with --http flag
--stdio Run in STDIO mode (default)
--http Run in HTTP mode
--config <path> Path to configuration file
--host <string> HTTP server host (default: 127.0.0.1)
--port <number> HTTP server port (default: 3535)
--log-level <level> Log level (silent|error|warn|info|debug|trace)
--help Show help
--version Show version

Create a hatago.config.json:

{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
},
"github": {
"url": "https://api.github.com/mcp",
"type": "sse"
}
}
}

Supports JSON with comments (JSONC):

{
// Local filesystem server
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
}
}
}
  • HATAGO_CONFIG - Configuration file path
  • HATAGO_HOST - HTTP server host
  • HATAGO_PORT - HTTP server port
  • HATAGO_LOG_LEVEL - Log level
  • HATAGO_LOG - Set to json to enable JSON logs (stderr)
  • HATAGO_METRICS - Set to 1 to enable in-memory metrics and expose /metrics (HTTP mode only)
  1. CLI arguments
  2. Environment variables
  3. Configuration file
  4. Defaults
Terminal window
# Install dependencies
pnpm install
# Build
pnpm build
# Development mode
pnpm dev
# Type check
pnpm typecheck

MIT