Model Context Protocol example published
Composio published a hands‑on guide showing how to integrate Bonsai with Mastra AI using the Model Context Protocol (MCP), including Python and TypeScript examples for wiring models to tools. The guide is positioned as practical glue‑code work that helps engineers connect models to surrounding systems. (composio.dev)
The Model Context Protocol is a common way for artificial intelligence apps to reach outside the chat box, and Composio has now published a worked example that connects Bonsai to Mastra AI with that protocol. (composio.dev) (modelcontextprotocol.io) In plain terms, the protocol acts like a standard plug shape: servers expose tools, resources, and prompts, and clients discover what is available during setup. The specification describes that exchange as capability negotiation over a JavaScript Object Notation Remote Procedure Call connection. (modelcontextprotocol.io 1) (modelcontextprotocol.io 2) Mastra documents the same idea as a “universal plugin system” for agents, with support for connecting to external Model Context Protocol servers and for authoring servers of its own. Its tooling docs say agents can load tools from remote Model Context Protocol servers to call application programming interfaces, databases, and custom functions. (mastra.ai 1) (mastra.ai 2) Composio’s guide is narrower and more practical: it walks developers through wiring Bonsai into Mastra AI through the Composio tool router, with code samples in both Python and TypeScript. The page says the result is a working Bonsai agent inside Mastra AI rather than a protocol description in the abstract. (composio.dev) That kind of example fills a gap in the current artificial intelligence tooling market, where many teams understand large language models but still need repeatable patterns for connecting them to business software. The Model Context Protocol architecture is explicitly designed around small, focused servers that can be combined by a host application, which is the kind of “glue code” problem these tutorials target. (modelcontextprotocol.io) (mastra.ai) Composio is building out that pattern across multiple frameworks, not just Mastra AI. Its Bonsai pages also list parallel integration guides for LangChain, the OpenAI Agents Software Development Kit, Google Agent Development Kit, and Vercel Artificial Intelligence Software Development Kit version 6. (composio.dev 1) (composio.dev 2) (composio.dev 3) Mastra has been leaning into the same ecosystem from the other side. In March 2025, Mastra published its own Model Context Protocol documentation server so coding tools and assistants could query Mastra’s docs directly through the protocol. (mastra.ai) (mastra.ai) The protocol itself has kept expanding while trying to stay simple. Current specification pages describe core pieces for tools, resources, prompts, and a client feature called sampling, which lets servers ask clients to run model generations without holding model keys themselves. (modelcontextprotocol.io) (modelcontextprotocol.io) (modelcontextprotocol.io) So the news here is less a new model than a new connector. Composio’s Mastra AI example turns the Model Context Protocol from an architecture diagram into copyable code for engineers who need a model to actually do something in Bonsai. (composio.dev) (modelcontextprotocol.io)