antahkarana

MCP安全风控

提供方 maikunari

安全风控 Streamable HTTP API Key 社区 / 第三方 Claude
查看接入方式

Antaḥkaraṇa is a platform-agnostic persistent memory layer MCP server for AI agents, providing Buddhi-evaluated memory storage, semantic recall, and forgetting, and is suitable for multi-client AI workflows such as Claude Code and OpenClaw.

一句话选型结论

按资料字段整理

antahkarana 属于安全风控类 MCP 服务器,Streamable HTTP,API Key,可直接接入 Claude,有可直接复制的远程端点配置。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类安全风控 传输方式Streamable HTTP 鉴权API Key 部署方式远程部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

安全风控
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

Blend Deployment AI Agent Memory MCP Server Python Persistent Storage Semantic Search Vector Database Local Embeddings Secret Redaction Security

支持客户端

适用场景

Blend DeploymentAI Agent MemoryMCP Server

安装与配置

Streamable HTTP API Key
新一代远程传输,替代 SSE
cd antahkarana python3.12 -m venv .venv source .venv/bin/activate pip install "mcp<2" zvec "fastembed>=0.8.1,<0.9" google-re2 pyyaml python-dotenv

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
资产与漏洞排查

盘点资产、扫漏洞、看暴露面。

日志与审计

汇总日志、查异常行为。

合规检查

按规则检查配置与权限是否合规。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude,换客户端不用重新研究配置。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在安全风控场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
antahkarana当前 未标注 Streamable HTTP 远程部署 有 2026-09-25
Cyber Strike AI 75 未标注 未标注 无 2026-05-17
mcp-for-beginners 未标注 stdio · 本地进程 本地部署 有 2026-04-13
casdoor 未标注 stdio · 本地进程 本地部署 有 2026-04-12
kubeshark 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Modelcontextprotocol C22988b0 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

安全风控
字段来自项目仓库与公开索引,中文说明由本站标注
提供方maikunari上游标注的维护方 maikunari
分类安全风控本站按上游分类展示
连接方式Streamable HTTP新一代远程传输,替代 SSE
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · python本地安装时用到的包标识与运行时
部署类型远程部署上游给出的部署形态
最近核验2026-09-25上游最后核验时间

详细介绍

14.9 KB
来自项目仓库与上游目录的原文,未做删改

Antaḥkaraṇa

A platform-agnostic persistent memory layer for AI agents, built as a standalone MCP server. Plug it into Claude Code, OpenClaw, Cowork, or any MCP-compatible client — your knowledge persists across every tool you use. The architecture is grounded in the Vedic Antaḥkaraṇa (inner instruments of mind) framework: Buddhi (an open model on OpenRouter, DeepSeek V4.1 Flash by default) evaluates every input before Chitta (Zvec + SQLite) stores it, so memory is discriminated, not just accumulated.

Quick Start```bash

cd antahkarana
python3.12 -m venv .venv
source .venv/bin/activate
pip install "mcp<2" zvec "fastembed>=0.8.1,<0.9" google-re2 pyyaml python-dotenv


Create `.env`:```
OPENROUTER_API_KEY=your_key_here
# Optional: the OpenRouter model id Buddhi asks (default deepseek/deepseek-v4.1-flash)
ANTAHKARANA_BUDDHI_MODEL=
# Optional: Jev shadow judge (see &quot;Determination log and Jev shadow mode&quot;)
TYPESAFE_API_KEY=

Buddhi sends the (scrubbed) memory text to OpenRouter's chat completions API with a strict JSON schema, so OPENROUTER_API_KEY is the only key it needs. Embeddings run locally: the pinned nomic-ai/nomic-embed-text-v1.5 model (768 dims, Apache-2.0, ONNX Runtime via fastembed) needs no key, and no text leaves the machine to be embedded. The first remember or recall downloads the model files (about 550 MB) into the Hugging Face cache; after that it works offline.

Run the server directly:```bash
python -m src


Run the tests (no network or API keys needed):```bash
pip install pytest
python -m pytest

Live checks are opt-in: they run only with OPENROUTER_API_KEY (Buddhi), TYPESAFE_API_KEY (Jev) or ANTAHKARANA_LIVE_EMBEDDINGS=1 (downloads the embedding model) set.

Connecting to Claude Code

