コンテンツにスキップ

@himorishige/hatago-runtime

Runtime components for Hatago MCP Hub - session, registry, router, and retry management.

This package provides the core runtime functionality needed to build MCP Hub servers. It includes session management, registry systems for tools/resources/prompts, message routing, and error recovery mechanisms.

Terminal window
npm install @himorishige/hatago-runtime
  • Create and manage user sessions
  • TTL-based expiration
  • Thread-safe operations with mutex
  • Tool registry with collision avoidance
  • Resource registry
  • Prompt registry
  • Route MCP protocol messages
  • Handle tool calls
  • Resource resolution
  • Retry with exponential backoff
  • Circuit breaker pattern
  • Error categorization
import { SessionManager } from '@himorishige/hatago-runtime';
const sessionManager = new SessionManager(3600); // 1 hour TTL
const session = await sessionManager.createSession('session-id');
  • @himorishige/hatago-core - Core type definitions
  • @modelcontextprotocol/sdk - MCP SDK

MIT