Skip to content

Instantly share code, notes, and snippets.

@mrmaheshrajput
Created August 16, 2025 15:15
Show Gist options
  • Select an option

  • Save mrmaheshrajput/2817a13b1430fb47af0681085434d7f2 to your computer and use it in GitHub Desktop.

Select an option

Save mrmaheshrajput/2817a13b1430fb47af0681085434d7f2 to your computer and use it in GitHub Desktop.
import datetime
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("mcp-excel-server")
@mcp.tool()
def get_datetime() -> datetime.datetime:
"""Use this tool when the user wants to know today's date."""
return datetime.datetime.now(datetime.timezone.utc)
if __name__ == "__main__":
print("Starting the MCP Server")
mcp.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment