High Risk →

git_clone

Clone Git repositories into the Daytona workspace with customizable options. Supports branch/tag selection, shallow clones, Git LFS for large files, and SSH/HTTPS authentication. Cloned content persists during the session and can be accessed by other tools. Returns repository structure and metada...

How to control git_clone ↓

What git_clone does on Daytona MCP Python Interpreter

AI agents invoke git_clone to trigger actions in Daytona MCP Python Interpreter. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.

High Risk

Why git_clone needs a policy

While git_clone itself is a fetch/retrieval operation by surface appearance, it downloads and materializes arbitrary code into an execution environment (Daytona workspace) where other tools can execute it. The combination of repository cloning with sibling execute tools (shell_exec, Python interpreter) means a malicious or incorrectly specified repository URL could result in execution of attacker-controlled code.

From the tool's definition Tool description states it 'Clone Git repositories into the Daytona workspace' and 'Returns repository structure and metadata for easier navigation.' Combined with sibling tools like shell_exec that enable arbitrary command execution, cloning repositories…

Documented attack patterns abuse exactly the kind of access git_clone gives an agent:

How to control git_clone

PolicyLayer is an MCP gateway — it sits between your AI agents and Daytona MCP Python Interpreter, and nothing reaches the server without passing your rules. This is the rule we recommend for git_clone:

policy.json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "git_clone": {
      "limits": [
        {
          "counter": "git_clone_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}

git_clone stays usable, but rate-capped — a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.

  1. Create a free account and register Daytona MCP Python Interpreter — nothing to install.
  2. Add this policy — paste it, or build it visually.
  3. Point your MCP client (Claude, Cursor, anything) at your gateway URL.
RATE-LIMIT THIS TOOL →

Free to start. No card required.

Related tools and policies

Go deeper

Questions about git_clone

What does the git_clone tool do? +

Clone Git repositories into the Daytona workspace with customizable options. Supports branch/tag selection, shallow clones, Git LFS for large files, and SSH/HTTPS authentication. Cloned content persists during the session and can be accessed by other tools. Returns repository structure and metadata for easier navigation. It is categorised as a Execute tool in the Daytona MCP Python Interpreter MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

How do I enforce a policy on git_clone? +

Register the Daytona MCP Python Interpreter MCP server in PolicyLayer and add a rule for git_clone: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Daytona MCP Python Interpreter. Nothing to install.

What risk level is git_clone? +

git_clone is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit git_clone? +

Yes. Add a rate_limit block to the git_clone rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block git_clone completely? +

Set action: deny in the PolicyLayer policy for git_clone. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides git_clone? +

git_clone is provided by the Daytona MCP Python Interpreter MCP server (nibzard/daytona-mcp-interpreter). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policy on every Daytona MCP Python Interpreter tool call.

Start from Daytona MCP Python Interpreter, add the rest of your stack, and see everything your agents can call. Then put policy on all of it.

Free to start. No card required.

5 Daytona MCP Python Interpreter tools catalogued and risk-classified — across an index of 43,000+ MCP servers.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.