Skip to main content
Glama

Microsoft MCP

test_step_by_step.py•1.23 kB
#!/usr/bin/env python3 """Step by step client test""" import asyncio import json from fastmcp import Client async def main(): print("šŸš€ Starting MCP client...") try: print("šŸ“” Connecting to server...") async with Client("http://0.0.0.0:8001/mcp/") as client: print("āœ… Connected!") print("\nšŸ”§ Listing tools...") tools = await client.list_tools() print(f"āœ… Found {len(tools)} tools") print("\nšŸ‘„ Calling list_accounts...") accounts_result = await client.call_tool("list_accounts", {}) print(f"āœ… Got result: {accounts_result}") if accounts_result.content: accounts_text = accounts_result.content[0].text print(f"šŸ“„ Accounts data: {accounts_text}") accounts = json.loads(accounts_text) print(f"āœ… Parsed {len(accounts) if isinstance(accounts, list) else 'dict'} accounts") print("\nāœ… All tests passed!") except Exception as e: print(f"\nāŒ Error: {e}") import traceback traceback.print_exc() asyncio.run(main())

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/purva-kashyap/microsoft-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server