Register the server with claude mcp add. It has no working-directory setting, so give the install's .env absolute paths (ANTAHKARANA_DATA_DIR=/path/to/antahkarana/data, ANTAHKARANA_CONFIG_DIR=/path/to/antahkarana/config) and set PYTHONPATH so python -m src imports from any directory. The server reads .env from the install directory wherever it is started, so the keys stay there.```bash
claude mcp add --scope user antahkarana \
-e PYTHONPATH=/path/to/antahkarana \
-- /path/to/antahkarana/.venv/bin/python -m src


Check it with `claude mcp get antahkarana`, or `/mcp` in a session.

Under stdio each Claude Code session starts its own server, and the Zvec vector store allows one open writer, so a second concurrent session fails to connect. To use Antaḥkaraṇa from several sessions at once, run the shared server below instead.

## Running a shared server

Set `ANTAHKARANA_TRANSPORT=http` and the server runs once over MCP streamable HTTP at `http://127.0.0.1:ANTAHKARANA_PORT/mcp` (default port `8799`); every client on the machine connects to that one process. stdio stays the default.```bash
ANTAHKARANA_TRANSPORT=http ANTAHKARANA_PORT=8799 python -m src

To keep it running, install it as a systemd user service. contrib/antahkarana.service is an example for an install at ~/.local/share/antahkarana/app; edit its paths and port, then:```bash
cp contrib/antahkarana.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now antahkarana
journalctl --user -u antahkarana -f # logs


Then register Claude Code against the URL instead of the command (remove a stdio registration first with `claude mcp remove antahkarana -s user`):```bash
claude mcp add --scope user --transport http antahkarana http://127.0.0.1:8799/mcp

The HTTP endpoint has no authentication: any process on the machine that can reach the port can read and write memories. It always binds 127.0.0.1, so nothing off the machine can reach it. Stop the service before running python -m src.dvarapala audit or purge, which need the store to themselves.

Connecting to OpenClaw

Add as an MCP tool source: point your MCP client at the same stdio command, or at the shared server's URL (see "Running a shared server"):```
command: /path/to/antahkarana/.venv/bin/python
args: ["-m", "src"]
cwd: /path/to/antahkarana


Any MCP-compatible client can connect the same way. A client with no `cwd` setting needs the absolute `.env` paths and `PYTHONPATH` described for Claude Code.

## Tools

### `remember`

Store a memory through the Buddhi evaluation pipeline.

| Input | Type | Required | Description |
|-------|------|----------|-------------|
| `content` | string | yes | The text to remember |
| `scope` | string | no | Override Buddhi&#x27;s scope inference (e.g. `/project/jozu/architecture`) |
| `importance` | float | no | Override Buddhi&#x27;s importance assessment (0.0–1.0) |
| `source_agent` | string | no | Which agent is storing this (`claude-code`, `openclaw`, etc.) |

Returns: `memory_id`, `scope`, `importance`, `categories`, or `stored: false` if Buddhi determines the content is too trivial. If Buddhi&#x27;s model call fails (no key, network, HTTP error, timeout, or an answer that does not match the schema exactly), nothing is stored and the result is `stored: false` with `reason: &quot;buddhi_error&quot;` and a `note` saying why. Secrets are removed from every input first (see &quot;Secrets keeper&quot;): when any were, the result adds `redactions` (field, kind and count, never the value) and a `note`. Content that is nothing but a secret returns `stored: false` with `reason: &quot;secret_only&quot;` and reaches no model.

### `recall`

Retrieve relevant memories via semantic search with composite scoring.

| Input | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | yes | What to search for |
| `limit` | int | no | Max results (default 5) |
| `scope` | string | no | Restrict to a scope subtree |
| `include_latent` | bool | no | Include dormant memories (default false) |

Returns: Ranked list of memories with `content`, `scope`, `importance`, `score`, `state`. A secret in the query is removed before it is embedded; the result then echoes the scrubbed query and adds `redactions` (field, kind and count, never the value).

Scoring: `0.6 * semantic_similarity + 0.2 * importance + 0.2 * recency` (30-day half-life exponential decay).

### `forget`

Transition memories to latent (dormant) or dissolved (trace only) state.

| Input | Type | Required | Description |
|-------|------|----------|-------------|
| `memory_id` | string | no* | Specific memory to forget |
| `scope` | string | no* | Target all memories in this scope subtree |
| `force_dissolve` | bool | no | Skip latent, go straight to dissolved (default false) |

\* At least one of `memory_id` or `scope` is required.

