docs/mcp.md
The Model Context Protocol (MCP) is a standard protocol that enables AI assistants to interact with development tools and access project context. Mise provides an MCP server that allows AI assistants to query information about your development environment.
When you run mise mcp, it starts a server that AI assistants can connect to and query information about your mise-managed development environment. The server communicates over stdin/stdout using JSON-RPC protocol.
::: warning
The MCP feature is experimental and requires enabling experimental features with MISE_EXPERIMENTAL=1.
:::
The MCP server is typically launched by AI assistants automatically, but you can also run it manually for testing:
# Enable experimental features
export MISE_EXPERIMENTAL=1
# Start the MCP server (it will wait for JSON-RPC input on stdin)
mise mcp
The MCP server exposes the following read-only resources that AI assistants can query:
mise://toolsLists all tools managed by mise in your project, including:
mise://tasksShows all available mise tasks with:
mise://envDisplays environment variables defined in your mise configuration:
mise://configProvides information about mise configuration:
The following tools are available for AI assistants to call:
install_toolInstall a specific tool version (not yet implemented)
run_taskExecute a mise task with optional arguments.
Parameters:
task (required, string): Name of the task to runargs (optional, array of strings): Arguments to pass to the taskExample:
{
"task": "build",
"args": ["--verbose"]
}
When the AI assistant calls this tool, it will execute the specified task and return the output, including stdout, stderr, and the exit status.
To use mise with Claude Desktop, add the following to your Claude configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"mise": {
"command": "mise",
"args": ["mcp"],
"env": {
"MISE_EXPERIMENTAL": "1"
}
}
}
}
After adding this configuration and restarting Claude Desktop, the assistant will be able to:
The MCP server uses standard JSON-RPC 2.0 over stdio, making it compatible with any AI assistant that supports the Model Context Protocol. Consult your AI assistant's documentation for specific integration instructions.
When integrated with an AI assistant, you can ask questions like:
The AI assistant will query the MCP server to provide accurate, up-to-date information about your development environment and can execute tasks on your behalf.
The MCP server implementation can be found in src/cli/mcp.rs. It implements the ServerHandler trait from the rmcp crate to handle:
For more information about the Model Context Protocol, visit the official MCP documentation.