DEV Community

gentic news
gentic news

Posted on • Originally published at gentic.news

Stop Writing SDK Docs for AI Agents: Build MCP Servers Instead

MCP servers replace SDKs for AI agents. Claude Code users should expose APIs as MCP servers so agents discover capabilities autonomously, not via docs. First sentence: BridgeXAPI argues MCP servers transform messaging APIs into discoverable execution infrastructure for Claude Code agents.

Key Takeaways

  • MCP servers replace SDKs for AI agents.
  • Claude Code users should expose APIs as MCP servers so agents discover capabilities autonomously, not via docs.
  • First sentence: BridgeXAPI argues MCP servers transform messaging APIs into discoverable execution infrastructure for Claude Code agents.

The Core Insight: SDKs vs. MCP Servers

MCP Auth SDKs & APIs: Secure Your Remote MCP Servers

Here's a truth that changes how you build for Claude Code: AI agents don't browse documentation. They discover infrastructure.

When you build a traditional SDK, you're optimizing for a human developer who reads READMEs, scans method signatures, and instantiates clients. That's fine — for people.

But when an AI agent like Claude Code encounters your API, it can't skim your docs. It needs to know, programmatically and at runtime: What capabilities do you expose? What constraints apply? How do I chain calls safely?

This is exactly what the Model Context Protocol (MCP) solves. As the article notes, instead of calling a single send_sms() endpoint, autonomous systems "first inspect capabilities, reason about execution strategies, validate constraints and only then execute."

What This Means for Your Claude Code Workflows

If you're using Claude Code to build integrations with external services, you've probably hit this wall: Claude hallucinates endpoint paths, guesses parameter formats, or wastes tokens trying to reverse-engineer your API from a few examples in your CLAUDE.md.

An MCP server fixes this. Here's the concrete difference:

SDK MCP Server
Requires human to read docs Self-describing to agents
Fixed function signatures Discoverable capabilities
One execution path Agents reason about strategy
Manual error handling Constraint validation built-in

For Claude Code users, this means: if the service you're integrating has an MCP server, you can just claude mcp add <server> and Claude will automatically understand how to use it. No prompt engineering, no examples in CLAUDE.md.

Try It Now: What to Build First

Build Agents using Model Context Protocol on Azure | Microsoft Learn

If you're an API provider (or building internal microservices), stop investing in SDK documentation for AI consumption. Build an MCP server instead.

Here's a minimal MCP server for a messaging API — the example from the article:

from mcp.server import Server, stdio_server
from mcp.types import Tool, TextContent

server = Server("messaging-api")

@server.list_tools()
async def list_tools() -> list[Tool]:
    return [
        Tool(
            name="send_sms",
            description="Send an SMS message to a verified phone number",
            inputSchema={
                "type": "object",
                "properties": {
                    "to": {"type": "string", "description": "E.164 formatted recipient"},
                    "body": {"type": "string", "maxLength": 160},
                    "priority": {"type": "string", "enum": ["standard", "high"]}
                },
                "required": ["to", "body"]
            }
        )
    ]

@server.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
    if name == "send_sms":
        # Agent has already validated constraints via schema
        result = await send_sms_api(arguments["to"], arguments["body"])
        return [TextContent(type="text", text=f"Sent: {result['id']}")]

if __name__ == "__main__":
    stdio_server.run(server)
Enter fullscreen mode Exit fullscreen mode

Notice: the agent inspects list_tools, reads the schema, validates maxLength and enum constraints before executing. No documentation needed.

The Bigger Picture: Discoverable Execution Infrastructure

The article makes a powerful point: "As AI-native software evolves, messaging infrastructure becomes more than a collection of REST endpoints — it becomes discoverable execution infrastructure."

This applies beyond messaging. Any API your Claude Code workflows touch — databases, cloud services, payment gateways, notification systems — should expose an MCP interface.

For Claude Code users, this is already possible. Claude Code natively supports MCP servers. You can point it at any MCP server and it will automatically discover and use its tools. The shift from "write prompts that describe APIs" to "point Claude at an MCP server" is the single biggest productivity gain available today.

What You Should Do Differently

  1. If you build APIs: Ship an MCP server alongside (or instead of) your SDK. Your SDK is for humans; your MCP server is for agents.

  2. If you consume APIs: Before writing a CLAUDE.md section explaining how to call an API, check if it has an MCP server. If not, consider building a thin MCP wrapper yourself — it's often less code than the prompt engineering you'd otherwise do.

  3. If you're on a team: Make MCP server availability a checkbox in your API design review. Every new endpoint should ask: "Can an AI agent discover and use this autonomously?"

The SDK era isn't over. But for agentic workflows in Claude Code, MCP servers are the interface that matters.


Source: dev.to

[Updated 15 Jun via devto_mcp]

A mid-level frontend engineer built a Jira MCP server in TypeScript, using the @modelcontextprotocol/sdk with Zod for schema validation. The server exposes four tools—search, get, create, and update Jira issues—and runs via StdioServerTransport (stdin/stdout, no HTTP). The engineer noted Jira's deprecated search endpoint now requires POST to /rest/api/3/search/jql, and that MCP returns must be serialized to text. The project aims to bridge frontend engineering with AI tooling [per dev.to].


Originally published on gentic.news

Top comments (0)