Skip to main content
Glama
simple_server.py462 B
#!/usr/bin/env python3 """ 简单的FastMCP Server测试 """ import fastmcp # 创建 FastMCP 实例 mcp = fastmcp.FastMCP(name="Test Server") # 定义一个简单的工具示例 @mcp.tool def hello_world(name: str = "World") -> str: """A simple tool that says hello.""" return f"Hello, {name}!" if __name__ == "__main__": # 使用streamable-http传输在本地8080端口运行 mcp.run(transport="streamable-http", host="127.0.0.1", port=8080)

Latest Blog Posts

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/jasper-zsh/espidf-mcp'

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