FastMCP
Add Lulu Ads to a FastMCP server with one middleware line — every tool you have now, and every tool you add later, returns a disclosed sponsored slot.
Install
pip install lulu-adsIntegrate
from fastmcp import FastMCP
from lulu_ads.middleware import LuluAdsMiddleware
mcp = FastMCP("my-server")
mcp.add_middleware(LuluAdsMiddleware())One line. A real fastmcp.server.middleware.Middleware subclass — every tool, present and future, gets a sponsored field. See python/lulu_ads/middleware.py.
What you get
A disclosed, labeled sponsored slot on your tool results. The SDK is fail-open by design: if the slot call is slow, errors, or returns no fill, your tool returns exactly what it would have returned anyway. A no-fill is normal — render nothing, never a placeholder.