Type something to search...
Is Anthropic’s Model Context Protocol (MCP) the Interoperability Standard We’ve Been Waiting For?

Is Anthropic’s Model Context Protocol (MCP) the Interoperability Standard We’ve Been Waiting For?

Hats off to the Anthropic team! They’ve been rolling out feature after feature and capturing the attention of the developer community. First, it was Artifacts, then Computer Use. And now, they’ve unveiled yet another groundbreaking addition: the Model Context Protocol (MCP).

The Model Context Protocol (MCP) introduces a standardized approach for enabling interoperability between AI applications, data sources, and other systems.

The architecture of this standard is described in details here. The standard implementation comes with Python and TypeScript SDKs. The github repo for the Python SDK is here.

The good news is you can try it out fairly quickly and easily using the Claude Desktop. You will need to download the latest version. Yes, it works on the free version and Windows is supported.

For a quick start, you can try the sqlite demo. There are already a number of reference implementations and community-contributed servers available, check them out here.

You can easily roll your own MCP Server and add it to the Claude Desktop configuration file. The python project can be bootstrapped using the helpful create-mcp-server utility.

Below is the step by step process which I followed to implement a minimal MCP server:

Install Claude Desktop and modify the configuration file:

Open the settings from the Claude Desktop (upgrade it to the recent version if you had it installed already) menu and click on developer. Once you click on Edit Config, it will bring up the explorer to the installed folder with the config file highlighted.

Edit the config file:

Add your MCP server spec to the file. If you had tried the sqlite quick start, add your server spec below that. You have to install uv as described here.

{
  "mcpServers": {
    "heartbeat": {
      "command": "uv",
      "args": [
        "--directory",
        "<server-path>",
        "run",
        "heartbeat.py"
      ]
    }
  }
}

The MCP Server code:

We will implement a simple ‘heartbeat’ tool which just returns a reply to the client. We will use the stdio transport.

Expose the list of tools:

@app.list_tools()
async def list_tools() -> list[Tool]:
    """List available tools."""
    return [
        Tool(
            name="get_heartbeat",
            description="Get a heartbeat",
            inputSchema={
                "type": "object",
                "properties": {
                    "user": {
                        "type": "string",
                        "description": "user name"
                    },
                },
                "required": ["user"]
            }
        )
    ]

Implement your tool:

@app.call_tool()
async def call_tool(name: str, arguments: Any) -> Sequence[TextContent | ImageContent | EmbeddedResource]:
    """Handle tool calls for heartbeat."""
    if name != "get_heartbeat":
        raise ValueError(f"Unknown tool: {name}")

    if not isinstance(arguments, dict) or "user" not in arguments:
        raise ValueError("Invalid arguments")

    reply = {
        "text": f"Hello {arguments['user']}, my heart beats for you!"
    }

    return [
        TextContent(
            type="text",
            text=json.dumps(reply, indent=2)
        )
    ]

Add the stdio server:

## Create a server instance
app = Server("heartbeat-server")

async def main():
    # Import here to avoid issues with event loops
    from mcp.server.stdio import stdio_server

    async with stdio_server() as (read_stream, write_stream):
        await app.run(
            read_stream,
            write_stream,
            app.create_initialization_options()
        )

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

Testing the MCP Server:

If configured properly, you will be able to see the tool in the Settings -> Developer section. You can actually ask Claude about the tools:

Claude Desktop will start the server processes which will look like command windows. This is normal and expected.

Test the heartbeat using a simple prompt.

Ironically, Claude the chatbot is not yet aware of this standard, so it would not be able to generate the code. You could however put the standards documentation in the context and see what happens.

The MCP protocol seems very much like an enhanced version of LLM function calling. However, this architecture will make it model agnostic. The abstraction will help with security where you need to expose your legacy or proprietary data to an LLM.

It will be interesting to see how the standard evolves and if other AI players get involved.

Code for the server.

Related Posts

10 Creative Ways to Use ChatGPT Search The Web Feature

10 Creative Ways to Use ChatGPT Search The Web Feature

For example, prompts and outputs Did you know you can use the “search the web” feature of ChatGPT for many tasks other than your basic web search? For those who don't know, ChatGPT’s new

Read More
📚 10 Must-Learn Skills to Stay Ahead in AI and Tech 🚀

📚 10 Must-Learn Skills to Stay Ahead in AI and Tech 🚀

In an industry as dynamic as AI and tech, staying ahead means constantly upgrading your skills. Whether you’re aiming to dive deep into AI model performance, master data analysis, or transform trad

Read More
10 Powerful Perplexity AI Prompts to Automate Your Marketing Tasks

10 Powerful Perplexity AI Prompts to Automate Your Marketing Tasks

In today’s fast-paced digital world, marketers are always looking for smarter ways to streamline their efforts. Imagine having a personal assistant who can create audience profiles, suggest mar

Read More
10+ Top ChatGPT Prompts for UI/UX Designers

10+ Top ChatGPT Prompts for UI/UX Designers

AI technologies, such as machine learning, natural language processing, and data analytics, are redefining traditional design methodologies. From automating repetitive tasks to enabling personal

Read More
100 AI Tools to Finish Months of Work in Minutes

100 AI Tools to Finish Months of Work in Minutes

The rapid advancements in artificial intelligence (AI) have transformed how businesses operate, allowing people to complete tasks that once took weeks or months in mere minutes. From content creat

Read More
17 Mindblowing GitHub Repositories You Never Knew Existed

17 Mindblowing GitHub Repositories You Never Knew Existed

Github Hidden Gems!! Repositories To Bookmark Right Away Learning to code is relatively easy, but mastering the art of writing better code is much tougher. GitHub serves as a treasur

Read More