Python setup¶
Use Python 3.13 or later to install the MCP server and connect Claude Desktop or Codex CLI. Keep your AnyVar HTTP API running while you use the tools.
Prerequisites¶
Install the AI client you want to use: Claude Desktop or Codex CLI.
Install the MCP server¶
In a terminal, install from PyPI:
Find the server command¶
Find the executable:
If nothing prints, activate the virtual environment where you installed the
server and try again. Save the printed path. Use it as the command if your
agent cannot find anyvar-mcp. For a virtual environment, it might look like:
Connect your AI agent¶
Replace ANYVAR_API_URL with your service's URL. The examples enable writes to
AnyVar; omit ANYVAR_ENABLE_REGISTRATION to disable them. See the
configuration reference for other settings.
Choose your client below.
Claude Desktop¶
- Open Settings → Developer → Edit Config to find
claude_desktop_config.json. - Add this entry to
mcpServers, keeping any existing server entries:
{
"mcpServers": {
"anyvar-mcp": {
"command": "anyvar-mcp",
"env": {
"ANYVAR_API_URL": "http://localhost:8000",
"ANYVAR_ENABLE_REGISTRATION": "true"
}
}
}
}
If Claude Desktop cannot find the command, replace the command value with
the full executable path.
- Save the file, fully quit Claude Desktop, and reopen it.
See the Claude Desktop MCP documentation for more setup options and troubleshooting.
Codex CLI¶
In a terminal, add the MCP server with ANYVAR_API_URL set to
http://localhost:8000 and ANYVAR_ENABLE_REGISTRATION set to true:
codex mcp add anyvar-mcp --env ANYVAR_API_URL=http://localhost:8000 --env ANYVAR_ENABLE_REGISTRATION=true -- anyvar-mcp
Confirm that the saved server list includes anyvar-mcp:
See the Codex MCP documentation and CLI reference for more configuration options and commands.
Change saved settings¶
Config file¶
Edit the server's environment variables in ~/.codex/config.toml:
[mcp_servers.anyvar-mcp.env]
ANYVAR_API_URL = "http://localhost:8000"
ANYVAR_ENABLE_REGISTRATION = "true"
CLI¶
In a terminal, inspect the current entry, remove it, and add it again with all settings you want to keep. For example, to change the API URL and disable registration:
codex mcp get anyvar-mcp
codex mcp remove anyvar-mcp
codex mcp add anyvar-mcp --env ANYVAR_API_URL=http://localhost:9000 --env ANYVAR_ENABLE_REGISTRATION=false -- anyvar-mcp
Check the connection¶
- Claude Desktop: In a new chat, open Add files, connectors, and more →
Connectors → Manage connectors and select
anyvar-mcp. - Codex CLI: Run
codexin a terminal to start a new session, then enter/mcp. You should seeanyvar-mcp: connected (4 tools).
If you're having issues, see Troubleshooting.
Optional: check tools from the terminal¶
With Node.js and npx installed, you can use the
MCP Inspector to list
tools independently of your agent:
The Inspector checks tool discovery; it does not check API connectivity.
Use the tools¶
Follow Use the tools with your AI agent in the Quickstart to try the AnyVar tools.
Troubleshooting¶
AnyVar HTTP API is unavailable¶
Make sure the AnyVar HTTP API is
running and keep it running while you use the tools. In your agent's MCP
configuration, set ANYVAR_API_URL to that instance's base URL, including the
correct host and port. For example, http://localhost:8000 works only if the API
is running there and your MCP server can reach it.
After changing ANYVAR_API_URL, restart your agent so it uses the updated value.
Agent cannot find anyvar-mcp¶
If anyvar-mcp fails to start, its tools may be missing in Claude Desktop,
or Codex CLI may show it as failed with 0 tools. Your agent may be unable to
find the executable because its PATH differs from your terminal's, especially
if you installed anyvar-mcp in a virtual environment.
Find the executable in the terminal where you installed it:
If nothing prints, activate the virtual environment where you installed the
server and try again. In the examples below, replace
/home/git/anyvar-mcp/.venv/bin/anyvar-mcp with the full path printed by
command -v anyvar-mcp. Restart your agent after saving the change.
Claude Desktop¶
Replace the command value for anyvar-mcp in claude_desktop_config.json:
Codex CLI¶
In ~/.codex/config.toml, replace the command value under
[mcp_servers.anyvar-mcp]:
Or run this in a terminal to add the server with the full executable path:
codex mcp add anyvar-mcp --env ANYVAR_API_URL=http://localhost:8000 --env ANYVAR_ENABLE_REGISTRATION=true -- "/home/git/anyvar-mcp/.venv/bin/anyvar-mcp"
Still having trouble?¶
Please open an issue
with exact steps to reproduce the problem, the expected result, and the full
error message or status. Include your operating system, agent name and version,
anyvar-mcp version, and relevant MCP configuration.
Remove credentials and other sensitive information before posting.