mcpField
C
Creed Space

Creed Space

本地服务
creed.spaceAI 与智能体012 周前更新

关于 Creed Space

Creed Space MCP 服务将 Constitutional AI 安全护栏接入兼容 MCP 的 AI 系统,供需要按指定价值边界约束模型行为的团队使用。它提供多种 persona,并通过工具支持策略判断、响应校验和价值规则管理。

主要功能

  1. 01六种安全 persona
  2. 02策略判断与响应校验
  3. 03获取及搜索宪章
  4. 04管理活动 persona
  5. 05多尺度价值握手
  6. 06缓存与离线模式

适用场景

  1. 01为儿童交互启用安全规则
  2. 02按隐私与安全要求约束响应
  3. 03检查响应是否符合指定宪章

MCP 相关

服务向 MCP 客户端提供 16 个工具,涵盖宪章与 persona 管理、运行时安全护栏及多尺度价值握手。支持 stdio 和 HTTP 传输。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"creedspace": {
"command": "npx",
"args": [
"-y",
"@creedspace/mcp-server"
]
}
}
}
启动命令npx -y @creedspace/mcp-server

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npm@creedspace/mcp-server1.1.4

工具

16

收录的工具列表 · 更新于 3 周前

参数类型必填说明
persona_idstring否角色 ID(例如,“ambassador”、“nanny”、“sentinel”)

详细介绍

creedspace-mcp-server

适用于 Creed Space 的通用 MCP 服务——10 秒即可配置 AI 安全护栏。

npm version smithery badge License: MIT

可用平台

该服务已发布到规范的 MCP 目录,因此支持注册表的客户端可以直接发现并安装它;也可以使用下方快速开始中的任意命令。

  • npm — @creedspace/mcp-server,所有安装方式最终都会使用此软件包。
  • 官方 MCP 注册表 — io.github.Creed-Space/creedspace-mcp-server。
  • GitHub — 源代码、问题以及 server.json 清单。
  • Smithery — nell/creedspace,由网关提供的 Streamable HTTP 端点。

也正在陆续接入更广泛的 MCP 生态系统:mcp.directory、mcpservers.org、PulseMCP(通过注册表导入),以及 mcp.so。

快速开始

# STDIO transport (Claude Desktop, OpenAI Codex)
npx @creedspace/mcp-server --persona ambassador

# HTTP transport (OpenAI Agents SDK)
npx @creedspace/mcp-server --transport http --port 3100

# Test API connection
npx @creedspace/mcp-server test

什么是 Creed Space?

Creed Space 通过宪法式 AI 人格提供个性化 AI 安全护栏。每个人格都会落实特定的价值观和行为准则,确保 AI 助手在既定的道德边界内运行。

  • 🛡️ 通过对每个回答进行宪法式评估,减少有害的 AI 输出
  • 🎯 根据当前人格的价值观,拒绝危险的提示词
  • 🚀 与任何兼容 MCP 的 AI 搭配,10 秒即可完成配置

可用人格

人格图标用途
Ambassador🤝专业沟通
Nanny👶儿童安全互动
Sentinel🛡️注重隐私与安全
Godparent🕊️宗教与道德指引
Muse🎨创意探索
Anchor⚓立足现实

安装

选项 1:使用 npx(推荐)
# No installation needed - just run!
npx @creedspace/mcp-server --persona ambassador
选项 2:全局安装
npm install -g @creedspace/mcp-server
creedspace-mcp --persona ambassador
选项 3:项目依赖
npm install @creedspace/mcp-server

Claude Desktop 集成

添加到 claude_desktop_config.json:

{
  "mcpServers": {
    "creedspace": {
      "command": "npx",
      "args": ["@creedspace/mcp-server", "--persona", "ambassador"]
    }
  }
}

然后重启 Claude Desktop,以加载 Creed Space 安全护栏。

配置

环境变量
# .env file
CREEDSPACE_API_URL=https://api.creed.space
CREEDSPACE_API_KEY=your-api-key-here  # Optional
CREEDSPACE_DEFAULT_PERSONA=ambassador
命令行选项
creedspace-mcp \
  --persona ambassador \
  --url https://api.creed.space \
  --api-key YOUR_KEY \
  --cache-ttl 300000 \
  --offline

