Dagger MCP Server
An MCP (Model Context Protocol) server that exposes Dagger CI/CD capabilities as tools for AI assistants.
Tools Provided
Installation
From Source
git clone https://github.com/user/dagger-mcp-server.git
cd dagger-mcp-server
cargo install --path .
Prerequisites
- Dagger CLI installed
- Rust 1.70+
Usage with MCP Clients
OpenCode
Add to ~/.config/opencode/opencode.json:
{
"mcpServers": {
"dagger": {
"type": "local",
"command": ["dagger-mcp-server"],
"enabled": true
}
}
}
Claude Desktop
Add to Claude Desktop config:
{
"mcpServers": {
"dagger": {
"command": "dagger-mcp-server"
}
}
}
Cursor
Add to Cursor MCP settings:
{
"mcpServers": {
"dagger": {
"command": "dagger-mcp-server"
}
}
}
Example Usage
Once configured, your AI assistant can:
# Check Dagger version
"What version of Dagger is installed?"
# List functions in a module
"Show me the available functions in ./my-dagger-module"
# Run a Dagger function
"Run the 'build' function in the ./ci module"
# Build and push an image
"Build using the 'container' function and push to ghcr.io/myorg/myapp:v1"
Development
# Build
cargo build
# Run locally (stdio mode)
cargo run
# Test with Dagger
dagger version
cargo run
License
MIT