Skip to main content
Glama

WineDbg MCP Server

by maci0
test_client.py2.33 kB
import httpx import json import os import time def main(): base_url = "http://127.0.0.1:8080" test_app_path = os.path.join(os.path.dirname(__file__), 'test_app.exe') if not os.path.exists(test_app_path): print(f"Test application not found at {test_app_path}") print("Please compile it first.") return with httpx.Client() as client: # Wait for the server to start print("Waiting for server to start...") while True: try: response = client.get(f"{base_url}/tools") if response.status_code == 200: print("Server started") break except httpx.ConnectError: time.sleep(0.1) # 1. Get the list of tools print("Getting tool list...") print(f"Server response: {response.status_code}") print(response.json()) # 2. Set the debug channels print("\nSetting debug channels...") response = client.post( f"{base_url}/set_debug_channel", json={"channels": "+relay,-heap"} ) print(f"Server response: {response.status_code}") print(response.text) # 3. Get the debug channels print("\nGetting debug channels...") response = client.post(f"{base_url}/get_debug_channels") print(f"Server response: {response.status_code}") print(response.text) # 4. Run the test application print("\nStarting winedbg with the test application...") response = client.post( f"{base_url}/run", json={"executable": test_app_path} ) print(f"Server response: {response.status_code}") if response.status_code != 200: print(f"Error: {response.text}") else: print(response.text) # 5. Get process info print("\nGetting process info...") response = client.post(f"{base_url}/info_proc") print(f"Server response: {response.status_code}") print(response.text) # 6. Quit winedbg print("\nQuitting winedbg...") response = client.post(f"{base_url}/quit") print(f"Server response: {response.status_code}") print(response.text) if __name__ == '__main__': main()

Latest Blog Posts

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/maci0/mcp-winedbg'

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