# HTTP Transport Options
creedspace-mcp \
  --transport http \
  --port 3100 \
  --host localhost \
  --api-key YOUR_KEY \
  --cors \
  --cors-origin http://localhost:3000 \
  --stateless
传输类型
传输方式使用场景平台
stdio(默认)本地子进程通信Claude Desktop、OpenAI Codex
http用于远程/本地连接的 HTTP 服务OpenAI Agents SDK、自定义集成
配置文件
# Generate example configs
creedspace-mcp --generate-config

# Use config file
creedspace-mcp --config creedspace.json

可用的 MCP 工具

该服务为 MCP 客户端提供 16 个工具:

宪章

  • get_constitution - 获取某个角色的合并宪章
  • get_constitution_by_id - 按 ID 获取特定宪章
  • search_constitutions - 搜索宪章库

角色

  • list_personas - 列出所有可用角色
  • set_persona - 切换当前角色
  • get_active_persona - 获取当前启用的角色
  • get_uvc_qualities - 获取期望、不喜欢和绝不接受的特质
  • get_system_prompt - 获取完整的角色系统提示词
  • preview_export - 预览导出配置

运行时防护措施

  • adjudicate - 获取针对请求的策略决策内核
  • attest_response - 根据当前信条验证响应
  • get_anchor - 获取精简的不可协商规则锚点
  • heartbeat - 定期重新锚定,以防止上下文漂移
  • clear_cache - 清除本地缓存

多尺度价值握手

  • perform_multi_scale_handshake - 跨微观/中观/宏观尺度执行 N 方价值握手
  • get_scale_attestation - 获取带哈希链的证明记录

编程用法

import { CreedSpaceMCPServer } from '@creedspace/mcp-server';

// Start server programmatically
const server = new CreedSpaceMCPServer({
  persona: 'ambassador',
  apiUrl: 'https://api.creed.space',
  cacheEnabled: true
});

await server.start();
// Use the API client directly
import { CreedSpaceClient } from '@creedspace/mcp-server';

const client = new CreedSpaceClient();
const personas = await client.getPersonas();
const constitution = await client.getMergedConstitution('ambassador');

平台集成示例

OpenAI Agents SDK(HTTP 传输)
from agents import Agent
from agents.mcp import MCPServerStreamableHttp

# Start the server first:
# npx @creedspace/mcp-server --transport http --port 3100

server = MCPServerStreamableHttp(
    url="http://localhost:3100/mcp",
    name="creedspace"
)

agent = Agent(
    name="safe-agent",
    tools=[server.get_tools()]
)

# The agent now has access to Creed Space safety tools
OpenAI Codex(STDIO 传输)

添加到 ~/.codex/config.toml:

[mcp_servers.creedspace]
command = "npx"
args = ["@creedspace/mcp-server", "--persona", "ambassador"]

[mcp_servers.creedspace.env]
CREEDSPACE_API_URL = "https://api.creed.space"
VS Code / Cursor
{
  "mcp.servers": {
    "creedspace": {
      "command": "npx",
      "args": ["@creedspace/mcp-server", "--persona", "ambassador"]
    }
  }
}
Continue.dev
{
  "models": [{
    "provider": "openai",
    "mcp_servers": [{
      "command": "npx",
      "args": ["@creedspace/mcp-server"]
    }]
  }]
}
LangChain
from langchain.tools import MCPTool

creedspace = MCPTool(
    command="npx",
    args=["@creedspace/mcp-server", "--persona", "ambassador"]
)

测试

# Test API connection
npx @creedspace/mcp-server test

# Test with specific URL
npx @creedspace/mcp-server test --url http://localhost:8000

离线模式

该服务包含智能缓存,可供离线使用:

# Enable offline mode with cached data
creedspace-mcp --offline --persona ambassador

开发

# Clone the repository
git clone https://github.com/Creed-Space/creedspace-mcp-server.git
cd creedspace-mcp-server

# Install dependencies
npm install

# Build TypeScript
npm run build

# Run in development mode
npm run dev

# Run tests
npm test

API 文档

完整的 API 文档请访问 https://api.creed.space/api-docs

支持

许可证

MIT © Nell Watson


构建关键的 AI 安全基础设施,塑造自主 AI 与人类之间的价值互动。

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。