Dispatch
Build agent-ready tools from a shared TypeScript core.
Dispatch is an open-source toolkit that exposes the same business logic through a CLI, a local MCP server, a remote MCP server, and AI Skills. It demonstrates how to build reusable agent tooling without duplicating business logic.
npm install -g @amarnath00/dispatch
dispatch init --telegram-bot-token "<bot-token>"
dispatch telegram "<chat-id>" "Hello from Dispatch"One core. Every interface.
Dispatch ships the same operation as a CLI command, a local MCP tool, a remote MCP server, and an AI Skill — all thin adapters around a shared package.
Shared Core
Zod schemas, operation functions, and type exports live in @amarnath00/dispatch-core. No CLI or MCP imports.
CLI
dispatch telegram <chatId> <message>. Parses args with Commander, always prints JSON for humans and agents.
Local MCP Server
An MCP stdio server that registers a telegram tool backed by the shared core with the shared input schema.
Remote MCP Server
A Hono HTTP app exposing POST /:botToken/mcp, run by Bun, protected with Clerk OAuth.
AI Skills
The Dispatch Skill tells agents when to use the MCP tool and when to fall back to the CLI.
Why Dispatch
When the same capability ships to humans, scripts, and agents, business logic tends to fragment across each interface. Dispatch keeps that logic in one place.
Each interface contains duplicated business logic.
A single shared implementation powers every interface.
Published packages
Available on npm today.