clone_contract

Clones a contract from Etherscan with specified options.

Server Foundry MCP Project lhemerly/foundry-mcp
Category Execute
Risk class High
Parameters 00 required

What clone_contract does on Foundry MCP Project

AI agents invoke clone_contract to trigger actions in Foundry MCP Project. 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.

Why clone_contract needs a policy

While cloning itself is fundamentally a retrieval operation (Read), the purpose is to obtain smart contract code for execution in a Foundry environment where it can be run, tested, or deployed. This crosses into Execute territory because the cloned code will be used with other tools to trigger external operations (contract deployment, function calls, test execution).

From the tool's definition Tool description states it 'clones a contract from Etherscan' — this involves fetching external code from the blockchain and integrating it into the development environment.

Questions about clone_contract

What does the clone_contract tool do? +

Clones a contract from Etherscan with specified options. It is categorised as a Execute tool in the Foundry MCP Project MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

How do I enforce a policy on clone_contract? +

Register the Foundry MCP Project MCP server in PolicyLayer and add a rule for clone_contract: 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 Foundry MCP Project. Nothing to install.

What risk level is clone_contract? +

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

Can I rate-limit clone_contract? +

Yes. Add a rate_limit block to the clone_contract 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 clone_contract completely? +

Set action: deny in the PolicyLayer policy for clone_contract. 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 clone_contract? +

clone_contract is provided by the Foundry MCP Project MCP server (lhemerly/foundry-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

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

Message sent.

We'll get back to you soon.