local_dev_from_github
Set up a local development environment from any GitHub repository. Clone the repo, configure dependencies, and execute tests or analyze coverage using supported frameworks like Python, Node, and Bun.
Instructions
Create a new local development environment from a GitHub repository
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| github_url | Yes | GitHub repository URL |
Input Schema (JSON Schema)
{
"properties": {
"github_url": {
"description": "GitHub repository URL",
"type": "string"
}
},
"required": [
"github_url"
],
"type": "object"
}
Implementation Reference
- src/mcp_local_dev/server.py:24-34 (registration)Registers the 'local_dev_from_github' tool with its input schema.types.Tool( name="local_dev_from_github", description="Create a new local development environment from a GitHub repository", inputSchema={ "type": "object", "properties": { "github_url": {"type": "string", "description": "GitHub repository URL"} }, "required": ["github_url"], }, ),
- src/mcp_local_dev/server.py:88-101 (handler)Dispatches the tool call and formats the response from create_environment_from_github.if name == "local_dev_from_github": logger.debug("Creating environment from GitHub") env = await create_environment_from_github(arguments["github_url"]) result = { "success": True, "data": { "id": env.id, "working_dir": str(env.sandbox.work_dir), "created_at": env.created_at.isoformat(), "runtime": env.runtime_config.name.value, }, } logger.debug(f"Environment created successfully: {result}") return [types.TextContent(type="text", text=json.dumps(result))]
- Core implementation: clones the GitHub repository into a staging sandbox and creates a full environment from it.async def create_environment_from_github( github_url: str, branch: Optional[str] = None ) -> Environment: """Create new environment from GitHub repository.""" staging = await create_sandbox("mcp-staging-") try: repo = await clone_github_repository(staging, github_url, branch) env = await create_environment_from_path(repo) return env finally: cleanup_sandbox(staging)
- src/mcp_local_dev/server.py:27-33 (schema)Input schema defining the required 'github_url' parameter.inputSchema={ "type": "object", "properties": { "github_url": {"type": "string", "description": "GitHub repository URL"} }, "required": ["github_url"], },