Latent keeps the memory&#x27;s text and vector, since it is reversible. Dissolved purges them: the content becomes `[dissolved]` (the row keeps its id, scope, categories and dates as the trace), the vector is deleted, the linked `determinations` rows lose their `input_text`, and linked `feedback` text is cleared. SQLite runs with `secure_delete` and the WAL is truncated. Zvec only hides a deleted vector until the collection is rebuilt, which `python -m src.dvarapala purge` does.

## Secrets keeper (Dvārapāla)

`src/dvarapala/` keeps API keys, tokens, passwords and other credentials out of Antaḥkaraṇa. It runs first in `remember` and `recall`, before Buddhi, Jev, the embedder or Chitta see anything, and replaces each secret with a typed placeholder such as `[secret:stripe-access-token]`. The rest of the memory is still stored. The value is never stored, logged, returned or sent to a model.

- **Detection is local.** gitleaks&#x27; default rules (`src/dvarapala/gitleaks.toml`, v8.30.1, MIT, compiled with RE2), an OpenRouter key rule (gitleaks has none), three rules for secrets written in prose (`password is …`, `login … is user / pass`, passwords in URLs), and an entropy backstop for long random-looking tokens.
- **Where it applies.** `remember` content, the `scope` and `source_agent` overrides (a secret there drops the override), the `recall` query, and Buddhi&#x27;s own `scope` and `categories` in case the model echoes a secret. The whole determination row is scrubbed before it is logged.
- **Fails closed.** If the keeper cannot load or run, `remember` and `recall` refuse and nothing is sent anywhere. The server does not start without it.
- **Write guard.** Chitta checks every text it writes and raises `SecretInWrite` instead of storing a secret, so a future write path that forgets to scrub fails loudly.
- **False positives.** A value that is not a secret can be allowed in `config/dvarapala.yaml`. There is deliberately no per-call override.
- **Keep a pointer, not the value.** &quot;The FF Stripe key is in 1Password under &#x27;FF Stripe live&#x27;&quot; is stored as written.

Secrets stored before the keeper existed can be found and removed. Stop the server first:```bash
python -m src.dvarapala audit   # read-only: counts by table, column and kind, row ids; never values
python -m src.dvarapala purge   # scrub, re-embed scrubbed text, dissolve secret-only memories,
                                # purge old dissolved rows, VACUUM, rebuild vectors, verify

purge re-embeds scrubbed memories that stay active with the local embedding model; if the model cannot load, it changes nothing. Neither command can reach backups or snapshots of data/, or text already sent to Buddhi's model or Jev, so rotate every credential the audit lists.

It does not protect against a secret that is already in the calling agent's context, its model provider or its transcript before remember runs; secrets described in words or split across calls; or personal health information, which is not a pattern. Not built yet: keeping content out of debug logs, a Jev secret check on scrubbed text once Jev decides, and an optional vault.

Determination log and Jev shadow mode

Every remember call writes one row to the determinations table in chitta.db: the scrubbed input text in input_text, the stored memory's ID in memory_id, and a JSON determination holding Buddhi's answer under buddhi (provider, the requested model, the served model_version, served_by, latency_ms, status and the raw JSON response, or the error when the call failed), the Jev shadow answer, decided_by, the redactions the secrets keeper made, the source_agent, and the final outcome (stored or not, with the memory ID, scope, importance and categories after caller overrides). The whole row is scrubbed before it is written. decided_by is &quot;buddhi&quot;, or &quot;dvarapala&quot; for content refused as nothing but a secret, which is logged with no model answers. A logging failure never fails remember.

A refused input is logged as [redacted: likely secret] instead of its text when Jev's secret probability is at or above SECRET_THRESHOLD, or when Jev gave no answer (key unset, error or timeout), since then there is no secret signal. Stored inputs are logged with their scrubbed text.

With TYPESAFE_API_KEY set, Buddhi also asks TypeSafe's Jev (src/buddhi/jev.py, pinned to jev-1.13.0) the keep-or-discard question, in parallel with Buddhi's model. Jev sees only the memory text. Its answer (kind, per-kind probabilities, keep probability, secret probability, would-store) is logged, and Buddhi's store still decides. Any Jev error, or no answer within 3 s of the call starting, is logged as error or timeout and never changes whether the memory is stored. Without the key, Jev is off.

Inspect disagreements:```bash
sqlite3 data/chitta.db "SELECT input_text, determination FROM determinations
WHERE json_extract(determination, '$.jev.status') = 'ok'
AND json_extract(determination, '$.jev.store') != json_extract(determination, '$.buddhi.response.store')"


