Cerebrun MCP Client
Cerebrun (cereb.run) is a Model Context Protocol (MCP) server that provides persistent personal context management across sessions.
Quick Start
All requests require:
- -
api_key: Cerebrun API key (Bearer token) - INLINECODE1 : https://cereb.run/mcp
Context Layers
Layer 0 - Language, timezone, comms prefs
Layer 1 - Projects, goals, pinned memories
Layer 2 - Personal identity info, API and other keys
Layer 3 - Encrypted vault (requires consent)
Usage
Get Context
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_context","arguments":{"layer":0}}}' \
https://cereb.run/mcp
Search Context
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_context","arguments":{"query":"Rust authentication","limit":5}}}' \
https://cereb.run/mcp
Push Knowledge
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"push_knowledge","arguments":{"content":"Important insight","category":"learning","tags":["rust","performance"]}}}' \
https://cereb.run/mcp
Chat via Gateway
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"chat
withllm","arguments":{"message":"Hello","provider":"openai","model":"gpt-4"}}}' \
https://cereb.run/mcp
Tools Reference
See REFERENCES.md for complete API documentation.
Script Usage
CODEBLOCK0
Configuration
Store API key in environment: CEREBRUN_API_KEY or pass via INLINECODE3
Cerebrun MCP 客户端
Cerebrun (cereb.run) 是一个模型上下文协议(MCP)服务器,可在会话间提供持久的个人上下文管理。
快速开始
所有请求都需要:
- - apikey:Cerebrun API 密钥(Bearer 令牌)
- baseurl:https://cereb.run/mcp
上下文层级
第 0 层 - 语言、时区、通信偏好
第 1 层 - 项目、目标、固定记忆
第 2 层 - 个人身份信息、API 及其他密钥
第 3 层 - 加密保险库(需用户同意)
使用方法
获取上下文
curl -X POST \
-H Authorization: Bearer $API_KEY \
-H Content-Type: application/json \
-d {jsonrpc:2.0,id:1,method:tools/call,params:{name:get_context,arguments:{layer:0}}} \
https://cereb.run/mcp
搜索上下文
curl -X POST \
-H Authorization: Bearer $API_KEY \
-d {jsonrpc:2.0,id:1,method:tools/call,params:{name:search_context,arguments:{query:Rust 认证,limit:5}}} \
https://cereb.run/mcp
推送知识
curl -X POST \
-H Authorization: Bearer $API_KEY \
-d {jsonrpc:2.0,id:1,method:tools/call,params:{name:push_knowledge,arguments:{content:重要见解,category:学习,tags:[rust,性能]}}} \
https://cereb.run/mcp
通过网关聊天
curl -X POST \
-H Authorization: Bearer $API_KEY \
-d {jsonrpc:2.0,id:1,method:tools/call,params:{name:chat
withllm,arguments:{message:你好,provider:openai,model:gpt-4}}} \
https://cereb.run/mcp
工具参考
完整 API 文档请参见 REFERENCES.md。
脚本使用
python
scripts/cerebrun.py getcontext --layer 0 --api-key YOURKEY
scripts/cerebrun.py searchcontext --query 项目 --api-key YOURKEY
scripts/cerebrun.py pushknowledge --content 新想法 --category 待办 --api-key YOURKEY
配置
将 API 密钥存储在环境变量 CEREBRUNAPIKEY 中,或通过 --api-key 参数传递。