feat: Initial commit
This commit is contained in:
21
tests/fixtures/echo_server.py
vendored
Normal file
21
tests/fixtures/echo_server.py
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Simple MCP server used for testing: string tools."""
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
mcp = FastMCP("echo")
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def echo(message: str) -> str:
|
||||
"""Return the message unchanged."""
|
||||
return message
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def reverse(text: str) -> str:
|
||||
"""Return the text reversed."""
|
||||
return text[::-1]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
mcp.run("stdio")
|
||||
21
tests/fixtures/math_server.py
vendored
Normal file
21
tests/fixtures/math_server.py
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"""Simple MCP server used for testing: numeric tools."""
|
||||
|
||||
from mcp.server.fastmcp import FastMCP
|
||||
|
||||
mcp = FastMCP("math")
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def add(a: int, b: int) -> int:
|
||||
"""Return the sum of a and b."""
|
||||
return a + b
|
||||
|
||||
|
||||
@mcp.tool()
|
||||
def multiply(a: int, b: int) -> int:
|
||||
"""Return the product of a and b."""
|
||||
return a * b
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
mcp.run("stdio")
|
||||
16
tests/fixtures/test_claude.json
vendored
Normal file
16
tests/fixtures/test_claude.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"echo": {
|
||||
"command": "/home/matteo/Gitted/Thesis/python-mcp-api/.venv/bin/python",
|
||||
"args": [
|
||||
"/home/matteo/Gitted/Thesis/python-mcp-api/tests/fixtures/echo_server.py"
|
||||
]
|
||||
},
|
||||
"math": {
|
||||
"command": "/home/matteo/Gitted/Thesis/python-mcp-api/.venv/bin/python",
|
||||
"args": [
|
||||
"/home/matteo/Gitted/Thesis/python-mcp-api/tests/fixtures/math_server.py"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user