example use, live MCP

told chat i dont want to use the fake ahh server we have (FakeAdapter). switch over, boom, errors.
This commit is contained in:
lda
2026-05-09 01:01:05 +07:00 Verified
parent 4d8e1e29ee
commit 47b337a9c3
6 changed files with 141 additions and 10 deletions
+8 -1
View File
@@ -1,13 +1,20 @@
from __future__ import annotations
from typing import Annotated, TypedDict
from mcp.server.fastmcp import FastMCP
from pydantic import Field
server = FastMCP("echo-fixture")
class EchoToolResult(TypedDict):
echoed: str
@server.tool(title="Echo tool")
async def echo_tool(text: str) -> dict[str, str]:
async def echo_tool(
text: Annotated[str, Field(description="Text to echo")],
) -> EchoToolResult:
return {"echoed": text}