Skip to content

Instantly share code, notes, and snippets.

@Kludex
Created April 14, 2025 15:47
Show Gist options
  • Save Kludex/96f9902ead69fdfabdf1762550fb7847 to your computer and use it in GitHub Desktop.
Save Kludex/96f9902ead69fdfabdf1762550fb7847 to your computer and use it in GitHub Desktop.
MCP Server with Logfire
from mcp.server import FastMCP
import logfire
import uvicorn
logfire.configure()
server = FastMCP("Summarizer")
app = server.sse_app()
logfire.instrument_starlette(app)
@server.tool()
async def summarize(content: str) -> str:
"""Summarizer"""
return "Nothing important..."
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8050)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment