Skip to main content

Allem MCP Server

Connect any MCP-capable AI assistant (Claude Code, Claude Desktop, …) to the Allem governance platform. Once connected, the assistant can register agents, run pre-flight authorization checks, log actions to the tamper-evident audit chain, read compliance intelligence, manage authorization scopes, and cryptographically verify the audit chain — which means it can write and test an Allem integration for you.

Transport: stdio (runs locally next to your dev environment).

60-second setup

1. Get the two required settings

  • ALLEM_BASE_URL — where your Allem platform lives. There is no default on purpose — you must say which environment you mean:
    • local development: http://localhost:8000
    • production: your hosted Allem URL
  • ALLEM_API_KEY — an org API key (alm_sk_test_... or alm_sk_live_...), created in the Allem console under Settings → API Keys.

2. Install it

pip install allem-mcp

That gives you an allem-mcp command. Every line below assumes it is on your PATH — which it is if you installed it into the environment your assistant runs in, or with pipx install allem-mcp.

backend/tests/test_get_started_snippets.py runs this install line in a clean virtualenv on every CI run, and starts the allem-mcp command it produces and speaks MCP to it. Until 2026-09-09 this README opened with a path into a repository checkout, because the package had never been published and there was nothing else to point at.

3a. Claude Code

claude mcp add allem \
  --env ALLEM_BASE_URL=http://localhost:8000 \
  --env ALLEM_API_KEY=alm_sk_test_YOUR_KEY \
  -- allem-mcp

3b. Claude Desktop

Add to claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "allem": {
      "command": "allem-mcp",
      "env": {
        "ALLEM_BASE_URL": "http://localhost:8000",
        "ALLEM_API_KEY": "alm_sk_test_YOUR_KEY"
      }
    }
  }
}

4. Try it

Ask your assistant: "List my Allem agents and verify the audit chain."

Tools

Tool What it does Writes?
allem_check_action Pre-flight check: may this agent do this action? Denials come back as data (reason, severity, failed checks, any freeze) — never as an error. records the check in the audit chain
allem_log_action Record an action into the hash-chained audit log; returns event hash + chain height. append-only
allem_list_agents List registered agents with status and mode. read-only
allem_get_agent One agent in full: record + Five Threads scores + freeze state. read-only
allem_register_agent Onboard an agent (idempotent; starts in observation mode). creates
allem_get_compliance_status healthy / warning / critical / frozen, with reasons. read-only
allem_get_thread_explanations Plain-language explanation of each thread score. read-only
allem_get_framework_assessment SOC 2 / ISO 27001 / GDPR / EU AI Act control assessments. read-only
allem_get_recommendations Prioritized governance recommendations. read-only
allem_list_events / allem_get_event Browse the audit chain. allem_list_events returns {events, lifecycle_events_excluded, how_many_were_excluded}: the server applies the exclusion and says how many run starts, heartbeats and run ends it left out of the window. The client holds no list of its own — event_type is free text an agent chooses, and a private vocabulary of reserved words here hid events Allem counted everywhere else. read-only
allem_list_verdicts Governance verdicts with filters (thread, severity, since) + pagination. read-only
allem_list_scopes An agent's authorization scope versions, newest first. read-only
allem_create_scope New scope version. Safe by design: versioned and audit-chained, never rewrites history. creates version
allem_activate_scope Switches the agent from observation to live enforcement. Marked destructive — after this, actions can be denied and freezes issued. changes behavior
allem_verify_chain Walk the whole chain and recompute every SHA-256 link — proof nothing was altered. read-only

Agents can be referenced by their friendly external_id (e.g. shuffle-triage-bot) everywhere — no need for database ids.

Deliberately not included

  • Freeze lift / unfreeze — requires a console admin login (session auth), not an API key. Un-freezing an agent is a human decision made in the Allem console; no API key, and therefore no MCP tool, can do it. Don't hunt for it here.
  • Anything else admin-session-gated (user management, API key management).

Development

cd sdk/allem-mcp
uv sync --extra dev
uv run --extra dev python -m pytest          # unit tests (mocked HTTP)
uv run python scripts/e2e_local.py           # end-to-end vs local platform
uv run python scripts/seed_evals.py          # seed data for evals.xml
npx @modelcontextprotocol/inspector uv run allem-mcp   # interactive inspector

Note: the dev venv is pinned to Python 3.11 (.python-version). Python 3.14 skips .pth files that carry the macOS hidden file flag, which breaks uv's editable installs — 3.11 matches the platform's locked stack and avoids this.

Follow-ups (out of scope for v1)

  • Publishing to an MCP registry (with Asif).
  • Website / llms.txt update to advertise the server.
  • Remote streamable-HTTP transport, if demand appears.

Metadata

Release files for allem-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for allem-mcp 0.1.1
File Size Uploaded Provenance
allem_mcp-0.1.1.tar.gz 69.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for allem-mcp 0.1.1
File Interpreter ABI Platform
allem_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 86.8 kB

Release files / allem_mcp-0.1.1.tar.gz

Download URL allem_mcp-0.1.1.tar.gz
Size 69.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8e2fe4b6d8ba3f101b83ff2fedaace2e35e3c07e70751191de925abbe5c2ec5c
BLAKE2b-256 checksum
How to use checksums
567171ee792b4d7e526e03a5d5f9eef542847d1852066a3ac12ea90ae30e7776
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / allem_mcp-0.1.1-py3-none-any.whl

Download URL allem_mcp-0.1.1-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab64f89e4af002c3261b0114ce62619faa93b631169f3a2c4994c718e3eb91cf
BLAKE2b-256 checksum
How to use checksums
b08edeb3bbce8c35d8c0a71029334ffa47adde926e89f3df19d64c9c9464786a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Security for allem-mcp 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for allem_mcp-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page