Skip to main content
Glama
fovi-llc

Radicle + GitHub MCP Server

by fovi-llc

rad_status

Check the current status of a Radicle repository to monitor its peer-to-peer collaboration state and synchronization details.

Instructions

Get the status of a Radicle repository.

Args:
    repository_path: Path to the repository (default: current directory)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repository_pathNo.

Implementation Reference

  • The rad_status tool handler function, including registration via @mcp.tool() decorator, input schema via type hints and docstring, and implementation logic that executes the 'rad inspect' command.
    @mcp.tool()
    async def rad_status(repository_path: str = ".") -> str:
        """
        Get the status of a Radicle repository.
        
        Args:
            repository_path: Path to the repository (default: current directory)
        """
        result = await run_rad_command(["rad", "inspect"], cwd=repository_path)
        
        if result["success"]:
            return f"📊 Repository status:\n{result['stdout']}"
        else:
            return f"❌ Failed to get repository status: {result['stderr']}"
  • Supporting utility function run_rad_command used by rad_status to execute shell commands for Radicle CLI.
    async def run_rad_command(command: List[str], cwd: Optional[str] = None) -> Dict[str, Any]:
        """
        Run a rad command and return the result.
        
        Args:
            command: List of command arguments starting with 'rad'
            cwd: Working directory to run the command in
            
        Returns:
            Dictionary with stdout, stderr, and return_code
        """
        try:
            # Ensure command starts with 'rad'
            if not command or command[0] != "rad":
                command = ["rad"] + command
                
            logger.info(f"Running command: {' '.join(command)}")
            
            process = await asyncio.create_subprocess_exec(
                *command,
                stdout=asyncio.subprocess.PIPE,
                stderr=asyncio.subprocess.PIPE,
                cwd=cwd
            )
            
            stdout, stderr = await process.communicate()
            
            return {
                "stdout": stdout.decode("utf-8").strip(),
                "stderr": stderr.decode("utf-8").strip(),
                "return_code": process.returncode,
                "success": process.returncode == 0
            }
            
        except FileNotFoundError:
            return {
                "stdout": "",
                "stderr": "rad command not found. Please ensure Radicle is installed.",
                "return_code": 127,
                "success": False
            }
        except Exception as e:
            return {
                "stdout": "",
                "stderr": f"Error running command: {str(e)}",
                "return_code": 1,
                "success": False
            }

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/fovi-llc/radicle-mcp'

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