Patch Changes
-
#596
355836b
Thanks @omeraplak! - - add@voltagent/a2a-server
, a JSON-RPC Agent-to-Agent (A2A) server that lets external agents call your VoltAgent instance over HTTP/SSE- teach
@voltagent/core
,@voltagent/server-core
, and@voltagent/server-hono
to auto-register configured A2A servers so adding{ a2aServers: { ... } }
onVoltAgent
and opting intohonoServer
instantly exposes discovery and RPC endpoints - forward request context (
userId
,sessionId
, metadata) into agent invocations and provide task management hooks, plus allow filtering/augmenting exposed agents by default - document the setup in
website/docs/agents/a2a/a2a-server.md
and refreshexamples/with-a2a-server
with basic usage and task-store customization - A2A endpoints are now described in Swagger/OpenAPI and listed in the startup banner whenever an A2A server is registered, making discovery of
/.well-known/...
and/a2a/:serverId
routes trivial.
Getting started
import { Agent, VoltAgent } from "@voltagent/core"; import { A2AServer } from "@voltagent/a2a-server"; import { honoServer } from "@voltagent/server-hono"; const assistant = new Agent({ name: "SupportAgent", purpose: "Handle support questions from partner agents.", model: myModel, }); const a2aServer = new A2AServer({ name: "support-agent", version: "0.1.0", }); export const voltAgent = new VoltAgent({ agents: { assistant }, a2aServers: { a2aServer }, server: honoServer({ port: 3141 }), });
- teach
-
#596
355836b
Thanks @omeraplak! - ## ✨ New: first-class Model Context Protocol supportWe shipped a complete MCP integration stack:
@voltagent/mcp-server
exposes VoltAgent registries (agents, workflows, tools) over stdio/HTTP/SSE transports.@voltagent/server-core
and@voltagent/server-hono
gained ready-made route handlers so HTTP servers can proxy MCP traffic with a few lines of glue code.@voltagent/core
exports the shared types that the MCP layers rely on.
Quick start
import { MCPServer } from "@voltagent/mcp-server"; import { Agent, createTool } from "@voltagent/core"; import { openai } from "@ai-sdk/openai"; import { z } from "zod"; const status = createTool({ name: "status", description: "Return the current time", parameters: z.object({}), async execute() { return { status: "ok", time: new Date().toISOString() }; }, }); const assistant = new Agent({ name: "Support Agent", instructions: "Route customer tickets to the correct queue.", model: openai("gpt-4o-mini"), tools: [status], }); export const mcpServer = new MCPServer({ name: "voltagent-example", version: "0.1.0", description: "Expose VoltAgent over MCP", agents: { support: assistant }, tools: { status }, filterTools: ({ items }) => items.filter((tool) => tool.name !== "debug"), });
With the server registered on your VoltAgent instance (and the Hono MCP routes enabled), the same agents, workflows, and tools become discoverable from VoltOps Console or any MCP-compatible IDE.
-
#596
355836b
Thanks @omeraplak! - - Ship@voltagent/mcp-server
, a transport-agnostic MCP provider that surfaces VoltAgent agents, workflows, tools, prompts, and resources over stdio, SSE, and HTTP.- Wire MCP registration through
@voltagent/core
,@voltagent/server-core
, and@voltagent/server-hono
so a singleVoltAgent
constructor opt-in (optionally withhonoServer
) exposes stdio mode immediately and HTTP/SSE endpoints when desired. - Filter child sub-agents automatically and lift an agent's
purpose
(fallback toinstructions
) into the MCP tool description for cleaner IDE listings out of the box. - Document the workflow in
website/docs/agents/mcp/mcp-server.md
and refreshexamples/with-mcp-server
with stdio-only and HTTP/SSE configurations. - When MCP is enabled we now publish REST endpoints in Swagger/OpenAPI and echo them in the startup banner so you can discover
/mcp/*
routes without digging through code.
Getting started
import { Agent, VoltAgent } from "@voltagent/core"; import { MCPServer } from "@voltagent/mcp-server"; import { honoServer } from "@voltagent/server-hono"; const assistant = new Agent({ name: "AssistantAgent", purpose: "Respond to support questions and invoke helper tools when needed.", model: myModel, }); const mcpServer = new MCPServer({ name: "support-mcp", version: "1.0.0", agents: { assistant }, protocols: { stdio: true, http: false, sse: false }, }); export const voltAgent = new VoltAgent({ agents: { assistant }, mcpServers: { primary: mcpServer }, server: honoServer({ port: 3141 }), // flip http/sse to true when you need remote clients });
- Wire MCP registration through
-
Updated dependencies [
355836b
,355836b
,355836b
]:- @voltagent/server-core@1.0.9
- @voltagent/a2a-server@1.0.1
- @voltagent/internal@0.0.11
- @voltagent/core@1.1.13
- @voltagent/mcp-server@1.0.1