Add M7.2 MCP client support with McpStep, CLI commands, and stdio transport

This commit is contained in:
rob
2026-07-20 00:20:40 -03:00
parent 6908d8ee6f
commit dee48d8cea
8 changed files with 1279 additions and 3 deletions
+44
View File
@@ -0,0 +1,44 @@
"""Small real MCP stdio server used by the client integration tests."""
import os
import time
from mcp.server.fastmcp import FastMCP
server = FastMCP("CmdForge MCP test server")
@server.tool()
def echo(message: str) -> str:
"""Return a message unchanged."""
return message
@server.tool()
def add(a: int, b: int) -> dict[str, int]:
"""Add two integers."""
return {"sum": a + b}
@server.tool()
def read_env(name: str) -> str:
"""Return an environment value, or an empty string if absent."""
return os.environ.get(name, "")
@server.tool()
def current_directory() -> str:
"""Return the server process working directory."""
return os.getcwd()
@server.tool()
def wait(seconds: float) -> str:
"""Block for the requested duration."""
time.sleep(seconds)
return "done"
if __name__ == "__main__":
server.run(transport="stdio")