Skip to main content

Install Ahnlich MCP

Before starting the MCP server, run the services required by your profile:

ProfileRequired services
aiAhnlich AI on port 1370 and Ahnlich DB on port 1369
dbAhnlich DB on port 1369

See the Ahnlich installation guide.

The examples below use the ai profile.

Install from PyPI

This is the recommended method. Install uv, then check the connection:

uvx ahnlich-mcp doctor --profile ai

Claude Desktop

Open Settings → Developer → Edit Config and add:

JSON
{
"mcpServers": {
"ahnlich": {
"command": "uvx",
"args": ["ahnlich-mcp", "--profile", "ai"]
}
}
}

Restart Claude Desktop after saving the configuration.

Codex

codex mcp add ahnlich -- uvx ahnlich-mcp --profile ai

Verify the connection:

codex mcp list

Run with Docker

Use Docker to isolate the MCP server's Python dependencies. The required Ahnlich services must already be running on the host.

docker pull ghcr.io/deven96/ahnlich-mcp:latest

Claude Desktop

JSON
{
"mcpServers": {
"ahnlich": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--add-host",
"host.docker.internal:host-gateway",
"-e",
"AHNLICH_AI_HOST=host.docker.internal",
"ghcr.io/deven96/ahnlich-mcp:latest",
"--profile",
"ai"
]
}
}
}

Codex

codex mcp add ahnlich -- docker run --rm -i \  --add-host host.docker.internal:host-gateway \  -e AHNLICH_AI_HOST=host.docker.internal \  ghcr.io/deven96/ahnlich-mcp:latest \  --profile ai

For the db profile, use AHNLICH_DB_HOST=host.docker.internal and --profile db.

Install from source

Use this method when developing Ahnlich MCP:

git clone https://github.com/deven96/ahnlich.gitcd ahnlich/mcpuv sync --lockeduv run ahnlich-mcp doctor --profile ai

The stdio command for MCP clients is:

uv --directory /absolute/path/to/ahnlich/mcp run ahnlich-mcp --profile ai

Configuration

VariableDefaultDescription
AHNLICH_PROFILEaiActive profile: ai or db
AHNLICH_DB_HOST127.0.0.1Ahnlich DB host
AHNLICH_DB_PORT1369Ahnlich DB port
AHNLICH_AI_HOST127.0.0.1Ahnlich AI host
AHNLICH_AI_PORT1370Ahnlich AI port
AHNLICH_AI_MODELall-minilm-l6-v2Model used by the AI profile
AHNLICH_MCP_READ_ONLY0Expose only read-only tools when set to 1

The --profile command-line option overrides AHNLICH_PROFILE.

Read-only mode

Enable read-only mode when the agent must not modify Ahnlich:

AHNLICH_MCP_READ_ONLY=1 uvx ahnlich-mcp --profile ai

Read-only mode exposes only:

  • ping
  • server_info
  • list_stores
  • similarity_search
  • get_by_metadata