Examples using
security: { mode: "local" } are for trusted local use. Hosted deployments require verified identity and resource authorization.@agentium/transport package provides admin REST endpoints for managing MCP servers and the toolkit catalog at runtime. This enables UI-driven configuration — users can add MCP servers, connect them, and have their tools automatically available to agents.
Setup
Option 1: Via createAgentRouter
Enable admin routes with a single flag:
Option 2: Standalone admin router
For more control, usecreateAdminRouter directly with a shared MCPManager:
Option 3: Shared MCPManager with agent
Share theMCPManager between admin routes and your agent so tools stay in sync:
MCP Server Endpoints
List servers
Add a server
Get server details
Connect a server
Disconnect a server
Remove a server
Get tools from a server
Get all tools (all connected servers)
Toolkit Catalog Endpoints
The admin router also exposes the toolkit catalog, allowing UIs to list available toolkit types and instantiate them with configuration.List toolkits
Get toolkit details
Instantiate a toolkit
configFields schema for the toolkit. Returns the instantiated toolkit’s name and tools.
Server Status Values
Full Example: Chat UI with MCP Management
Seeexamples/toolkits/mcp-chat-ui.ts for a complete working example that combines:
- Dynamic MCP server management from the browser
- Streaming chat with SSE
- MongoDB-backed conversation memory
- Per-session cost tracking