Skip to main content
anaconda-mcp is a CLI and server for exposing conda environment management tools to MCP-enabled AI coding assistants. It acts as a unified MCP endpoint, giving AI assistants like Claude, Cursor, and VS Code awareness of your conda environments, packages, and channel configurations. This guide provides an overview of the anaconda-mcp CLI, its commands, and core concepts. For a walkthrough of how to add Anaconda MCP Server to Claude Desktop’s configuration automatically and manual JSON configuration details, see the Claude Desktop integration guide.
Anaconda MCP Server is not officially supported on Windows. The Windows example below is provided for users who want to experiment with running it on Windows, but functionality is not guaranteed.

Installation

conda install anaconda-mcp

Basic usage

Start the MCP server

This command starts the Anaconda MCP Server using the default configuration, binding to the default host and port.
anaconda-mcp serve

Discover available MCP servers

This command lists all MCP servers available in the current conda environment and the tools they expose.
anaconda-mcp discover

Compose multiple MCP servers

This command combines multiple MCP servers from the current environment into a single unified server.
anaconda-mcp compose

Configure Claude Desktop

This command automatically configures Claude Desktop to connect to Anaconda MCP Server.
anaconda-mcp claude-desktop setup-config

Configuration

Anaconda MCP Server is configured using a mcp_compose.toml.template file, which is rendered at startup into a temporary configuration file. This template approach allows dynamic values such as the Python interpreter path to be resolved at runtime without hardcoding paths.
Always edit mcp_compose.toml.template, not mcp_compose.toml. Anaconda MCP detects whether mcp_compose.toml.template exists on startup. If it exists, the template is rendered at runtime (resolving placeholders like {{PYTHON_EXECUTABLE}}) and the resulting config is used. If the template is absent, mcp_compose.toml is used as a fallback.
If you’re using a client other than Claude Desktop, also see Python executable configuration for details on how to set the Python interpreter path.
The default template is located in the anaconda_mcp package directory within your conda environment’s site-packages:
~/anaconda3/envs/<ENV_NAME>/lib/python3.x/site-packages/anaconda_mcp/mcp_compose.toml.template
To use a custom configuration file instead, pass the --config flag to the serve command:
anaconda-mcp serve --config /path/to/my_config.toml

Composer settings

The [composer] section defines the identity and behavior of the unified MCP server, including how tool name conflicts are handled when multiple downstream servers expose tools with the same name.
[composer]
name = "anaconda-mcp"
conflict_resolution = "prefix"
log_level = "INFO"
port = 2391
The prefix conflict resolution strategy is recommended as it prefixes tool names with the server name to avoid collisions. See Configuration options below for details on all available conflict_resolution options.

Transport configuration

The [transport] section configures how MCP clients connect to the server. Use STDIO for local development or streamable HTTP when running as a shared network service.
[transport]
stdio_enabled = true
streamable_http_enabled = true
streamable_http_path = "/mcp"

Server configuration

The [[servers]] section defines the downstream MCP servers that Anaconda MCP Server composes. Each server’s tools become available through the single unified endpoint. STDIO servers run as subprocesses:
[[servers.proxied.stdio]]
name = "environments"
command = ["environments-mcp-server", "start", "--transport", "stdio"]
restart_policy = "on-failure"
Streamable HTTP servers connect to standalone HTTP services:
[[servers.proxied.http]]
name = "jupyter"
url = "http://localhost:2391/mcp"
protocol = "streamable-http"
timeout = 30
reconnect_on_failure = true

Tool manager

The [tool_manager] section controls how tools are named and organized. Use aliases to expose tools under shorter, more intuitive names without modifying the underlying servers.
[tool_manager]
conflict_resolution = "prefix"

[tool_manager.aliases]
create_env = "conda_environments_create_environment"
list_envs = "conda_environments_list_environments"

Configuration options

Example configuration

# mcp_compose.toml.template
[composer]
name = "anaconda-mcp"
conflict_resolution = "prefix"
log_level = "DEBUG"
port = 2391

[transport]
stdio_enabled = true

[[servers.proxied.stdio]]
name = "environments"
command = ["environments-mcp-server", "start", "--transport", "stdio"]
restart_policy = "on-failure"

[[servers.proxied.http]]
name = "jupyter"
url = "http://localhost:2391/mcp"
protocol = "streamable-http"
timeout = 30

[tool_manager]
conflict_resolution = "prefix"

[tool_manager.aliases]
create_env = "conda_environments_create_environment"
list_envs = "conda_environments_list_environments"

Python executable configuration

Anaconda MCP Server uses a {{PYTHON_EXECUTABLE}} placeholder in mcp_compose.toml.template to dynamically resolve the Python interpreter path at startup. By default, it uses the Python interpreter running anaconda-mcp. To override this, set the ANACONDA_MCP_PYTHON_EXECUTABLE environment variable to the interpreter you want to use:
export ANACONDA_MCP_PYTHON_EXECUTABLE=/path/to/python
This is useful when anaconda-mcp and the downstream MCP servers need to run in different conda environments. If you’re using a client other than Claude Desktop, you must set this variable so the client can locate the Python interpreter used to run the MCP server.