mcp-taskfile
Expose Taskfile tasks as MCP tools.
claude mcp add --transport stdio rsclarke-mcp-taskfile-server docker run -i rsclarke/mcp-taskfile-server \ --env TASKFILE_PATH="Path to Taskfile.yml (default: ./Taskfile.yml)"
How to use
The MCP Taskfile Server dynamically exposes every task defined in your Taskfile.yml as an individual MCP tool. Built on the mcp-go framework, it discovers tasks at startup and creates a corresponding MCP tool for each one, wiring in task-specific variables and descriptions from Taskfile.yml. This lets AI assistants and MCP clients discover available tasks, validate parameters, and execute tasks natively using the go-task library without spawning external subprocesses. You can then invoke any task by name through MCP requests, passing in the required variables and defaults as defined in your Taskfile.
To use it, deploy the server and connect an MCP client or AI assistant. The client will see a tool for every Taskfile task, each with its own JSON schema describing required parameters, defaults, and descriptions. When you invoke a tool, the server runs the corresponding Taskfile task using the native go-task executor and returns the result or any error in MCP's standard response format.
How to install
Prerequisites:
- Go 1.19 or later (for building from source)
- Docker (if you plan to run via the provided Docker image) or a Go environment to build locally
Installation options:
Option A: Build and run locally from source
- Ensure Go is installed: https://golang.org/dl/
- Install the server: go get github.com/rsclarke/mcp-taskfile-server
- Build the binary (if not using go get to install): go build -o mcp-taskfile-server ./path/to/module
- Run the server from the binary in your environment where Taskfile.yml is present: ./mcp-taskfile-server
Option B: Run via Docker (recommended if you want an out-of-the-box container)
- Pull and run the image (adjust for your environment and image availability): docker run -it --rm rsclarke/mcp-taskfile-server
- Ensure your Taskfile.yml is accessible in the container or bake it into a volume.
Note: Replace any placeholder Taskfile.yml path with your actual file path. The server reads Taskfile.yml from the current working directory by default or from the path you provide via the TASKFILE_PATH environment variable.
Additional notes
Tips and considerations:
- The server will expose each Taskfile task as a separate MCP tool, including parameter schemas derived from Taskfile variables and defaults.
- Be mindful that Taskfile.yml can express potentially dangerous commands; restrict access to trusted environments.
- If a Taskfile task references variables, ensure defaults are provided in Taskfile.yml so the MCP client can validate and prompt for missing values.
- If you modify Taskfile.yml, restart the MCP server to refresh the discovered tools.
- When running in Docker, mount your Taskfile.yml or include it in the container image to ensure proper task discovery.
Related MCP Servers
mcp-language
mcp-language-server gives MCP enabled clients access semantic tools like get definition, references, rename, and diagnostics.
kodit
👩💻 MCP server to index external repositories
github-brain
An experimental GitHub MCP server with local database.
bgg
BGG MCP provides access to BoardGameGeek and a variety of board game related data through the Model Context Protocol. Enabling retrieval and filtering of board game data, user collections, and profiles.
mcp
Teamwork.com MCP server
chromedp
MCP server for browser automation using chromedp