Product Updates
MCP
Model Context Protocol: TypeScript SDKs for the Agentic AI ecosystem

Georges Haidar
February 18, 2025 - 4 min read
It’s no longer enough for businesses to make their services available to developers. A great development experience also hinges on the ability for AI to access and integrate with available APIs. That’s why starting today, every TypeScript SDK generated by Speakeasy now bundles a runnable Model Context Protocol (MCP)
What is MCP?
Model Context Protocol
For those familiar, the language server protocol that Microsoft released with Visual Studio Code had such a profound impact on how developers write code that it’s been adopted in many other popular editors. Now, MCP is positioned to do the same for the agentic AI ecosystem.
A type-safe MCP server in every SDK
The generated MCP server acts as a thin wrapper around the existing TypeScript SDK, orchestrating API calls and formatting the results on behalf of the AI agent. The TypeScript SDK’s generated Zod schemas are passed down to the MCP server to give the agent an accurate picture of the request format.
For each method in the SDK, the MCP server will have a generated tool. The tool represents a discrete action that the AI agent can take. For example, the bluesky-ts
SDK has a getFeed
method that enables agents to fetch a user’s feed from Bluesky. The MCP server will generate a getFeed
tool that looks like this:
Customizing tools with OpenAPI extensions
We’ve added an x-speakeasy-mcp
OpenAPI extension that will let you annotate your operations with custom tool names, descriptions and scopes. Being able to customize a tool’s description in particular is going to be essential to provide an LLM with the right context on what a tool does and when to call it.
Scopes
Scopes are a small concept we’re introducing that allows you to tag the generated tools and in turn allow users to control which of them are initialized when they start an MCP server. For example, it’s possible to tag the “read” and “write” operations in your OpenAPI document like so:
The server will now expose the --scope
CLI flag:
And it can be launched like so:
Note the
--scope read
argument above
Now only the tools that represent read operations will be running. This adds a layer of safety if you want to prevent an LLM from accidentally modifying or deleting data while exploring.
Still an SDK at heart
While the MCP server and CLI are going to be the common entrypoint for many users, we’re still focused on shipping best-in-class TypeScript SDKs. Every tool we generate is a self-contained module that developers can import and compose into their own MCP servers or integrate into other frameworks. Here’s a short example of using the resolve-handle
tool from our Bluesky SDK and merge the result with data from your own project:
Get started with MCP
If you are an existing Speakeasy customer generating TypeScript, you will already have a pull request ready to review that merge that adds MCP support to your SDK (and of course a way to opt out). For those that are new to Speakeasy, follow the SDK generation getting started guide, and check out the docs page that talks about enabling this feature and customizing your tools.
What’s next?
The MCP ecosystem is nascent and we plan to do our part in growing it. The next big step is the planned support for remote servers. Despite not being released into the protocol yet, we’re already seeing momentum from companies like Cloudflare
There’s no doubt that remote MCP servers will be a major improvement to the developer experience that will help to broaden their appeal to users. We’re watching the project closely and will be adding support in the coming weeks.
Stay tuned!