Skip to content

Installation

clarity-api is published to PyPI and ships a prebuilt Docker image.

From PyPI

# Core client only
pip install clarity-api

# With the MCP server (clarity-mcp)
pip install "clarity-api[mcp]"

# With the A2A agent server (clarity-agent)
pip install "clarity-api[agent]"

# Everything
pip install "clarity-api[all]"

From source

git clone https://github.com/Knuckles-Team/clarity-api.git
cd clarity-api
pip install -e ".[all]"

Docker

docker pull knucklessg1/clarity-api:latest
docker run --rm -e CLARITY_URL -e CLARITY_TOKEN knucklessg1/clarity-api:latest

Extras matrix

Extra Installs Use for
(none) agent-utilities, requests, pydantic, python-dotenv the Api client
mcp agent-utilities[mcp] the clarity-mcp MCP server
agent agent-utilities[agent,logfire] the clarity-agent A2A agent
all clarity-api[mcp,agent] everything
test pytest tooling running the test suite

Credentials

Configure these environment variables (or a .env file — see .env.example):

Variable Default Description
CLARITY_URL https://www.clarity.ms Base URL of the Clarity instance
CLARITY_TOKEN (unset) Bearer API token from project settings
CLARITY_SSL_VERIFY True Verify TLS certificates

Note: Only Clarity project admins can generate API tokens (SettingsData ExportGenerate new API token).