Some checks failed
Pre-commit / run (ubuntu-latest) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_en (ubuntu-latest, 3.10) (push) Has been cancelled
Deploy Sphinx documentation to Pages / build_zh (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (macos-15, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (ubuntu-latest, 3.12) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.10) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.11) (push) Has been cancelled
Python Unittest Coverage / test (windows-latest, 3.12) (push) Has been cancelled
17 lines
296 B
Python
17 lines
296 B
Python
# -*- coding: utf-8 -*-
|
|
"""An SSE MCP server with a simple multiply tool function."""
|
|
|
|
from mcp.server import FastMCP
|
|
|
|
|
|
mcp = FastMCP("Multiply", port=8002)
|
|
|
|
|
|
@mcp.tool()
|
|
def multiply(c: int, d: int) -> int:
|
|
"""Multiply two numbers."""
|
|
return c * d
|
|
|
|
|
|
mcp.run(transport="streamable-http")
|