FastMCP with Adam Azzam and Jeremiah Lowin

· Source: Software Engineering Daily · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Advanced, extended

Summary

FastMCP, an open-source project stewarded by Prefect, builds upon the Model Context Protocol (MCP) to provide Python developers with ergonomic abstractions for creating and deploying MCP servers and applications. MCP is a crucial standard in agentic AI, enabling LLMs to access external tools and data. Initially a weekend project by Prefect CEO Jeremiah Lowin, FastMCP gained rapid adoption and was integrated into the official MCP SDK. The project has evolved through versions, with FastMCP 3.0 introducing a more opinionated framework approach structured around three pillars: servers, clients, and apps. A significant recent development, "code mode" in FastMCP 3.1, allows LLM clients to submit and execute programs against MCP tools within a secure server-side sandbox, addressing limitations of serial tool calls and context window bloat. This innovation, leveraging projects like Pydantic's Monte, aims to enhance efficiency and flexibility for internal enterprise AI workflows.

Key takeaway

For AI Engineers building agentic applications, FastMCP 3.1's new "code mode" offers a critical advancement. By enabling LLMs to submit and execute programs against your MCP tools within a secure server-side sandbox, you can overcome context bloating and serial tool invocation. This allows for more complex, parallel operations and reduces token consumption, making your internal enterprise AI workflows significantly more efficient and robust. Consider integrating "code mode" to enhance agent capabilities and performance.

Key insights

FastMCP 3.1's "code mode" enables LLMs to execute programs against MCP tools in a secure server-side sandbox, boosting efficiency.

Principles

Method

FastMCP 3.1's "code mode" allows server authors to expose a search tool and an execute tool. Clients submit code, which is run in a secure sandbox (e.g., Pydantic's Monte) against backend tools.

In practice

Topics

Best for: CTO, VP of Engineering/Data, Director of AI/ML, AI Engineer, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Software Engineering Daily.