Archivebox Api
CLI or API | MCP | Agent
Version: 2.4.0
Documentation — Installation, deployment, usage across the API, CLI, MCP, and A2A agent interfaces, and guidance for provisioning the ArchiveBox platform are maintained in the official documentation.
Table of Contents
- Overview
- Key Features
- Concept Registry
- Environment Variables
- CLI or API Usage
- MCP Server Setup
- Agentic AI Graph Agent
- Security & Governance
- Installation
- Contribute
Overview
Archivebox Api is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with the Pythonic ArchiveBox API Wrapper and Fast MCP Server for Agentic AI use!
Key Features
- Consolidated Action-Routed MCP Tools: Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.
- Enterprise-Grade Security: Complete support for Eunomia policies, OIDC token delegation, and granular execution context tracking.
- Integrated Graph Agent: Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI).
- Native Telemetry & Tracing: Out-of-the-box OpenTelemetry exports and native Langfuse tracing.
Concept Registry
This codebase is aligned with the 5 Core Pillars Architecture of the agent-connector-sdk ecosystem:
| Concept ID | Pillar Name | Domain | Implementation Details in archivebox-api |
|---|---|---|---|
ECO-4.0 |
Ecosystem & Peripherals | Tool Interface & MCP Factory | Provides FastMCP server wrapper, action routing tools, and dynamic schema exposures. |
ECO-4.1 |
Ecosystem & Peripherals | A2A Network & Consensus | Manages agent peer discovery, routing tables, and consensus. |
OS-5.1 |
Agent OS Infrastructure | Security & Auth | Implements token-based OIDC access control, JWT filters, and Eunomia validation. |
AU-OS.governance.wasm-micro-agent-sandbox |
Agent OS Infrastructure | Telemetry & Observability | Delivers warning suppressions, JSON progress logging, and error tracing. |
Environment Variables
Package environment variables
| Variable | Example | Description |
|---|---|---|
HOST |
0.0.0.0 |
|
PORT |
8000 |
|
TRANSPORT |
stdio |
options: stdio, streamable-http, sse |
ENABLE_OTEL |
True |
|
OTEL_EXPORTER_OTLP_ENDPOINT |
http://localhost:8080/api/public/otel |
|
OTEL_EXPORTER_OTLP_PUBLIC_KEY_REF |
secret://telemetry/otlp-public-key |
|
OTEL_EXPORTER_OTLP_SECRET_KEY_REF |
secret://telemetry/otlp-secret-key |
|
OTEL_EXPORTER_OTLP_PROTOCOL |
http/protobuf |
|
EUNOMIA_TYPE |
none |
options: none, embedded, remote |
EUNOMIA_POLICY_FILE |
mcp_policies.json |
|
EUNOMIA_REMOTE_URL |
http://eunomia-server:8000 |
|
ARCHIVEBOX_BASE_URL |
http://localhost:8000 |
|
ARCHIVEBOX_URL |
http://localhost:8000 |
ARCHIVEBOX_URL is a fallback/alternative alias for ARCHIVEBOX_BASE_URL |
ARCHIVEBOX_USERNAME |
— | |
ARCHIVEBOX_TLS_PROFILE |
— | Optional named runtime TLS profile or secret reference. Peer and hostname verification are mandatory; private trust chains belong in runtime config. |
ARCHIVEBOX_TLS_PROFILE_REF |
— | |
DEBUG |
False |
|
PYTHONUNBUFFERED |
1 |
|
ARCHIVEBOX_API_KEY |
secret-injected | |
ARCHIVEBOX_TOKEN |
secret-injected | |
ARCHIVEBOX_PASSWORD |
secret-injected | |
AUTHENTICATIONTOOL |
True |
|
CORETOOL |
True |
|
CLITOOL |
True |
|
WEBTOOL |
True |
Enables the web-source tools web_fetch and web_extract. |
ARCHIVEBOX_EXTRACT_TIMEOUT_S |
120 |
Seconds web_extract waits for a snapshot to complete. |
KGTOOL |
True |
|
ARCHIVEBOX_KG_AUTO_INGEST |
1 |
Inherited agent-connector-sdk variables (apply to every connector)
| Variable | Example | Description |
|---|---|---|
MCP_TOOL_MODE |
intent |
Tool surface: intent | condensed | verbose | both |
MCP_ENABLED_TOOLS |
— | Comma-separated tool allow-list |
MCP_DISABLED_TOOLS |
— | Comma-separated tool deny-list |
MCP_ENABLED_TAGS |
— | Comma-separated tag allow-list |
MCP_DISABLED_TAGS |
— | Comma-separated tag deny-list |
MCP_CLIENT_AUTH |
— | Outbound MCP child auth: oidc-client-credentials | basic | none |
OIDC_CLIENT_ID |
— | OIDC client id (service-account auth) |
OIDC_CLIENT_SECRET_REF |
secret://identity/oidc-client-secret |
Runtime secret reference for the OIDC service account |
MCP_BASIC_AUTH_USERNAME |
— | HTTP Basic username (MCP_CLIENT_AUTH=basic) |
MCP_BASIC_AUTH_PASSWORD_REF |
secret://identity/mcp-basic-password |
Runtime secret reference for HTTP Basic auth (MCP_CLIENT_AUTH=basic) |
MCP_URL |
http://localhost:8000/mcp |
URL of the MCP server the agent connects to |
PROVIDER |
openai |
LLM provider for the agent |
MODEL_ID |
gpt-4o |
Model id for the agent |
ENABLE_WEB_UI |
True |
Serve the AG-UI web interface |
26 package + 14 inherited variable(s). Auto-generated from .env.example + the shared agent-connector-sdk set — do not edit.
Configure the runtime environment by creating a .env file based on .env.example.
Every variable the server reads, grouped by concern.
Connection & Credentials
| Variable | Description | Default |
|---|---|---|
ARCHIVEBOX_BASE_URL |
Canonical endpoint URL for the backend ArchiveBox API | http://localhost:8000 |
ARCHIVEBOX_URL |
Fallback alias/alternative for ARCHIVEBOX_BASE_URL |
http://localhost:8000 |
ARCHIVEBOX_USERNAME |
Username for authentication | — |
ARCHIVEBOX_PASSWORD |
Password for authentication | — |
ARCHIVEBOX_API_KEY |
API key for token-less header authentication | — |
ARCHIVEBOX_TOKEN |
Pre-configured authentication token | — |
ARCHIVEBOX_TLS_PROFILE |
Named TLS profile for private PKI, mTLS, or proxy policy | — |
ARCHIVEBOX_TLS_PROFILE_REF |
Secret reference containing the TLS profile | — |
MCP server / transport
| Variable | Description | Default |
|---|---|---|
TRANSPORT |
stdio, streamable-http, or sse |
stdio |
HOST |
Bind host (HTTP transports) | 0.0.0.0 |
PORT |
Bind port (HTTP transports) | 8000 |
MCP_TOOL_MODE |
Tool surface: condensed, verbose, or both |
condensed |
MCP_ENABLED_TOOLS / MCP_DISABLED_TOOLS |
Comma-separated tool allow/deny list | — |
MCP_ENABLED_TAGS / MCP_DISABLED_TAGS |
Comma-separated tag allow/deny list | — |
DEBUG |
Verbose logging | False |
PYTHONUNBUFFERED |
Unbuffered stdout (recommended in containers) | 1 |
Tool toggles
Each action-routed tool can be disabled individually via its toggle env var (set to false):
AUTHENTICATIONTOOL, CORETOOL, CLITOOL (see the Available MCP Tools table below).
Telemetry & governance
| Variable | Description | Default |
|---|---|---|
ENABLE_OTEL |
Enable OpenTelemetry export | True |
OTEL_EXPORTER_OTLP_ENDPOINT |
OTLP collector endpoint | — |
OTEL_EXPORTER_OTLP_PUBLIC_KEY / OTEL_EXPORTER_OTLP_SECRET_KEY |
OTLP auth keys | — |
OTEL_EXPORTER_OTLP_PROTOCOL |
OTLP protocol (e.g. http/protobuf) |
— |
EUNOMIA_TYPE |
Authorization mode: none, embedded, remote |
none |
EUNOMIA_POLICY_FILE |
Embedded policy file | mcp_policies.json |
EUNOMIA_REMOTE_URL |
Remote Eunomia server URL | — |
Agent CLI (full [agent] runtime only)
| Variable | Description | Default |
|---|---|---|
MCP_URL |
URL of the MCP server the agent connects to | http://localhost:8000/mcp |
PROVIDER |
LLM provider (e.g. openai) |
openai |
MODEL_ID |
Model id (e.g. gpt-4o) |
gpt-4o |
ENABLE_WEB_UI |
Serve the AG-UI web interface | True |
CLI or API Usage
The operator can use the API client programmatically in Python to manage ArchiveBox snapshots:
from archivebox_api import Api
# Initialize client
client = Api(
url="http://localhost:8000",
token="your-auth-token",
)
# Fetch snapshots
snapshots = client.get_snapshots()
for snapshot in snapshots.get("results", []):
print(f"[{snapshot['timestamp']}] {snapshot['url']}")
Refer to docs/index.md for full developer SDK and class references.
MCP Server Setup
Install the connector-focused
[mcp]extra. Examples usearchivebox-api[mcp]to add FastMCP / FastAPI throughagent-connector-sdk[mcp]; the required Agent Utilities core still carriesepistemic-graph[full]. The[agent]extra also enables model orchestration.
This server use dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.
Tool Catalog
See the auto-generated Available MCP Tools table below for the full, live list of tools.
Dynamic Tool Selection & Visibility
This MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows the operator to restrict the set of exposed tools to prevent blowing up the LLM's context window.
The operator can configure tool filtering via multiple input channels:
- CLI Arguments: Pass
--toolsor--toolsets(or their disabled counterparts--disabled-toolsand--disabled-toolsets) during startup. - Environment Variables: Define standard environment variables:
MCP_ENABLED_TOOLS/MCP_DISABLED_TOOLSMCP_ENABLED_TAGS/MCP_DISABLED_TAGS
- HTTP SSE Request Headers: Pass custom headers during transport initialization:
x-mcp-enabled-tools/x-mcp-disabled-toolsx-mcp-enabled-tags/x-mcp-disabled-tags
- HTTP SSE Request Query Parameters: Append query parameters directly to the operator's transport connection URL:
?tools=tool1,tool2?tags=tag1
When query strings or parameters are provided, an LLM-free Knowledge Graph resolution layer (using DynamicToolOrchestrator) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.
Local IDE Configuration (Cursor / Claude Desktop)
Add the following block to the operator's mcp.json to configure stdio transport via uvx:
{
"mcpServers": {
"archivebox-api": {
"command": "uv",
"args": [
"run",
"--package",
"archivebox-api",
"archivebox-mcp"
],
"env": {
"ARCHIVEBOX_BASE_URL": "http://localhost:8000",
"ARCHIVEBOX_USERNAME": "admin",
"ARCHIVEBOX_PASSWORD": "your-password"
}
}
}
}
Agentic AI Graph Agent
This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the Agent Control Protocol (ACP) and interacts smoothly with the Agent Web UI (AG-UI).
Running the Agent CLI
To start the interactive command-line agent:
# Export credentials
export ARCHIVEBOX_BASE_URL="http://localhost:8000"
export ARCHIVEBOX_USERNAME="admin"
export ARCHIVEBOX_PASSWORD="your-password"
# Run agent server
archivebox-agent --provider openai --model-id gpt-4o
Detailed graph node architecture explanations, custom skill configurations, and agentic trace guides are available in docs/index.md.
Security & Governance
Built directly upon the enterprise-ready agent-connector-sdk core, standard security parameters are fully supported:
Access Control & Policy Enforcement
- Eunomia Policies: Fine-grained, policy-driven tool authorization. Supports
none, localembedded(mcp_policies.json), or centralizedremotemodes. - OIDC Token Delegation: Compliant with RFC 8693 token exchange for flowing authenticating user credentials from Web UI / ACP → Agent → MCP.
- Scoped Credentials: Execution context runs restricted to the specific caller identity.
Runtime Security Grid
| Feature | Feature | Enablement |
|---|---|---|
| Tool Guard | Sensitivity inspection with human-in-the-loop validation | Enabled by default |
| Prompt Injection Defense | Input scanning, repetition monitoring, and recursive loop blocks | Enabled by default |
| Context Safety Guard | Stuck-loop detectors and contextual overflow preemptive alerts | Enabled by default |
Installation
Pick the extra that matches what the operator want to run:
| Extra | Installs | Use when |
|---|---|---|
archivebox-api[mcp] |
Connector-focused MCP server (agent-connector-sdk[mcp] — FastMCP/FastAPI + epistemic-graph[full]) |
The operator only run the MCP server (smallest install / image) |
archivebox-api[agent] |
Agent runtime (agent-connector-sdk[agent-runtime,logfire] — model orchestration + epistemic-graph[full]) |
The operator run the integrated agent |
archivebox-api[all] |
Everything (mcp + agent + logfire) |
Development / both surfaces |
# Connector-focused MCP server (includes the shared graph engine)
uv pip install "archivebox-api[mcp]"
# Agent runtime (adds model orchestration to the shared graph engine)
uv pip install "archivebox-api[agent]"
# Everything (development)
uv pip install "archivebox-api[all]" # or: python -m pip install "archivebox-api[all]"
Container images (:mcp vs :agent)
One multi-stage docker/Dockerfile builds two right-sized images, selected by --target:
| Image tag | Build target | Contents | Entrypoint |
|---|---|---|---|
example/archivebox-api:mcp |
--target mcp |
archivebox-api[mcp] — connector-focused, includes epistemic-graph[full]; no model-orchestration stack |
archivebox-mcp |
example/archivebox-api@sha256:<digest> |
--target agent (default) |
archivebox-api[agent] — agent runtime, model orchestration + epistemic-graph[full] |
archivebox-agent |
docker build --target mcp -t example/archivebox-api:mcp docker/ # connector-focused MCP server
docker build --target agent -t example/archivebox-api:agent-local docker/ # agent runtime
docker/mcp.compose.yml runs the connector-focused :mcp server; docker/agent.compose.yml runs the
agent (immutable agent digest) with a co-located :mcp sidecar.
Knowledge-graph database (epistemic-graph)
Both [mcp] and [agent] carry the epistemic-graph engine through the required
Agent Utilities core dependency (epistemic-graph[full]). The [mcp] extra keeps
the server connector-focused; [agent] also enables model orchestration. Local
deployments can use the bundled engine. For production or shared state, run
epistemic-graph as a dedicated database service and configure the runtime to use it.
Deployment recipes (single-node + Raft HA), connection configuration, and architecture
diagrams are documented in the
epistemic-graph deployment guide.
Documentation
The complete documentation is published as the official documentation site and is the recommended reference for installation, deployment, and day-to-day operation.
| Page | Contents |
|---|---|
| Installation | pip, source, extras, prebuilt Docker image |
| Deployment | run the MCP and agent servers, Compose, Caddy + Technitium, env config |
| Usage | the MCP tools, the Api client, the CLI |
| Backing Platform | deploy ArchiveBox with Docker |
| Overview | ecosystem role, configuration, architecture |
| Concepts | concept registry (CONCEPT:ABOX-*) |
AGENTS.md is the canonical contributor/agent guidance.
Contribute
Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
- Format code using
ruff format . - Lint code using
ruff check . - Validate type-safety with
mypy . - Run test suites using
pytest
Available MCP Tools
The table below is auto-generated from the live server — do not edit by hand.
Condensed action-routed tools (MCP_TOOL_MODE=condensed)
| MCP Tool | Toggle Env Var | Description |
|---|---|---|
archivebox_authentication |
AUTHENTICATIONTOOL |
Manage archivebox authentication operations. |
archivebox_cli |
CLITOOL |
Manage archivebox cli operations. |
archivebox_core |
CORETOOL |
Manage archivebox core operations. |
archivebox_ingest_archiveresults |
KGTOOL |
List ArchiveBox archive results and ingest them as :ArchiveResult nodes. |
archivebox_ingest_snapshots |
KGTOOL |
List ArchiveBox snapshots and natively ingest them into epistemic-graph. |
Verbose 1:1 API-mapped tools (MCP_TOOL_MODE=verbose or both)
14 per-operation tools — one per public API method (click to expand)
| MCP Tool | Toggle Env Var | Description |
|---|---|---|
archivebox_check_api_token |
APITOOL |
Validate an API token to make sure it's valid and non-expired |
archivebox_cli_add |
APITOOL |
Execute archivebox add command |
archivebox_cli_list |
APITOOL |
Execute archivebox list command |
archivebox_cli_remove |
APITOOL |
Execute archivebox remove command |
archivebox_cli_schedule |
APITOOL |
Execute archivebox schedule command |
archivebox_cli_update |
APITOOL |
Execute archivebox update command |
archivebox_get_any |
APITOOL |
Get a specific Snapshot, ArchiveResult, or Tag by abid |
archivebox_get_api_token |
APITOOL |
Generate an API token for a given username & password |
archivebox_get_archiveresult |
APITOOL |
Get a specific ArchiveResult by id or abid |
archivebox_get_archiveresults |
APITOOL |
List all ArchiveResult entries matching these filters |
archivebox_get_snapshot |
APITOOL |
Get a specific Snapshot by abid or id |
archivebox_get_snapshots |
APITOOL |
Retrieve list of snapshots |
archivebox_get_tag |
APITOOL |
Get a specific Tag by id or abid |
archivebox_get_tags |
APITOOL |
Retrieve list of tags |
5 action-routed tool(s) · 14 verbose 1:1 tool(s). Each is enabled unless its <DOMAIN>TOOL toggle is set false; MCP_TOOL_MODE selects the surface (intent default — the six verb-tools, granular set loaded on demand · condensed action-routed · verbose 1:1 · both). Auto-generated — do not edit.
Additional Deployment Options
archivebox-api can run as a local stdio process or container, or behind a remote
network boundary. The
Deployment guide carries
the detailed transport contract.
- Local container — launch a reviewed immutable image as a least-privilege stdio child with no listener or published port.
- Remote URL — connect through an operator-supplied authenticated HTTPS
ingress. Keep its URL, outbound identity references, trust profile, and exact
MCP_ALLOWED_HOSTSinAgentConfig.
Deploy with agent-connector-sdk-deployment
Provision this package with the consolidated agent-connector-sdk-deployment
workflow. It selects an installed-package, editable-source, or immutable-container
path; records only runtime secret and TLS-profile references in AgentConfig; and
runs doctor, registration, policy, observability, and rollback gates. Ask your agent
to "deploy archivebox-api with agent-connector-sdk-deployment".
| Install mode | Command |
|---|---|
| Installed package | uv tool install "archivebox-api[mcp]", then run archivebox-mcp |
| Editable source | uv pip install -e ".[agent]", then run archivebox-mcp |
| Immutable container | deploy registry.example.invalid/archivebox-api@sha256:<digest> through the operator-selected orchestrator |
The repository embeds no deployment profile, credential value, certificate path, or
environment-specific endpoint. Supply those at runtime through AgentConfig and the
configured secret provider.
Governed capability contract
This package ships a compact canonical skill surface with specialist procedures
kept as referenced workflows. The current MCP tools, skill metadata,
connector_manifest.yml, ontology, mappings, shapes, fixtures, migrations,
tool-schema fingerprints, and certification metadata form one versioned
capability contract. Validate them together; do not rely on stale tool names or
historical per-task skill wrappers.
Runtime endpoints, credentials, certificate trust, tenant identity, retention, and observability policy are deployment inputs and are never packaged values. See Configuration, trust, and privacy before enabling a network transport, connector ingestion, Arbora delegation, or trace export.
Metadata
Release files for archivebox-api 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| archivebox_api-2.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / archivebox_api-2.4.0-py3-none-any.whl
| Download URL | archivebox_api-2.4.0-py3-none-any.whl |
|---|---|
| Size | 79.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0e0df324bc40988eebf685d59a454d787f986bd59246839d301626a2e00f196
|
|
BLAKE2b-256 checksum How to use checksums |
d20a4d9a6acbc8550662b071dd42905306ff14a02ea0d20464cb9501700b7861
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|