convez.ai
MCP ServerIntegração & APIsAvançado
Knuckles-Team

ArchiveBox API MCP Server

Knuckles-Team/archivebox-api

MCP server para automação de arquivamento web com agentes IA

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP e API para integrar ArchiveBox com agentes de IA. Oferece interface CLI, API REST e MCP com suporte a agentes Pydantic AI, incluindo roteamento de ações otimizado, segurança em nível enterprise e telemetria nativa com OpenTelemetry.

Instalação

$npx convez-ai Knuckles-Team/archivebox-api

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
50%
Último commit
há 2 dias
Versão
v2.6.1
Issues abertas
0
Contribuidores
3

Casos de uso

  • Arquivar e gerenciar coleções de URLs via agentes IA
  • Integrar ArchiveBox em workflows de automação e pipelines
  • Consultar e manipular snapshots arquivados programaticamente

Veredito

MCP server maduro e bem-estruturado para ArchiveBox com suporte robusto a agentes, segurança enterprise e telemetria. Ideal para integrações em sistemas de automação que precisam gerenciar acervos web via IA.

README

A tradução para o português deste README ainda está na fila.

Archivebox Api

CLI or API | MCP | Agent

PyPI - Version MCP Server PyPI - Downloads GitHub Repo stars GitHub forks GitHub contributors PyPI - License GitHub GitHub last commit (by committer) GitHub pull requests GitHub closed pull requests GitHub issues GitHub top language GitHub language count GitHub repo size GitHub repo file count (file type) PyPI - Wheel PyPI - Implementation

Version: 0.32.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

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: Comprehensive 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-utilities ecosystem:

Concept IDPillar NameDomainImplementation Details in archivebox-api
ECO-4.0Ecosystem & PeripheralsTool Interface & MCP FactoryProvides FastMCP server wrapper, action routing tools, and dynamic schema exposures.
ECO-4.1Ecosystem & PeripheralsA2A Network & ConsensusManages agent peer discovery, routing tables, and consensus.
OS-5.1Agent OS InfrastructureSecurity & AuthImplements token-based OIDC access control, JWT filters, and Eunomia validation.
OS-5.4Agent OS InfrastructureTelemetry & ObservabilityDelivers warning suppressions, JSON progress logging, and error tracing.

Environment Variables

Configure the runtime environment by creating a .env file based on .env.example:

Env VariableTypeDefaultDescription
ARCHIVEBOX_BASE_URLStringhttp://localhost:8000Canonical endpoint URL for the backend ArchiveBox API.
ARCHIVEBOX_URLStringhttp://localhost:8000Fallback alias/alternative for ARCHIVEBOX_BASE_URL.
ARCHIVEBOX_USERNAMEStringNoneUsername for authentication.
ARCHIVEBOX_PASSWORDStringNonePassword for authentication.
ARCHIVEBOX_API_KEYStringNoneAPI Key for token-less header authentication.
ARCHIVEBOX_TOKENStringNonePre-configured authentication token.
ARCHIVEBOX_SSL_VERIFYBooleanFalseEnable/disable SSL certificate validation.
AUTHENTICATIONTOOLBooleanTrueToggle to enable/disable the Authentication MCP toolset.
CORETOOLBooleanTrueToggle to enable/disable the Core ArchiveBox MCP toolset.
CLITOOLBooleanTrueToggle to enable/disable the CLI command MCP toolset.
EUNOMIA_TYPEStringnonePolicy mode: none, embedded, or remote.
EUNOMIA_POLICY_FILEStringmcp_policies.jsonPath to the local policy file when using embedded mode.
ENABLE_OTELBooleanTrueEnable/disable OpenTelemetry metrics/traces exporter.
OTEL_EXPORTER_OTLP_ENDPOINTStringNoneEndpoint for the OpenTelemetry collector.

CLI or API Usage

You 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",
    verify=True
)

# 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

This server utilizes dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.

