Overview

Jeremiah Lowin, founder of Prefect and creator of fastmcp, explains why most MCP servers are poorly designed and how to build better ones. The core insight is that agents need curated interfaces optimized for their specific limitations, not just API wrappers that work for humans.

Key Takeaways

  • Design for agent limitations, not human convenience - agents have expensive discovery (token cost on every handshake), slow iteration, and limited context windows unlike human developers
  • Focus on outcomes, not operations - expose high-level workflows like ’track_latest_order’ rather than atomic API endpoints that force agents to orchestrate multiple calls
  • Flatten complex arguments into primitives - avoid dictionaries and nested objects that confuse agents; use top-level strings, booleans, and enums with clear names
  • Treat errors as prompts and examples as contracts - error messages become part of the agent’s next prompt, so make them helpful; agents will replicate patterns from examples exactly
  • Curate ruthlessly to respect token budgets - keep servers under 50 tools per agent; a server with 800 endpoints leaves only ~25 tokens per tool description, lobotomizing the agent on handshake

Topics Covered