Skip to main content
Glama
fovi-llc
by fovi-llc

rad_clone

Clone Radicle repositories by specifying the Repository ID (RID) and optional path. Ideal for managing peer-to-peer code collaboration across Radicle and GitHub via the MCP server.

Instructions

Clone a Radicle repository. Args: rid: Repository ID (RID) to clone path: Optional path where to clone the repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
ridYes

Implementation Reference

  • The main handler function for the 'rad_clone' tool. It is registered via the @mcp.tool() decorator and implements cloning a Radicle repository by running the 'rad clone' command.
    @mcp.tool() async def rad_clone(rid: str, path: Optional[str] = None) -> str: """ Clone a Radicle repository. Args: rid: Repository ID (RID) to clone path: Optional path where to clone the repository """ command = ["rad", "clone", rid] if path: command.append(path) result = await run_rad_command(command) if result["success"]: return f"✅ Successfully cloned repository {rid}\n{result['stdout']}" else: return f"❌ Failed to clone repository: {result['stderr']}"
  • Shared helper function used by rad_clone (and other tools) to execute 'rad' CLI commands asynchronously and return structured results.
    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 }
  • The @mcp.tool() decorator registers the rad_clone function as an MCP tool.
    @mcp.tool()

Other Tools

Related Tools

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