Available MCP Tools

  • archivebox_authentication (AUTHENTICATIONTOOL=True): Manage token exchanges and validation (get_api_token, check_api_token).
  • archivebox_core (CORETOOL=True): Manage core collections (get_snapshots, get_snapshot, get_archiveresults, get_tag).
  • archivebox_cli (CLITOOL=True): Directly execute ArchiveBox command line functions (cli_add, cli_list, cli_update).

Dynamic Tool Selection & Visibility

This MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows you to restrict the set of exposed tools in order to prevent blowing up the LLM's context window.

You can configure tool filtering via multiple input channels:

  • CLI Arguments: Pass --tools or --toolsets (or their disabled counterparts --disabled-tools and --disabled-toolsets) during startup.
  • Environment Variables: Define standard environment variables:
    • MCP_ENABLED_TOOLS / MCP_DISABLED_TOOLS
    • MCP_ENABLED_TAGS / MCP_DISABLED_TAGS
  • HTTP SSE Request Headers: Pass custom headers during transport initialization:
    • x-mcp-enabled-tools / x-mcp-disabled-tools
    • x-mcp-enabled-tags / x-mcp-disabled-tags
  • HTTP SSE Request Query Parameters: Append query parameters directly to your transport connection URL:
    • ?tools=tool1,tool2
    • ?tags=tag1

When query strings or parameters are supplied, 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 your 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 seamlessly 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-utilities core, standard security parameters are fully supported:

Access Control & Policy Enforcement

  • Eunomia Policies: Fine-grained, policy-driven tool authorization. Supports none, local embedded (mcp_policies.json), or centralized remote modes.
  • 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

FeatureFunctionalityEnablement
Tool GuardSensitivity inspection with human-in-the-loop validationEnabled by default
Prompt Injection DefenseInput scanning, repetition monitoring, and recursive loop blocksEnabled by default
Context Safety GuardStuck-loop detectors and contextual overflow preemptive alertsEnabled by default

Installation

Install the Python package locally:

# Using uv (highly recommended)
uv pip install archivebox-api[all]

# Using standard pip
python -m pip install archivebox-api[all]

Documentation

The complete documentation is published as the official documentation site and is the recommended reference for installation, deployment, and day-to-day operation.

PageContents
Installationpip, source, extras, prebuilt Docker image
Deploymentrun the MCP and agent servers, Compose, Caddy + Technitium, env config
Usagethe MCP tools, the Api client, the CLI
Backing Platformdeploy ArchiveBox with Docker
Overviewecosystem role, configuration, architecture
Conceptsconcept registry (CONCEPT:ABOX-*)

AGENTS.md is the canonical contributor/agent guidance.


Contribute

Contributions are welcome! Please ensure code quality by executing local checks before submitting pull requests:

  • Format code using ruff format .
  • Lint code using ruff check .
  • Validate type-safety with mypy .
  • Execute test suites using pytest

Available MCP Tools

Tool ModuleToggle Env VarEnabled by DefaultDescription & Nested Methods
AuthenticationAUTHENTICATION_TOOLTrueRegister authentication management tools.
CONCEPT:OS-5.1 — Security & Auth Action-routed methods: `check_api_token`, `get_api_token`. |

| Core | CORE_TOOL | True | Manage archivebox core operations. Action-routed methods: get_any, get_archiveresults, get_snapshot, get_snapshots, get_tag. | | Cli | CLI_TOOL | True | Manage archivebox cli operations. Action-routed methods: cli_add, cli_list, cli_remove, cli_schedule, cli_update. |

Additional Deployment Options

archivebox-api can also run as a local container (Docker / Podman / uv) or be consumed from a remote deployment. The Deployment guide has full, copy-paste mcp_config.json for all four transports — stdio, streamable-http, local container / uv, and remote URL:

  • Local container / uv — launch the server from mcp_config.json via uvx, docker run, or podman run, or point at a local streamable-http container by url.
  • Remote URL — connect to a server deployed behind Caddy at http://archivebox-mcp.arpa/mcp using the "url" key.
Ver o original no GitHub

Bom para

Relacionados