Humsana Mcp

io.github.sriramnatrajhen由 GitHub 帳號 sriramnatrajhen 發布v1.1.3更新於 Oct 24, 2026

Detect developer stress, focus, fatigue from typing. Block dangerous commands when tired.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機 MCP 伺服器,依打字行為讀取開發者的壓力、專注度與疲勞度,並對 shell 指令與 AI 檔案改寫加上安全聯鎖。

可以做什麼
從本機守護程序的行為資料讀取開發者目前的壓力、專注度與疲勞程度,並在執行前檢查某個 shell 指令是否會被攔截。透過安全聯鎖執行 shell 指令,疲勞度高時對危險指令提出警告或直接阻擋。寫入檔案時防止 AI 大規模改寫,刪除行數超過設定門檻時警告或阻擋,並將被阻擋的寫入保存待審。將安全覆寫記錄到本機稽核檔,並可選擇通知 webhook。
適用情境
適合希望在疲累時避免執行破壞性指令或接受 AI 大規模改寫的開發者,尤其是桌面端的 AI 輔助編碼情境。
執行需求
作為本機 stdio 程序由桌面用戶端啟動(npm 套件需要 Node.js)。需要另外安裝的 Humsana 守護程序(透過 pip 安裝)在終端機中執行。設定存放在本機設定檔;未宣告任何 API 金鑰或環境變數。
安裝前請注意
預設為 dry-run 模式,指令僅被模擬;切換到 live 模式後會實際執行 shell 指令並寫入檔案。被阻擋的指令可用覆寫語句繞過,該操作會被記錄並可能傳送到已設定的 webhook。行為資料保留在本機,可選 webhook 除外。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Humsana Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@humsana/mcp-server

Cognitive Security for AI-assisted development.

🛡️ "The breathalyzer for your terminal."

Humsana prevents you from running dangerous commands or accepting large AI code rewrites when you're fatigued. Think of it as an industrial safety interlock, but for your brain.

What It Does

Command Protection (safe_execute_command)

SituationResult
You're fresh, running ls✅ Runs normally
You're fresh, running rm -rf⚠️ Warning, allowed
You're tired, running rm -rf⛔ BLOCKED — requires override

AI Rewrite Protection (safe_write_file)

SituationResult
AI writes new file✅ Allowed
AI rewrites 10 lines✅ Allowed
You're tired + AI deletes 30+ lines⚠️ Warning
You're tired + AI deletes 50+ lines⛔ BLOCKED — saved for review

Quick Start

1. Install the Daemon

bash
pip install humsana-daemonhumsana start

Keep this running in a terminal tab.

2. Install the MCP Server

bash
npm install -g @humsana/mcp-server

3. Configure Claude Desktop

Create/edit ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "humsana": {      "command": "node",      "args": ["/path/to/humsana-mcp/dist/index.js"]    }  }}

4. Restart Claude Desktop

Quit (Cmd+Q) and reopen.

5. Test It

Ask Claude: "What's my current state?"


Execution Modes

Humsana starts in dry-run mode for safety. Commands are simulated, not executed.

Dry-Run Mode (Default)

✅ [DRY RUN] Safety check passed.Command: `kubectl delete pods`This command WOULD have been executed.(Execution skipped: dry_run mode active)

Switching to Live Mode

When you trust the system, enable real execution:

Step 1: Create/edit ~/.humsana/config.yaml:

yaml
# Change this from 'dry_run' to 'live'execution_mode: live
# Optional: adjust thresholdsfatigue_threshold: 70write_warn_threshold: 30write_block_threshold: 50

Step 2: Restart Claude Desktop (Cmd+Q, reopen)

Step 3: Test with a safe command first:

Run `echo "live mode working"`

You should see actual output instead of "WOULD have been executed."


Configuration Reference

Create ~/.humsana/config.yaml:

yaml
# === EXECUTION MODE ===# 'dry_run' (default) - Simulates commands, nothing executed# 'live' - Actually executes commands and writes filesexecution_mode: dry_run
# === FATIGUE THRESHOLDS ===# Fatigue level (0-100) above which dangerous commands are blockedfatigue_threshold: 70
# Lines removed to trigger warning (when fatigued)write_warn_threshold: 30
# Lines removed to trigger hard block (when fatigued)write_block_threshold: 50
# === CUSTOM PATTERNS ===# Additional dangerous commands to blockdeny_patterns:  - "aws ec2 terminate"  - "docker rm -f"
# === NOTIFICATIONS ===# Webhook for Slack/PagerDuty (fires on safety overrides)webhook_url: https://hooks.slack.com/services/XXX/YYY/ZZZ

Override Protocol

When blocked, say:

OVERRIDE SAFETY PROTOCOL: [reason]

Example:

OVERRIDE SAFETY PROTOCOL: P0 production outage, need to restart pods

This is logged to ~/.humsana/audit.json and sent to your webhook.


Tools Available

ToolPurpose
get_user_stateGet current stress, focus, fatigue levels
check_dangerous_commandCheck if a command would be blocked
safe_execute_commandExecute shell commands with interlock
safe_write_fileWrite files with AI rewrite protection

Files & Folders

PathPurpose
~/.humsana/signals.dbBehavioral data from daemon
~/.humsana/config.yamlYour configuration
~/.humsana/activity.jsonActivity heartbeats (for fatigue)
~/.humsana/audit.jsonSafety event log
~/.humsana/pending_reviews/Blocked AI writes saved here

Privacy

🔒 100% Local.

  • All data stays on your machine
  • No network calls (except optional webhook)
  • No telemetry, no tracking
  • Fully auditable open-source code

Troubleshooting

"Daemon not running" error

Start the daemon in a terminal:

bash
humsana start

Commands not executing

Check your mode:

bash
cat ~/.humsana/config.yaml | grep execution_mode

If it says dry_run, change to live and restart Claude.

MCP not connecting

Verify your Claude Desktop config path:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Ensure the path to dist/index.js is correct

License

MIT

來源:README.md,提交 58003d1

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.1.3最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。