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 employee-scope tokens. Traverse and provenance route company-scoped tokens to the company graph and other tokens to the workspace graph; search retains that company-graph path until an org-wide search endpoint is available. 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hebbianvault_mcp-0.4.1.tar.gz (77.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hebbianvault_mcp-0.4.1-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file hebbianvault_mcp-0.4.1.tar.gz.

File metadata

  • Download URL: hebbianvault_mcp-0.4.1.tar.gz
  • Upload date:
  • Size: 77.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for hebbianvault_mcp-0.4.1.tar.gz
Algorithm Hash digest
SHA256 22fe0e2fbf65efdb2d4b54a102ff48df432c98603b5b69e01431b38560b0a8b7
MD5 7394b6bebbf66979a7c83bf0bbe879db
BLAKE2b-256 60ff4793d16dd8913cc8a5430c004f6067c48358ec6115177f965c6087947dae

See more details on using hashes here.

Provenance

The following attestation bundles were made for hebbianvault_mcp-0.4.1.tar.gz:

Publisher: release.yml on hebbianvault/hebbian-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hebbianvault_mcp-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hebbianvault_mcp-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c26e3b35634e9f1e38e55a675be099f1d34db32ca63858f915e935eed719013a
MD5 3a69a3ae0dda8501f1dc2206ea89e509
BLAKE2b-256 dff73131019615ea694aee22989b9a9ac37a5c964abfdd0e1ea0dd6b5b0e54ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for hebbianvault_mcp-0.4.1-py3-none-any.whl:

Publisher: release.yml on hebbianvault/hebbian-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.6.0

2 files

0.5.0

2 files

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

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