Skip to main content
Glama

MCP Agent Tracker

by Big0290
test_mcp_server.pyโ€ข2.59 kB
#!/usr/bin/env python3 """ Test script to verify MCP server can run locally """ import sys import os import signal import time # Add current directory to path sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) def test_mcp_server(): """Test that the MCP server can start and run""" print("๐Ÿงช Testing MCP Server Startup...") try: # Import the main module from main import mcp print(f"โœ… MCP server imported: {mcp}") print(f"๐Ÿ“ Server name: {mcp.name}") # Check available tools tools = mcp._tool_manager._tools print(f"๐Ÿ”ง Available tools: {len(tools)}") for tool_name in tools.keys(): print(f" ๐Ÿ“Œ {tool_name}") print("\n๐ŸŽ‰ MCP server is ready!") print("โœ… All tools are registered") print("โœ… Server can be imported") print("โœ… Ready for Cursor integration") return True except Exception as e: print(f"โŒ Error testing MCP server: {e}") import traceback traceback.print_exc() return False def test_mcp_tools(): """Test individual MCP tools""" print("\n๐Ÿ”ง Testing MCP Tools...") try: from main import get_system_status, test_conversation_tracking # Test system status print("๐Ÿงช Testing get_system_status...") status = get_system_status() print(f"โœ… Status: {status[:100]}...") # Test conversation tracking print("๐Ÿงช Testing test_conversation_tracking...") result = test_conversation_tracking("Test from local script") print(f"โœ… Result: {result}") return True except Exception as e: print(f"โŒ Error testing tools: {e}") return False if __name__ == "__main__": print("๐Ÿ” MCP Server Local Test") print("=" * 50) server_ok = test_mcp_server() tools_ok = test_mcp_tools() print("\n" + "=" * 50) if server_ok and tools_ok: print("๐ŸŽฏ ALL TESTS PASSED!") print("โœ… MCP server is ready for Cursor") print("โœ… All tools are working") print("\n๐Ÿ’ก Next steps:") print(" 1. Restart Cursor") print(" 2. Check MCP section for tools") print(" 3. Test with @get_system_status") else: print("โŒ SOME TESTS FAILED!") if not server_ok: print("โŒ MCP server test failed") if not tools_ok: print("โŒ Tools test failed") print("=" * 50)

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/Big0290/MCP'

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