Skip to main content
Glama

Radicle + GitHub MCP Server

by fovi-llc
test_both_servers.pyโ€ข4.15 kB
#!/usr/bin/env python3 """ Test script to verify both Radicle and GitHub MCP servers are working. """ import asyncio import subprocess import sys import os from pathlib import Path # Add the src directory to the path for Radicle MCP sys.path.insert(0, str(Path(__file__).parent / "src")) from radicle_mcp.server import rad_help, rad_id async def test_radicle_mcp(): """Test the Radicle MCP server.""" print("๐Ÿงช Testing Radicle MCP Server...") try: # Test help command help_result = await rad_help() if "Radicle command line interface" in help_result: print("โœ… Radicle MCP Server: WORKING") return True else: print("โŒ Radicle MCP Server: Help command failed") return False except Exception as e: print(f"โŒ Radicle MCP Server: Error - {e}") return False def test_github_mcp(): """Test the GitHub MCP server.""" print("๐Ÿงช Testing GitHub MCP Server...") try: # Try to start the GitHub MCP server briefly result = subprocess.run( ["timeout", "2", "/home/vscode/.deno/bin/github-mcp"], capture_output=True, text=True, timeout=3 ) # The server should start and run (timeout is expected) if "GitHub MCP Server running on stdio" in result.stderr or result.returncode == 124: print("โœ… GitHub MCP Server: WORKING") return True else: print(f"โŒ GitHub MCP Server: Unexpected output - {result.stderr}") return False except subprocess.TimeoutExpired: print("โœ… GitHub MCP Server: WORKING (started successfully)") return True except FileNotFoundError: print("โŒ GitHub MCP Server: Not found - please install with Deno") return False except Exception as e: print(f"โŒ GitHub MCP Server: Error - {e}") return False def check_prerequisites(): """Check if all prerequisites are met.""" print("๐Ÿ” Checking Prerequisites...") issues = [] # Check if Deno is installed try: subprocess.run(["deno", "--version"], capture_output=True, check=True) print("โœ… Deno: Installed") except (subprocess.CalledProcessError, FileNotFoundError): issues.append("โŒ Deno: Not installed or not in PATH") # Check if rad is available try: subprocess.run(["rad", "--version"], capture_output=True, check=True) print("โœ… Radicle CLI: Installed") except (subprocess.CalledProcessError, FileNotFoundError): issues.append("โŒ Radicle CLI: Not installed or not in PATH") # Check if GitHub token is set (optional but recommended) if os.getenv("GITHUB_PERSONAL_ACCESS_TOKEN"): print("โœ… GitHub Token: Set") else: issues.append("โš ๏ธ GitHub Token: Not set (GitHub MCP will have limited functionality)") return issues async def main(): """Main test function.""" print("๐Ÿš€ Testing Radicle + GitHub MCP Setup") print("=" * 50) # Check prerequisites issues = check_prerequisites() if issues: print("\nโš ๏ธ Issues found:") for issue in issues: print(f" {issue}") print() # Test both servers radicle_ok = await test_radicle_mcp() github_ok = test_github_mcp() print("\n" + "=" * 50) print("๐Ÿ“Š TEST RESULTS:") print(f"Radicle MCP Server: {'โœ… PASS' if radicle_ok else 'โŒ FAIL'}") print(f"GitHub MCP Server: {'โœ… PASS' if github_ok else 'โŒ FAIL'}") if radicle_ok and github_ok: print("\n๐ŸŽ‰ SUCCESS! Both MCP servers are ready to use.") print("\n๐Ÿ’ก Next steps:") print(" 1. Set GITHUB_PERSONAL_ACCESS_TOKEN if not already set") print(" 2. Connect to Claude Desktop or another MCP client") print(" 3. Start using natural language commands!") return 0 else: print("\nโŒ Some servers failed. Check the issues above.") return 1 if __name__ == "__main__": exit(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/fovi-llc/radicle-mcp'

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