🔧 AI Nachrichten Neil Patel: Reddit Is Deleting 25,000 Posts a Day #shorts(27.08.2026 um 20:05 Uhr)
🔧 AI Nachrichten OpenAI: Build agent-ready sites with WebMCP(25.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten OpenAI: How to Manage Your Workspace With ChatGPT Work(25.08.2026 um 22:17 Uhr)
🔧 AI Nachrichten OpenAI: How to Build a Personalized Meal Planner with ChatGPT Work(27.08.2026 um 18:16 Uhr)
🔧 AI Nachrichten OpenAI: Delivering more meals to more moms with ChatGPT(27.08.2026 um 23:30 Uhr)
🔧 AI Nachrichten OpenAI: Getting Started with ChatGPT Work(28.08.2026 um 22:51 Uhr)
🔧 AI Nachrichten OpenAI: Build a Shareable Site(28.08.2026 um 22:51 Uhr)
🔧 AI Nachrichten OpenAI: Plugins & Skills(28.08.2026 um 22:51 Uhr)
🔧 AI Nachrichten OpenAI: Scheduled Tasks(28.08.2026 um 22:51 Uhr)
🔧 AI Nachrichten OpenAI: Use Your Computer and Browser(28.08.2026 um 22:51 Uhr)
🔧 AI Nachrichten Neil Patel: Reddit Is Deleting 25,000 Posts a Day #shorts(27.08.2026 um 20:05 Uhr)
🔧 AI Nachrichten OpenAI: Build agent-ready sites with WebMCP(25.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten OpenAI: How to Manage Your Workspace With ChatGPT Work(25.08.2026 um 22:17 Uhr)
🔧 AI Nachrichten OpenAI: How to Build a Personalized Meal Planner with ChatGPT Work(27.08.2026 um 18:16 Uhr)
🔧 AI Nachrichten OpenAI: Delivering more meals to more moms with ChatGPT(27.08.2026 um 23:30 Uhr)
🔧 AI Nachrichten OpenAI: Getting Started with ChatGPT Work(28.08.2026 um 22:51 Uhr)
🔧 AI Nachrichten OpenAI: Build a Shareable Site(28.08.2026 um 22:51 Uhr)
🔧 AI Nachrichten OpenAI: Plugins & Skills(28.08.2026 um 22:51 Uhr)
🔧 AI Nachrichten OpenAI: Scheduled Tasks(28.08.2026 um 22:51 Uhr)
🔧 AI Nachrichten OpenAI: Use Your Computer and Browser(28.08.2026 um 22:51 Uhr)

26 🕛 kürzlich 7 Min Lesezeit CVE-RADAR
0

FastMCP: Build Production-Ready MCP Servers in Python with Minimal Boilerplate

↗ Quelle (dev.to)
🗣️ Stimme:
📑 Inhaltsübersicht

Hello, I'm Shrijith Venkatramana. I'm building git-lrc, an AI code reviewer that runs on every commit. (configurable). You now have a live MCP endpoint with automatic schema generation from type hints and docstrings.





Exploring Your Server: Tools, Resources, and Prompts



FastMCP supports three core primitives.



Tools — Executable functions the LLM can call.



Resources — Readable data (static or dynamic) the LLM can fetch.



Prompts — Reusable prompt templates with parameters.



Add these to the same file:



CODE
from typing import List, Dict
import datetime

# Dynamic resource example
@mcp.resource("resource://time/now")
def current_time() -> str:
"""Return current UTC time as ISO string."""
return datetime.datetime.now(datetime.timezone.utc).isoformat()

# List resource
@mcp.resource("resource://users")
def list_users() -> List[Dict]:
"""Return a list of sample users. In production, query your DB here."""
return [
{"id": 1, "name": "Alice", "role": "engineer"},
{"id": 2, "name": "Bob", "role": "designer"}
]

# Prompt template
@mcp.prompt
def research_topic(topic: str, depth: str = "medium") -> str:
"""Generate a structured research prompt."""
return f"""
Research
{topic} at {depth} depth.
1. Use available tools to gather latest information.
2. Summarize key findings.
3. List open questions.
"""





These are automatically discoverable. Resources are great for live data (JIRA tickets, GitHub issues, database views) without forcing the LLM to call a tool every time.





Connecting Clients and Testing Locally



FastMCP includes a rich client library. Create client.py:



CODE
import asyncio
from fastmcp import Client

async def main():
async with Client("http://localhost:8000") as client: # Adjust URL/port
# List capabilities
tools = await client.list_tools()
print("Available tools:", [t.name for t in tools])

# Call a tool
result = await client.call_tool("add", {"a": 15, "b": 27})
print("15 + 27 =", result)

# Read a resource
time_data = await client.read_resource("resource://time/now")
print("Current time:", time_data)

asyncio.run(main())





For local development with interactive UIs, use the built-in dev server (more on that below).





Building Interactive Apps Inside the Conversation



One of FastMCP’s most powerful features is Apps — tools that return rich, interactive UIs rendered directly in the host’s conversation.



Mark a tool with app=True and return Prefab components (or custom HTML).



Example dashboard.py:



CODE
from fastmcp import FastMCP
from prefab import Column, Header, Chart, DataTable, Button, CallTool # Prefab components

mcp = FastMCP("sales-demo")

def fetch_sales_data(region: str):
# Simulate or query real data
return [
{"month": "Jan", "revenue": 12000},
{"month": "Feb", "revenue": 15000},
# ...
]

@mcp.tool(app=True)
def sales_dashboard(region: str = "Global"):
"""Interactive sales dashboard for the selected region."""
data = fetch_sales_data(region)

return Column([
Header(f"Sales Dashboard - {region}"),
Chart(data, type="bar", title="Monthly Revenue"),
DataTable(data, searchable=True),
Button(
"Export CSV",
on_click=CallTool("export_sales", {"region": region})
)
])

# Backend tool used by the UI (hidden from LLM by default)
@mcp.tool
def export_sales(region: str):
# Generate and return file or link
return {"status": "success", "message": f"CSV for {region} ready"}





Run with fastmcp dev apps dashboard.py to preview locally. The dev UI gives you a picker, auto-generated forms, live rendering, and an MCP inspector showing all traffic. Changes hot-reload.





Advanced Patterns and Production Considerations



Server Composition & Namespacing



CODE
from fastmcp import FastMCP, Provider

main_mcp = FastMCP("main")

# Mount another server under a prefix
github_provider = ... # or another FastMCP instance
main_mcp.mount(github_provider, prefix="github")





Authentication & Security



FastMCP supports multiple auth methods. You keep credentials server-side; the LLM only sees tool results. This is a major advantage over exposing raw API keys or full shell access.



Deployment




  • Run locally or on any VPS with mcp.run().

  • For production, Prefect Horizon offers managed hosting, GitHub-based deploys, branch previews, SSO, RBAC, audit logs, etc.

  • Containerize easily with Docker for self-hosting.



Debugging Tips




  • Use fastmcp dev apps for UI tools.

  • Append .md to any docs URL on gofastmcp.com for markdown.

  • The server at https://gofastmcp.com/mcp lets you query the docs via MCP itself.





Common Real-World Use Cases





  • Internal Tools: Expose company DB queries, ticket systems, or monitoring data safely.


  • Personal Agents: Connect to your calendar, email summaries, or note-taking app.


  • Data Analysis: Dynamic resources for CSVs, live API feeds, or vector search results.


  • Workflow Automation: Tools that trigger Prefect flows or other orchestration.


  • E-commerce / CRM Demos: As seen in community examples with order management and dashboards.





Next Steps and Resources




  1. Read the official quickstart and tutorials at



    *AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.



    git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.*



    Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.







    GitHub logo



    Free, Micro AI Code Reviews That Run on Commit







    | | | | | |







     




       

    Vollständiger Original-Bericht
    Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
    ↗ Original-Artikel auf dev.to lesen
    Wie bewertest du diesen Beitrag?
    1 Klick Feedback
    Teilen mit Netzwerk & Team:

    Community-Analysen & Experten-Meinungen 0

    Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
    Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
    Community Pulse: Relevanz-Einschätzung
    1 Klick Experten-Votum
    🔴 Akute Relevanz 46%
    🟡 In Evaluierung 23%
    🟢 Keine Auswirkung 14%
    Spannende Innovation 17%
    Verwandte Story-Cluster & Quellen (Vektor-KI)
    Port 8095 Engine
    3 Quellen
    How to Manage Your Workspace With ChatGPT Work
    2 Quellen
    Build agent-ready sites with WebMCP
    1 Quelle
    Reddit Is Deleting 25,000 Posts a Day #shorts
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten FastMCP: Build Production-Ready MCP Servers in Python with Minimal Boilerplate

Thematisch verwandte Begriffe: FastMCP, Build, ProductionReady, Servers · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...