fastmcp-rs 0.2.0

Rust prototype for the FastMCP server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import asyncio
import httpx

async def main():
    base_url = "http://127.0.0.1:65114"
    async with httpx.AsyncClient() as client:
        resp = await client.post(
            f"{base_url}/messages",
            json={
                "command": "call_tool",
                "name": "fetch_url",
                "arguments": {"url": "https://example.com"},
            },
        )
        resp.raise_for_status()
        print("Tool response:", resp.json())

asyncio.run(main())