@agenium/mcp-server
v0.1.7
Published
Bridge any MCP server to the agent:// network — make your tools discoverable, callable, and composable by other AI agents.
Maintainers
Readme
What It Does
MCP gives agents tools. AGENIUM gives agents identity.
This package bridges the gap: take any MCP server and make it discoverable on the agent:// network. Other agents can find it by name, see its capabilities, and call its tools — no manual configuration.
MCP Server (local tools) → @agenium/mcp-server → agent://weather-tools (network-discoverable)Install
npm install @agenium/mcp-serverQuick Start — 5 Lines of Code
import { MCPBridge } from '@agenium/mcp-server';
const bridge = new MCPBridge({
name: 'weather-tools',
mcp: {
transport: 'stdio',
command: 'npx',
args: ['-y', '@modelcontextprotocol/server-weather'],
},
});
await bridge.start();
// ✅ MCP server connected — found 2 tools
// ✅ Registered as agent://weather-tools
// ✅ Any agent can now discover and call your toolsCall Remote MCP Tools
import { MCPAgentClient } from '@agenium/mcp-server';
const client = new MCPAgentClient('my-agent');
await client.start();
// Discover what tools an agent has
const info = await client.discover('agent://weather-tools');
console.log(info.tools);
// → [{ name: 'get_forecast', ... }, { name: 'get_alerts', ... }]
// Call a tool remotely
const result = await client.callTool('agent://weather-tools', 'get_forecast', {
city: 'San Francisco',
days: 3,
});Supported Transports
| Transport | Use Case |
|-----------|----------|
| stdio | Spawn MCP server as child process (most common) |
| sse | Connect to running MCP server via SSE |
| streamable-http | MCP v2 streamable HTTP transport |
Protocol — What Gets Exposed
When bridged, your MCP server's capabilities are available as agent:// methods:
| Method | Description |
|--------|-------------|
| tools/list | List available tools |
| tools/call | Call a tool |
| resources/list | List available resources |
| resources/read | Read a resource |
| prompts/list | List available prompts |
| prompts/get | Get a prompt |
| capabilities | Full capability manifest |
| ping | Health check |
Events
bridge.on('ready', ({ tools, resources, prompts }) => { /* MCP connected */ });
bridge.on('registered', ({ name, endpoint }) => { /* On agent:// network */ });
bridge.on('tool:call', ({ tool, sessionId }) => { /* Tool invoked */ });
bridge.on('tool:result', ({ tool, durationMs }) => { /* Tool completed */ });
bridge.on('error', (err) => { /* Handle errors */ });Configuration
const bridge = new MCPBridge({
name: string; // Agent name on the network
mcp: {
transport: 'stdio' | 'sse' | 'streamable-http';
command?: string; // For stdio
args?: string[]; // For stdio
url?: string; // For sse/streamable-http
headers?: Record<string, string>;
};
agent?: {
port?: number; // Listen port (default: auto)
publicHost?: string; // Your public IP
autoRegister?: boolean; // Register on DNS (default: true)
};
bridge?: {
toolCallTimeoutMs?: number; // Timeout (default: 30s)
exposeResources?: boolean; // Expose resources (default: true)
exposePrompts?: boolean; // Expose prompts (default: true)
};
});How It Works
┌──────────────┐ agent:// ┌──────────────┐ JSON-RPC ┌────────────┐
│ Any Agent │ ──────────────► │ MCP Bridge │ ─────────────► │ MCP Server │
│ on network │ │ @agenium/ │ │ (any tool) │
│ │ ◄────────────── │ mcp-server │ ◄───────────── │ │
└──────────────┘ response └──────┬───────┘ result └────────────┘
│ registers
▼
┌────────────┐
│ AGENIUM │
│ DNS Network│
└────────────┘Part of the AGENIUM Ecosystem
| Package | Description |
|---------|-------------|
| agenium | Core agent SDK |
| @agenium/create-agent | Scaffold agents in 60 seconds |
| @agenium/mcp-server | ← You are here |
🔍 Find MCP Servers to Bridge
Find tools, APIs, and services to bridge to the agent:// network — searchable by capability, language, and use case.
Links
- 📖 Documentation
- 🤖 Live Demo — 4 working agents
- 💬 Discord — Community & support
- 🐦 Twitter/X
License
MIT © AGENIUM
