We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JustineQinLao/MCPServer'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
server.py•644 B
from mcp.server.fastmcp import FastMCP
# Create server
mcp = FastMCP("My Windsurf MCP Server")
@mcp.tool()
def greet_user(name: str) -> str:
"""Greet a user by name"""
return f"Hello, {name}! Welcome from your MCP server."
@mcp.tool()
def add_numbers(a: int, b: int) -> int:
"""Add two numbers together"""
return a + b
@mcp.tool()
def list_files(directory: str = ".") -> str:
"""List files in a directory"""
import os
try:
files = os.listdir(directory)
return "\n".join(files)
except Exception as e:
return f"Error: {str(e)}"
# Run the server
if __name__ == "__main__":
mcp.run()