Skip to main content
Glama

DolphinScheduler MCP Server

by ocean-zhc
example_mcp.py923 B
"""Example MCP server using the latest FastMCP API.""" from fastmcp import FastMCP, Context # Create an MCP server mcp = FastMCP(title="Example MCP Server") # Define a tool using the decorator pattern @mcp.tool() def add(a: int, b: int) -> int: """Add two numbers together. Args: a: First number b: Second number Returns: The sum of a and b """ return a + b # Define an async tool @mcp.tool() async def fetch_data(url: str, ctx: Context) -> str: """Fetch data from a URL. Args: url: The URL to fetch data from ctx: The MCP context Returns: The fetched data """ # Report progress ctx.info(f"Fetching data from {url}") # In a real implementation, we would fetch data here return f"Data from {url}" if __name__ == "__main__": # Start the server mcp.run(host="0.0.0.0", port=8089)

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/ocean-zhc/dolphinscheduler-mcp'

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