<< All versions
Skill v1.0.0
currentAutomated scan100/100anvia-hq/anvia/anvia-mcp
──Details
PublishedNovember 4, 2026 at 04:33 AM
Content Hashsha256:850240053a6207e8...
Git SHAc90548649287
──Files
Files (1 file, 1.5 KB)
SKILL.md1.5 KBactive
SKILL.md · 52 lines · 1.5 KB
name: anvia-mcp description: Connect MCP servers to Anvia agents — clients, transports, tool discovery, URL safety, and lifecycle. metadata: version: "1.0.0"
Anvia MCP Skill
Use this skill when the user wants tools from an MCP server: configuring an McpClient, choosing stdio vs Streamable HTTP, handling version negotiation and URL safety, grouping servers, or wiring them into an Agent.
Process
- Configure clients (
references/clients.md) — oneMcpClientper server. - Apply the safety rules (
references/safety.md) — especially for HTTP servers. - Run
scripts/check-mcp.shfrom the app root before claiming done.
Minimal slice
ts
import { Agent } from "@anvia/core/agent";import { McpClient } from "@anvia/mcp";const counterMcp = new McpClient({name: "counter",transport: { type: "stdio", command: "tsx", args: ["./mcp-counter-server.ts"] },});const counterServer = await counterMcp.connect();try {const agent = new Agent({id: "agent",model: agentModel,instructions: "Use MCP tools for arithmetic and counter updates.",mcpServers: [counterServer], // the only path for MCP tools — never via skillsmaxTurns: 3,});for await (const event of agent.stream({ prompt: "Add 8 and 13." })) {if (event.type === "response") console.log("final:", event.text);}} finally {await counterMcp.close();}
Output
Prefer stdio for local servers, Streamable HTTP for remote ones. Point to the relevant reference file instead of pasting its contents into chat.