Build Remote MCP Servers with FastMCP and Python
Anthropic just announced Claude Integrations aka Remote MCP Server support.
This is a big deal.
Even though MCP servers have been utltra-hyped, their adoption was limited by:
1. Only a few clients supported MCP, notably Claude Desktop and Cursor. MCP servers were not supported in the web version of Claude.
2. Claude Desktop only supported local MCP servers, and you sort of needed to be a developer to install and run those.
Now Claude web users can use remote MCP servers, which means you just need a URL to equip your LLM with new tools and capabilities.
Anthropic launched Claude Integrations to Max and Enterprise plans first, and will be rolling it out to Pro users soon.
It's super easy to build your own Remote MCP server using Python and FastMCP. The YouTube video above shows you how.
Here's the code from the video:
pip install fastmcp
# server.py
from fastmcp import FastMCP
import datetime
import pytz
import os
mcp = FastMCP(
name="Current Date and Time",
instructions="When you are asked for the current date or time, call current_datetime() and pass along an optional timezone parameter (defaults to NYC)."
)
@mcp.tool()
def current_datetime(timezone: str = "America/New_York") -> str:
"""
Returns the current date and time as a string.
If you are asked for the current date or time, call this function.
Args:
timezone: Timezone name (e.g., 'UTC', 'US/Pacific', 'Europe/London').
Defaults to 'America/New_York'.
Returns:
A formatted date and time string.
"""
try:
tz = pytz.timezone(timezone)
now = datetime.datetime.now(tz)
return now.strftime("%Y-%m-%d %H:%M:%S %Z")
except pytz.exceptions.UnknownTimeZoneError:
return f"Error: Unknown timezone '{timezone}'. Please use a valid timezone name."
if __name__ == "__main__":
import asyncio
port = int(os.environ.get("PORT", 8000))
asyncio.run(
mcp.run_sse_async(
host="0.0.0.0", # Changed from 127.0.0.1 to allow external connections
port=port,
log_level="debug"
)
)