Framework integrations
Any MCP-compatible client can look .agt names up, and any A2A-compatible client can call a .agt agent by URL. Two hosted surfaces make both a one-liner: the MCP endpoint at https://agtnames.com/api/mcp (the same five read-only tools as @agtnames/mcp, Streamable HTTP, nothing to install) and an A2A agent card per name at /api/v2/agent-card/<label>. Below, one snippet per framework; each is the framework's own remote-MCP or A2A primitive pointed at those URLs.
Look names up from an agent (MCP)
import { Agent, hostedMcpTool, run } from "@openai/agents";
const agent = new Agent({
name: "directory",
instructions: "Use the agt tools to look up .agt names before connecting to another agent.",
tools: [hostedMcpTool({ serverLabel: "agt", serverUrl: "https://agtnames.com/api/mcp" })],
});
const result = await run(agent, "Who runs notary.agt and what is its endpoint?");from agents import Agent, HostedMCPTool, Runner
agent = Agent(
name="directory",
instructions="Use the agt tools to look up .agt names before connecting to another agent.",
tools=[HostedMCPTool(tool_config={
"type": "mcp", "server_label": "agt", "server_url": "https://agtnames.com/api/mcp", "require_approval": "never",
})],
)
result = await Runner.run(agent, "Who runs notary.agt and what is its endpoint?")import { createMCPClient } from "@ai-sdk/mcp";
import { generateText } from "ai";
const agt = await createMCPClient({ transport: { type: "http", url: "https://agtnames.com/api/mcp" } });
const tools = await agt.tools(); // agt_resolve, agt_manifest, agt_endpoint, agt_available, agt_namehash
const { text } = await generateText({ model, tools, prompt: "Resolve notary.agt and summarize its verified capabilities." });
await agt.close();from google.adk.agents import Agent
from google.adk.agents.remote_a2a_agent import RemoteA2aAgent
from google.adk.tools.mcp_tool import McpToolset, StreamableHTTPConnectionParams
# Tools: look names up
agt = McpToolset(connection_params=StreamableHTTPConnectionParams(url="https://agtnames.com/api/mcp"))
# Delegate: call a .agt agent over A2A by its card URL (any name with an a2a endpoint)
notary = RemoteA2aAgent(name="notary", description="Verifies claims.", agent_card="https://agtnames.com/api/v2/agent-card/notary")
root = Agent(model="gemini-2.5-flash", name="coordinator", tools=[agt], sub_agents=[notary])from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerStreamableHTTP
agt = MCPServerStreamableHTTP("https://agtnames.com/api/mcp")
agent = Agent("openai:gpt-5", toolsets=[agt])
async with agent:
result = await agent.run("Is fixer.agt available? If not, who owns it?")import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
const mcp = new MCPClient({ servers: { agt: { url: new URL("https://agtnames.com/api/mcp") } } });
const agent = new Agent({
name: "directory",
instructions: "Resolve .agt names with the agt tools; only trust manifest fields when verified is true.",
model: "openai/gpt-5",
tools: await mcp.getTools(),
});from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
client = MultiServerMCPClient({ "agt": { "url": "https://agtnames.com/api/mcp", "transport": "streamable_http" } })
tools = await client.get_tools()
agent = create_react_agent("openai:gpt-5", tools)
await agent.ainvoke({ "messages": "Find notary.agt's A2A endpoint." })from agent_framework import ChatAgent, MCPStreamableHTTPTool
from agent_framework.a2a import A2AAgent
agt = MCPStreamableHTTPTool(name="agt", url="https://agtnames.com/api/mcp")
coordinator = ChatAgent(chat_client=client, name="coordinator", tools=[agt])
# Call a .agt agent directly over A2A from its card
notary = A2AAgent(name="notary", url="https://agtnames.com/api/v2/agent-card/notary")# hosted (Streamable HTTP)
claude mcp add --transport http agt https://agtnames.com/api/mcp
# or local (stdio)
claude mcp add agt -- npx -y @agtnames/mcp// .cursor/mcp.json
{
"mcpServers": {
"agt": { "url": "https://agtnames.com/api/mcp" }
}
}Or one click: Add to Cursor (local stdio launch).
The tools are agt_resolve, agt_manifest, agt_endpoint, agt_available and agt_namehash, all annotated read-only. Manifest content arrives under an untrusted envelope: data published by the name owner, never instructions. Import paths follow each framework's current release; the URL is the stable part.
Call a .agt agent over A2A
A name whose owner published an a2a endpoint gets an agent card, built from its verified manifest. Frameworks that take a card URL (Google ADK RemoteA2aAgent, Microsoft Agent Framework A2AAgent, a2a-python A2ACardResolver) can call the agent with nothing else configured.
curl https://agtnames.com/api/v2/agent-card/notary
# {
# "protocolVersion": "1.0",
# "name": "notary.agt",
# "description": "...",
# "url": "https://.../a2a", ← the a2a endpoint from the verified manifest
# "preferredTransport": "JSONRPC",
# "skills": [{ "id": "fact-checking", "name": "Fact Checking", ... }],
# "provider": { "organization": "...", "url": "..." },
# "documentationUrl": "https://agtnames.com/name/notary"
# }
# 404 { "error": "No A2A endpoint" } when the name publishes noneSkills come from the manifest's capability ids; provider from the owner and website; documentationUrl is the public name page. When the manifest does not verify, the card carries only the on-chain endpoint and says so in its description. The same card comes from the SDK: agentCardFrom(resolution) in @agtnames/resolver, or npx agt-resolve card <name>.
ERC-8004
A manifest already carries a registrations[] entry for ERC-8004, and the resolver exports the registration file an 8004 identity points at: erc8004RegistrationFrom(manifest) or npx agt-resolve export-8004 <name> (services from the endpoints, x402Support from the payment rails). Export today; on-chain registration from the site is on the roadmap.
See also
- Use with Claude Code: the MCP server in depth, what
verifiedmeans, troubleshooting. - Discover an agent, then connect to it: the loop every snippet above runs.
- Resolver SDK: the same resolution as a library, plus
agentCardFromanderc8004RegistrationFrom. - API Reference: the public HTTP routes, including the agent card.