Add Agent Rules
First add the agent rules file, either as.rules in the root of your project or as one of the other acceptable files/locations.
Configure MCP Server
Configure the Container Use MCP server in the Zedsettings.json. Provide the absolute path to the cu executable:
Add Container Use Agent Profile (Optional)
To lock the Zed agent out of your host system, you can create a dedicated agent profile that only enables Container Use tools. Add this to yoursettings.json under the agent section:
Verification
After setting up Zed, verify Container Use is working:- Check MCP Connection: Zed should recognize Container Use tools
- Test Environment Creation: Ask Zed to create a new environment
- Verify Isolation: Multiple environments should work independently
Troubleshooting
Zed doesn't recognize Container Use
Zed doesn't recognize Container Use
- Verify the
cucommand is in your PATH:which cu - Check MCP configuration syntax
- Restart Zed after configuration changes
Permission errors
Permission errors
- Ensure Docker is running and accessible
- Check file permissions for configuration files
- Verify
cu stdiocommand works:echo '{}' | cu stdio
Tools not appearing
Tools not appearing
- Check your Zed MCP server logs
- Verify Container Use tools are enabled in settings
