{"slug": "mcp-and-tool-discovery", "title": "MCP and tool discovery", "summary": "The Model Context Protocol (MCP), an open standard proposed by Anthropic in late 2024, enables websites to expose queryable tools directly to AI agents via JSON-RPC, replacing UI scraping with structured, typed calls. For structured content sites like documentation sets, knowledge bases, and specifications, an MCP server lets agents retrieve filtered data — such as \"list all required SEO topics\" — in a single call instead of crawling and parsing HTML. The protocol is gaining adoption across platforms including Claude and ChatGPT, with discoverability through server cards at `/.well-known/mcp/server-card.json` and HTTP Link headers, though it remains overkill for simple static sites.", "body_md": "# MCP and tool discovery\n\nThe Model Context Protocol is an emerging way for sites to expose queryable tools to agents over JSON-RPC. Relevant whenever your content has structure worth filtering — even for a static reference site like this one.\n\n## What it is\n\nThe Model Context Protocol (MCP) is an open protocol, originally proposed by Anthropic in late 2024, that defines how language-model clients talk to external tools and data sources. Instead of an agent scraping your UI, you expose an MCP server that declares a set of tools, resources, and prompts; the agent calls them directly.\n\nMCP is built on JSON-RPC over a few transports — stdio for local servers, HTTP plus Server-Sent Events for remote ones. A tool definition includes a name, a description, and a JSON Schema for inputs.\n\nThis is relevant when your site exposes actions a user might want an agent to take: search a catalogue, create a ticket, book an appointment, query an account. For static content sites and blogs, MCP often adds little — well-cached HTML and a feed are enough. The exception is structured content sites where the data is filterable: a documentation set, a spec, a knowledge base. There an MCP server lets an agent ask “list all required SEO topics” or “give me the canonical CSP page” in a single typed call, instead of crawling and parsing.\n\nThis site ships such a server as a worked example. See [mcp.specification.website](https://mcp.specification.website/) for the live endpoint, [ /.well-known/mcp/server-card.json](/.well-known/mcp/server-card.json) for the discovery document, and the\n\n[for a ~300-line Cloudflare Worker implementation. Every tool it exposes is annotated](https://github.com/jdevalk/specification.website/tree/main/mcp)\n\n`mcp/`\n\ndirectory of the source repo`readOnlyHint`\n\nand declares an `outputSchema`\n\n, so clients get typed results alongside the human-readable text.## Why it matters\n\n- Agents call your functionality through a defined contract instead of guessing from a UI. Behaviour is predictable and auditable.\n- One MCP server can be reused across Claude, ChatGPT (via connectors), and any other MCP-aware client. No per-vendor integration.\n- Authorisation is explicit. Tools declare what they do; the agent (and the user) consents before calling.\n- The same server is useful for your own internal automation, not just public agents.\n\nAdoption is real but uneven. Treat it as an emerging convention worth investing in if your product is API-shaped, and as overkill if it is not.\n\n## How to implement\n\n- Decide what you want agents to do. Read-only tools (\n`search_products`\n\n,`get_order_status`\n\n) are a safe first step; write tools (`create_ticket`\n\n,`update_address`\n\n) come with stronger auth requirements. - Build an MCP server. The reference SDKs cover TypeScript, Python, and others; see\n[modelcontextprotocol.io](https://modelcontextprotocol.io/). - Host it at a discoverable URL such as\n`/mcp`\n\nor a subdomain like`mcp.example.com`\n\n. Document the endpoint in your developer docs and link it from[/llms.txt](/spec/agent-readiness/llms-txt/). **Publish a server card.** Ship`/.well-known/mcp/server-card.json`\n\ndescribing the server’s name, version, transport, endpoint URL, capabilities, tools, and prompts. Add a`Link: </.well-known/mcp/server-card.json>; rel=\"mcp\"`\n\nheader on your main site so the card is discoverable without guessing the path — see[HTTP Link headers](/spec/agent-readiness/link-headers/)and.`/.well-known/api-catalog`\n\n- Use OAuth 2.1 (the MCP spec aligns with it) for any tool that touches user data. Never accept long-lived API keys in tool calls.\n- Keep tool descriptions short and precise. Agents pick which tool to call from the description. State what the tool does\n*not*cover and which sibling tool to use instead, so the agent disambiguates without a trial call. **Declare behaviour with annotations.** Each tool can carry hints —`readOnlyHint`\n\n,`idempotentHint`\n\n,`destructiveHint`\n\n,`openWorldHint`\n\n— that tell a client whether the tool has side effects, is safe to retry, or reaches beyond a closed corpus. A read-only search over bundled data should advertise`readOnlyHint: true`\n\nand`openWorldHint: false`\n\n. Clients and gateways read these to decide what to call without prompting the user.**Return structured output, not just prose.** Since the 2025-06-18 revision a tool can declare an`outputSchema`\n\nand return a matching`structuredContent`\n\nobject next to the human-readable text. A calling agent then consumes typed data instead of re-parsing Markdown. Document every field and version the output schema as carefully as the input one.- Version the schema. Renaming a tool or changing its input shape is a breaking change.\n\n## Common mistakes\n\n- Exposing every internal API as an MCP tool. Curate; agents reason better about a small, well-named surface.\n- Skipping rate limits and audit logs. An MCP endpoint that an agent can call repeatedly is an abuse vector.\n- Mixing read and write tools without clear naming. Make destructive actions obvious in the tool name.\n- Annotations that lie. Marking a write tool\n`readOnlyHint: true`\n\nis worse than omitting the hint — clients trust it and skip the confirmation a destructive call deserves. - Treating MCP as a replacement for documentation. It complements it; it does not replace it.\n\n## Verification\n\n- Connect your server with the MCP Inspector or a reference client and confirm tools list, call, and return as expected.\n- Review the OAuth flow end to end.\n- Watch logs after a public launch for unexpected call patterns.\n\n## Related topics\n\n## Sources & further reading\n\n-\n[Model Context Protocol](https://modelcontextprotocol.io/)— Anthropic / MCP project -\n[MCP specification](https://modelcontextprotocol.io/specification)— MCP project -\n[MCP server tools: annotations & structured content](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)— MCP project -\n[Is It Agent Ready?](https://isitagentready.com/)— Is It Agent Ready?", "url": "https://wpnews.pro/news/mcp-and-tool-discovery", "canonical_source": "https://specification.website/spec/agent-readiness/mcp-and-tool-discovery/", "published_at": "2026-06-04 08:30:00+00:00", "updated_at": "2026-06-04 07:30:59.971003+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "ai-tools", "ai-infrastructure", "ai-research"], "entities": ["Anthropic", "Model Context Protocol", "MCP", "JSON-RPC"], "alternates": {"html": "https://wpnews.pro/news/mcp-and-tool-discovery", "markdown": "https://wpnews.pro/news/mcp-and-tool-discovery.md", "text": "https://wpnews.pro/news/mcp-and-tool-discovery.txt", "jsonld": "https://wpnews.pro/news/mcp-and-tool-discovery.jsonld"}}