Skip to main content
Glama

MCP Server with LangChain and AI Tools

by durgeshmca
weather_server.pyβ€’375 B
from mcp.server.fastmcp import FastMCP import random mcp=FastMCP("Weather") @mcp.tool() async def get_weather(location:str)->str: """ Get the weather for a given location.""" # here weather apis should be called return f"Weather in {location} is {random.choice(['sunny', 'rainy', 'cloudy'])}" if __name__ == "__main__": mcp.run(transport="streamable-http")

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/durgeshmca/MCPServerPOCDemo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server