MCP examples
Runnable files: agentium-examples/toolkits (16-mcp-tools.ts, mcp-local-http.ts).
Guide: MCP
1. GitHub MCP over stdio
include so you do not dump every MCP tool into the prompt.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Connect to an MCP server and use its tools like local defineTool tools.
16-mcp-tools.ts, mcp-local-http.ts).
Guide: MCP
npm install @modelcontextprotocol/sdk
import { Agent, openai, MCPToolProvider } from "@agentium/core";
const githubMcp = new MCPToolProvider({
name: "github",
transport: "stdio",
command: "npx",
args: ["-y", "@modelcontextprotocol/server-github"],
env: { GITHUB_TOKEN: process.env.GITHUB_TOKEN ?? "" },
});
await githubMcp.connect();
const mcpTools = await githubMcp.getTools({
include: ["list_releases", "search_repositories"],
});
const agent = new Agent({
name: "github-bot",
model: openai("gpt-4o"),
instructions: "You use GitHub tools. Prefer the filtered list.",
tools: mcpTools,
});
await agent.run("What is the latest release of agentiumOS/agentium?");
include so you do not dump every MCP tool into the prompt.