Skip to main content

hebbianvault-mcp (Python)

Python sibling of @hebbianvault/mcp. Connect a Python MCP host to your Hebbian workspace with the same 13 tools and the same configuration. A thin client; all intelligence and access control live in the Hebbian service.

Quick start

pip install hebbianvault-mcp
# or with uv (preferred)
uv add hebbianvault-mcp

Generate a token from your Hebbian integrations page (AI Tools tab → Generate token).

Host configuration

Use the configuration for your host below. Replace your_token_here with the token you generated.

Claude Code

claude mcp add hebbian -e HEBBIAN_API_TOKEN=your_token_here -- npx -y @hebbianvault/mcp

Codex (CLI + Desktop app)

codex mcp add hebbian --env HEBBIAN_API_TOKEN=your_token_here -- npx -y @hebbianvault/mcp

For the Codex desktop app, add this to ~/.codex/config.toml, or use Settings → MCP servers:

[mcp_servers.hebbian]
command = "npx"
args = ["-y", "@hebbianvault/mcp"]
env = { HEBBIAN_API_TOKEN = "your_token_here" }

Gemini CLI

gemini mcp add hebbian -e HEBBIAN_API_TOKEN=your_token_here npx -y @hebbianvault/mcp

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "hebbian": {
      "command": "npx",
      "args": ["-y", "@hebbianvault/mcp"],
      "env": { "HEBBIAN_API_TOKEN": "your_token_here" }
    }
  }
}

Cowork

{
  "mcpServers": {
    "hebbian": {
      "command": "npx",
      "args": ["-y", "@hebbianvault/mcp"],
      "env": { "HEBBIAN_API_TOKEN": "your_token_here" }
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "hebbian": {
      "command": "npx",
      "args": ["-y", "@hebbianvault/mcp"],
      "env": { "HEBBIAN_API_TOKEN": "your_token_here" }
    }
  }
}

Generic Agent

For an MCP-compatible agent that accepts a standard input/output command:

HEBBIAN_API_TOKEN=your_token_here npx -y @hebbianvault/mcp

Or use the Python package:

# pip install hebbianvault-mcp   (or: uv add hebbianvault-mcp)
HEBBIAN_API_TOKEN=your_token_here hebbian-mcp

Configuration

Set HEBBIAN_API_TOKEN (or HEBBIAN_TOKEN) env var:

HEBBIAN_API_TOKEN=your_token_here hebbian-mcp

Or write ~/.config/hebbian/mcp-tenant.json:

{
  "token": "your_token_here"
}
Variable Purpose
HEBBIAN_API_TOKEN Your token (required). HEBBIAN_TOKEN is also accepted.
HEBBIAN_API_URL Override the API base URL (Enterprise self-host). Defaults to the Hebbian SaaS API.
HEBBIAN_TENANT Optional workspace slug — only needed if your account belongs to more than one workspace.

Python server API

import os
os.environ["HEBBIAN_API_TOKEN"] = "your_token_here"
from hebbianvault_mcp import create_server
server = create_server()
# server.run() to start serving over stdio

Token scope

Your token decides what the adapter can see and do — a personal-workspace token gives access to your own knowledge; a company-workspace token gives access to the shared company workspace (where your role allows). Scope is decided by the Hebbian service. Search uses server-side full-text retrieval for every token scope, and the service decides which workspace a token searches. Traverse and provenance route company-scoped tokens to the company graph and other tokens to the workspace graph. If the advisory scope probe fails, the adapter caches the employee fallback for its process lifetime; restarting the MCP process clears that cached fallback.

Tools

Tool What it does
hebbian_read_node Read a single node by UUID
hebbian_search Full-text search nodes by title, summary, and note body
hebbian_ask Ask a question and get an answer backed by source quotes
hebbian_context Describe a task and a token budget, get back a salience-ranked context pack that fits
hebbian_capture Write one note, or batch-capture up to 25 notes, into your workspace
hebbian_traverse Explore nodes connected to a starting node
hebbian_provenance See where a node's knowledge came from
hebbian_salience See a node's recent activity over time
hebbian_recent_activity Catch up on recent changes in your workspace
hebbian_whoami Show the tenant, role, scope, and principal for your token
hebbian_usage Show your usage and spend-meter summary; optionally view company usage
hebbian_gdpr_export Export tenant data for a GDPR access request (owner access required)
hebbian_audit_log Retrieve tenant audit-log items[] (empty if no data), with optional limit and offset

Results only ever include what your token is allowed to see.

Development

uv venv && uv pip install -e ".[dev]"
pytest
ruff check src/ tests/

Node.js version

The canonical package is @hebbianvault/mcp on npm. This Python sibling has identical tools and configuration. Use whichever matches your MCP host environment.

License

Apache-2.0. See the root LICENSE file.

Metadata

Release files for hebbianvault-mcp 0.6.2

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

Source distribution (sdist)

Source distribution for hebbianvault-mcp 0.6.2
File Size Uploaded Provenance Actions
hebbianvault_mcp-0.6.2.tar.gz 84.0 kB With provenance Details for hebbianvault_mcp-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hebbianvault-mcp 0.6.2
File Interpreter ABI Platform Actions
hebbianvault_mcp-0.6.2-py3-none-any.whl Python 3 none any Details for hebbianvault_mcp-0.6.2-py3-none-any.whl

Total release size: 113.4 kB

Release files / hebbianvault_mcp-0.6.2.tar.gz

Download URL hebbianvault_mcp-0.6.2.tar.gz
Size 84.0 kB
Tags Source
SHA-256 checksum
How to use checksums
23b30a8e71ed8dfe9000c907f94adcb7e5d4e092b949fbdab8f830fffc7c798a
BLAKE2b-256 checksum
How to use checksums
a4d17c93e8cd1f63d0b82d03c60259a746a24c3fe426daef03d09da3aa02872a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Release files / hebbianvault_mcp-0.6.2-py3-none-any.whl

Download URL hebbianvault_mcp-0.6.2-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9182199abb1f0e95c010128feb7450f87f0583b95e73f0811686cbbba0d46a9b
BLAKE2b-256 checksum
How to use checksums
29290703071d8c90d5bc5c311a7572f5d5fa7928e7215b4e2a87bad33f8f0db3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Security for hebbianvault-mcp 0.6.2

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 hebbianvault_mcp-0.6.2.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 Nov 3, 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.

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