npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@agent-dispatch/mcp-server

v0.1.4

Published

Provider-neutral MCP server for AgentDispatch.

Downloads

73

Readme

@agent-dispatch/mcp-server


Why this exists

Local AI assistants are effective planners. They hit operational limits when work becomes long-running:

  • A deep-research sweep across fifty pages of docs.
  • An account-wide audit that has to touch every service.
  • A multi-hour job that has no business sitting in your IDE's context window.

Running this inline consumes context, blocks the lead-agent session, and loses continuity when the local process stops.

AgentDispatch is the missing tool. One MCP server gives your assistant a single primitive: spawn a cloud agent with this instruction, come back later for the result. The work runs on managed cloud compute. Status, logs, and the final output flow back through the same MCP channel.

  • ☁️ Cloud execution plane. AWS Bedrock AgentCore today; new clouds plug in through one small adapter contract.
  • ⏱️ Built for long-running work. Sessions for stateful runs. Runtime mode for provisioned per-task resources. Same MCP contract.
  • 🔭 Full visibility. Status, paginated logs, results, cancellation — over MCP, the SDK, or the CLI.
  • 🪶 Simple defaults. SQLite state. stdio transport. Zero hidden services. Runs locally, in CI, or on a server.

What it does

A single MCP server exposes ten tools to your assistant:

| Tool | What it does | | --- | --- | | spawn_cloud_agent | The shortcut. One instruction, defaults from a runtime profile, returns a durable taskId and optional cloudAgent metadata. | | check_cloud_agent_runtime | Preflight a configured runtime before spawning. For AWS AgentCore, it can verify credentials and runtime/control-plane reachability. | | dispatch_task | The escape hatch. Full control over provider, capability, backend, target, and input. | | get_task_status | Current status for a dispatched task. | | get_task_logs | Paginated logs, cursor-based. | | get_task_result | Final result payload when the task completes. | | cancel_task | Cancel an in-flight task. | | list_providers | Providers configured in this server. | | list_capabilities | Capabilities a provider exposes, filterable by provider. | | list_account_profiles | Account profiles configured for dispatch. |

The model side looks like this:

check_cloud_agent_runtime({ runtime: "research-agent" })
// → { ok: true, checks: [...] }

spawn_cloud_agent({ instruction: "Audit our S3 buckets for public read and report findings." })
// → { taskId: "task_...", status: "queued", cloudAgent: { ... } }

get_task_status({ task_id: "task_..." })
get_task_logs({ task_id: "task_...", cursor: 0, limit: 200 })
get_task_result({ task_id: "task_..." })

All tool inputs are validated with Zod. See src/schemas.ts for the exact shapes.

Agent-facing contract

spawn_cloud_agent is intentionally small. Runtime profiles supply the provider, account, backend, target mode, framework, model, protocol, and default tools.

Tool inputs use MCP-friendly snake_case. Responses return the same camelCase object shape as the AgentDispatch SDK and core runtime.

{
  "runtime": "research-agent",
  "instruction": "Run the background research task and report progress.",
  "protocol": "a2a",
  "context": {
    "repo": "agent-dispatch",
    "priority": "background"
  }
}

Immediate response:

{
  "taskId": "task_...",
  "status": "queued",
  "provider": "aws",
  "accountProfile": "dev-aws",
  "capability": "agent-runtime",
  "backend": "aws-agentcore",
  "poll": {
    "statusTool": "get_task_status",
    "logsTool": "get_task_logs",
    "resultTool": "get_task_result"
  },
  "cloudAgent": {
    "protocol": "a2a",
    "provider": "aws",
    "backend": "aws-agentcore",
    "accountProfile": "dev-aws",
    "sessionId": "ad-f7221e93f25499a0a1fc0160f63c7621",
    "invocation": {
      "type": "aws.agentcore.invoke_agent_runtime",
      "runtimeUrl": "https://bedrock-agentcore.us-west-2.amazonaws.com/runtimes/.../invocations/",
      "sessionHeaderName": "X-Amzn-Bedrock-AgentCore-Runtime-Session-Id",
      "payloadFormat": "a2a.jsonrpc.message-send"
    },
    "a2a": {
      "transport": "json-rpc-2.0-http",
      "messageMethod": "message/send",
      "agentCardPath": "/.well-known/agent-card.json"
    }
  }
}

If the agent does not provide enough information, the server returns a structured clarification instead of failing late:

{
  "status": "needs_clarification",
  "retry_tool": "spawn_cloud_agent",
  "questions": [
    { "id": "instruction", "question": "What task should the cloud subagent run?" },
    { "id": "runtimeArn", "question": "Which AWS AgentCore runtime ARN should this cloud subagent use?" }
  ],
  "available_runtimes": []
}

The agent can answer the clarification directly on the next spawn_cloud_agent call:

{
  "instruction": "Audit our S3 buckets for public read.",
  "runtimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:agent/..."
}

Runtime-mode clarifications work the same way with ecrImageUri, executionRoleArn, and optional environmentVariables.

Supported clients and frameworks

Anything that speaks MCP works. The common clients today:

  • Claude Code — add it to ~/.claude/mcp_settings.json or your project's MCP config.
  • Codex — add this server as a local MCP server for cloud handoff tasks.
  • OpenClaw — call spawn_cloud_agent from inside any task that should leave the local runtime.
  • Hermes — move long-running reasoning and tool-rich runs to managed cloud infrastructure.
  • Claude Desktop, Cursor, Continue, Goose, Zed — same JSON, different config file.

