Skip to main content

MCP server exposing SoulPolicy drift / guardrail primitives to MCP clients (Claude Desktop, Cursor, ...).

Project description

soulpolicy-mcp

MCP server 让 Claude Desktop / Cursor 直接调用 SoulPolicy primitive。

安装

pip install soulpolicy soulpolicy-mcp

Claude Desktop 配置

把下面加到 ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "soulpolicy": {
      "command": "python",
      "args": ["-m", "soulpolicy_mcp"],
      "env": {
        "SOULPOLICY_API_KEY": "sk_live_xxx"
      }
    }
  }
}

重启 Claude Desktop 后会看到 5 个新工具:

  • soulpolicy_create_baseline
  • soulpolicy_drift_check
  • soulpolicy_baseline_report
  • soulpolicy_drift_replay
  • soulpolicy_drift_feedback

Cursor 配置

.cursor/mcp.json

{
  "mcpServers": {
    "soulpolicy": {
      "command": "python",
      "args": ["-m", "soulpolicy_mcp"],
      "env": { "SOULPOLICY_API_KEY": "sk_live_xxx" }
    }
  }
}

直接命令行启动

SOULPOLICY_API_KEY=sk_live_xxx soulpolicy-mcp
# 等同:
SOULPOLICY_API_KEY=sk_live_xxx python -m soulpolicy_mcp

用例:让 Claude 自检它自己的输出

You: Create a customer-support baseline from these 5 healthy replies …
Claude: [calls soulpolicy_create_baseline] -> bl_xxx
You: Now check this draft response: "…"
Claude: [calls soulpolicy_drift_check]
        Result: severity=warn, z_score=2.3 — there's a topical shift away
        from your baseline. Want me to revise?

Project details


Download files

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

Source Distribution

soulpolicy_mcp-0.2.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

soulpolicy_mcp-0.2.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file soulpolicy_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: soulpolicy_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for soulpolicy_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ff3f60cc0a437c89c1d0fe40f31bf1dc0fb08da3eabf4065066db5b9082caada
MD5 a4ca5160f852f60082973defb8f4474d
BLAKE2b-256 4d1146c1920052aa04f12df71db201df2518a5c8effd97a75fa4f96a73e0ea48

See more details on using hashes here.

File details

Details for the file soulpolicy_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: soulpolicy_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for soulpolicy_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63c6a0122ed2ab1ae6e4e4ce8cd9c03cdb0cf2b6209e02463aa9e2579962f9f4
MD5 2e5dda82f29d5a4dfc840b810cf9abc6
BLAKE2b-256 1581c813e138f5a5f65bcd5893bc89f57866c802b95b8f61cd9b9a20e576feca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page