We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faa691d commit 329a617Copy full SHA for 329a617
client/hello-client.py
@@ -0,0 +1,15 @@
1
+import os, asyncio
2
+from fastmcp import Client
3
+
4
+MCP_SERVER_URL = os.getenv("MCP_SERVER_URL", "https://your-mcp-server.com/mcp")
5
6
+async def main():
7
+ async with Client(MCP_SERVER_URL, auth="oauth") as client:
8
+ print("Authenticated successfully!")
9
10
+ # Arguments are passed as a dictionary for the 'roll_dice' tool
11
+ result = await client.call_tool("roll_dice", {"n_dice": 3})
12
+ print(f"Rolled dice with results: {result.data}")
13
14
+if __name__ == "__main__":
15
+ asyncio.run(main())
0 commit comments