## Project Structure```
antahkarana/
├── config/
│   ├── buddhi_prompt.yaml      # Buddhi determination prompt
│   ├── dvarapala.yaml          # Secrets keeper allowlist
│   └── ahamkara.yaml           # Identity config (Phase 4)
├── src/
│   ├── server.py               # MCP server entry point (Prāṇa)
│   ├── transport.py            # stdio or shared streamable-HTTP settings
│   ├── dvarapala/
│   │   ├── keeper.py           # Secrets keeper: detect and scrub
│   │   ├── audit.py            # Find and purge secrets already stored
│   │   └── gitleaks.toml       # Vendored gitleaks rules (MIT, GITLEAKS_LICENSE)
│   ├── chitta/
│   │   ├── models.py           # MemoryRecord, RecallResult dataclasses
│   │   ├── schema.py           # SQLite DDL + init
│   │   └── store.py            # Zvec + SQLite unified store
│   ├── buddhi/
│   │   ├── engine.py           # Buddhi determination via OpenRouter
│   │   ├── prompts.py          # Prompt loading from YAML
│   │   ├── jev.py              # Jev keep-or-discard judge (shadow mode)
│   │   └── embeddings.py       # Local embedding model (768-dim)
│   ├── manas/
│   │   └── tools.py            # remember, recall, forget logic
│   ├── guna/
│   │   └── engine.py           # stub (Phase 3)
│   ├── ahamkara/
│   │   └── identity.py         # stub (Phase 4)
│   └── adhyavasaya/
│       └── feedback.py         # stub (Phase 5)
├── contrib/
│   └── antahkarana.service     # Example systemd user unit for the shared server
├── tests/                      # pytest; fixtures/buddhi_examples.yaml holds kept/refused examples
└── data/                       # Runtime data (gitignored)
    ├── chitta.db               # SQLite
    └── chitta_vectors/         # Zvec collection

Phases

Phase 1 — Core Loop (current)
Remember + recall + forget. Buddhi evaluates importance/scope/categories via an open model on OpenRouter. Chitta stores in Zvec (semantic vectors) + SQLite (metadata) with dual-write transactional safety.

Phase 2 — Buddhi Intelligence
Consolidation on save, atomic fact extraction, contradiction detection, smarter scope inference.

Phase 3 — Triguṇa Engine
Dynamic Sattva/Rajas/Tamas scoring. Memories drift toward clarity (active), activity (in flux), or dormancy (latent) based on lifecycle events. System health diagnostics.

Phase 4 — Ahaṃkāra (Identity)
Identity-aware memory. Buddhi incorporates persona, active projects, and preferences when making determinations.

Phase 5 — Adhyavasāya (Learning)
Feedback loop. User corrections stored as meta-vāsanās. Buddhi's determination criteria improve over time.

Tech Stack

Component Technology
Reasoning (Buddhi) DeepSeek V4.1 Flash (deepseek/deepseek-v4.1-flash) on OpenRouter; ANTAHKARANA_BUDDHI_MODEL overrides
Keep-or-discard shadow judge TypeSafe Jev (jev-1.13.0), optional
Embeddings nomic-ai/nomic-embed-text-v1.5 @ 768 dims, local via fastembed (ONNX Runtime), pinned revision
Vector store (Chitta) Zvec
Structured store SQLite
MCP framework mcp Python SDK (FastMCP)
Transport stdio (default) or streamable HTTP (ANTAHKARANA_TRANSPORT=http)

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
antahkarana 怎么安装?

在客户端按下面的安装命令接入:cd antahkarana python3.12 -m venv .venv source .venv/bin/activate pip install "mcp<2" zvec "fastembed>=0.8.1,<0.9" google-re2 pyyaml python-dotenv。装完在客户端配置里引用同一个包或端点。

antahkarana 怎么在 Claude 里配置?

它的传输方式是Streamable HTTP,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

antahkarana 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

antahkarana 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

antahkarana 支持哪些客户端?

资料标注支持 Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

antahkarana 能提供哪些能力?

资料显示能力标签包括 Blend Deployment、AI Agent Memory、MCP Server、Python、Persistent Storage、Semantic Search。具体工具清单以官方文档为准。

antahkarana 需要什么运行环境?

运行时为 python;属于远程端点,不需要在本地装运行时。

antahkarana 是本地还是远程?

它是远程端点,连服务地址即可。传输方式为Streamable HTTP。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-09-25。