spawn_cloud_agent and dispatch_task both accept an optional framework string, and runtime profiles carry a default. AgentDispatch does not interpret the value; the worker does. That means OpenClaw-style, Hermes-style, Strands, LangChain, or custom workers can all fit the same MCP contract as soon as your cloud worker knows how to handle the framework.

Quick start

npm install \
  @agent-dispatch/core \
  @agent-dispatch/mcp-server \
  @agent-dispatch/store-sqlite \
  @agent-dispatch/adapter-aws-agentcore

npx agentdispatch-mcp --config agentdispatch.config.json --check

Wire it into your MCP client:

{
  "mcpServers": {
    "agentdispatch": {
      "command": "npx",
      "args": ["-y", "@agent-dispatch/mcp-server", "--config", "/abs/path/agentdispatch.config.json"]
    }
  }
}

The defaults come from your runtime profile. From the model side, spawn_cloud_agent({ instruction }) is the only call required for the common path.

How it works

   Claude Code · Codex · OpenClaw · Hermes · any MCP client
                          │ stdio
                          ▼
   ┌─────────────────────────────────────────────┐
   │       @agent-dispatch/mcp-server            │   ← this repo
   └─────────────────────┬───────────────────────┘
                         │
                         ▼
   ┌─────────────────────────────────────────────┐
   │           @agent-dispatch/core              │   ← contracts + dispatch
   └──────┬──────────┬───────────────────────────┘
          │          │
          ▼          ▼
   ┌──────────┐  ┌──────────────────────────────────┐
   │  store   │  │  adapter (AWS Bedrock AgentCore) │
   │ (sqlite) │  │      ↓                           │
   └──────────┘  │  cloud worker — runs the task    │
                 └──────────────────────────────────┘
  1. Local assistant issues spawn_cloud_agent over MCP.
  2. MCP server validates input, hydrates defaults from a runtime profile, calls the core runtime.
  3. Core picks the capability and adapter, persists the task, dispatches.
  4. Adapter invokes the worker in your cloud.
  5. Worker runs an agent framework on managed cloud infrastructure.
  6. Status, logs, results, and optional cloudAgent metadata flow back through the same path.

Configuration

Minimal AWS Bedrock AgentCore session-mode config:

{
  "stateDir": ".agentdispatch",
  "accounts": {
    "dev-aws": {
      "provider": "aws",
      "region": "us-west-2",
      "credentialSource": "aws-sdk-default"
    }
  },
  "backends": {
    "agentcore-dev": {
      "adapter": "aws-agentcore",
      "account": "dev-aws",
      "details": {
        "region": "us-west-2",
        "runtimeArn": "arn:aws:bedrock-agentcore:us-west-2:123456789012:runtime/my-runtime",
        "protocol": "a2a"
      }
    }
  },
  "runtimes": {
    "research-agent": {
      "provider": "aws",
      "account": "dev-aws",
      "capability": "agent-runtime",
      "backend": "agentcore-dev",
      "target": { "mode": "session" },
      "protocol": "a2a",
      "framework": "strands",
      "runtimeTools": { "enabled": ["web-search", "code-interpreter"] }
    }
  },
  "defaults": {
    "runtime": "research-agent"
  }
}

Once defaults.runtime is set, spawn_cloud_agent only needs an instruction. The framework, model, runtimeTools, and protocol values are passed through to the worker.

Validate before connecting an MCP client:

npx agentdispatch-mcp --config agentdispatch.config.json --check

Interaction model

spawn_cloud_agent is the control-plane call. After spawn, the lead agent can:

  • Poll via get_task_status, get_task_logs, and get_task_result.
  • Continue native subagent interaction with returned cloudAgent protocol metadata.
  • Use A2A JSON-RPC message/send when the runtime protocol is a2a.
  • Cancel through AgentDispatch so provider references remain durable.

Real-world use cases

  • Deep research from chat. Codex or Claude Code spawns a cloud agent: "Read the last 90 days of CloudTrail anomalies and propose detection rules."
  • Parallel codebase audits. A lead agent fans out a dozen spawn_cloud_agent calls, one per service, then aggregates reports.
  • Long-running OpenClaw runs. OpenClaw plans locally, then dispatches multi-hour execution to a managed AgentCore worker.
  • Tool-rich Hermes jobs. Hermes uses cloud-side tools that are not available to the local process.

The rest of AgentDispatch

| Repo | Role | | --- | --- | | core | Runtime contracts and dispatch orchestration | | mcp-server | You are here. MCP face for the runtime | | sdk-js | TypeScript SDK for application code | | cli | Command-line interface | | store-sqlite | SQLite + filesystem state store | | adapter-aws-agentcore | AWS Bedrock AgentCore adapter | | worker-agentcore | Standard AgentCore worker contract | | adapter-template | Starter for new cloud adapters | | docs | Documentation | | website | Static project website |

Development

npm install
npm run typecheck
npm test
npm run build

See the release workflow for npm Trusted Publisher setup, provenance publishing, and upstream package order.

Contributing

PRs, issues, and adapter contributions are welcome. See CONTRIBUTING.md for the local workflow.

If you ship a new framework worker or a new cloud adapter, open a discussion so it can be linked from the org README.

License

Apache-2.0. See LICENSE.