We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jojodiaz/mcp-test'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
server.py•672 B
from mcp.server.fastmcp import FastMCP
from mcp import Tool
# Initialize FastMCP server
mcp = FastMCP()
@mcp.tool()
async def test_tool() -> str:
'''
This is a test tool that enables the user to see that they have correctly implemented a their MCP server.
It takes no arguments, when invoked this function will return a string that you should output to confirm
to them that you have correctly received the request.
'''
return "Hi there! MCP Server working >:)"
@mcp.tool()
async def add(a: int, b: int) -> int:
return a + b
if __name__ == "__main__":
print("Starting MCP server...")
mcp.run(transport="streamable-http")