Integrations
Manages environment variables for the MCP server, primarily for storing API keys like the OpenAI API key.
Used for making HTTP requests to the server's API, allowing clients to process queries with specific roles and interact with the role-based context management system.
Used for version control and initial project setup through cloning the repository.
角色特定上下文 MCP 服务器
模型上下文协议 (MCP) 服务器根据系统中的代理角色定义和管理上下文边界。
概述
该 MCP 服务器支持 AI 代理的基于角色的上下文管理,允许您:
- 为每个 AI 代理(营销专家、词曲作者、行政助理等)制定明确的指示、目标和领域知识
- 保持与角色相关的内存分区和范围,防止不同代理角色之间的交叉污染
- 根据角色动态调整语气和风格(严肃、诙谐、讽刺),并将语气特征融入提示中
特征
角色管理
- 创建、更新和删除自定义角色
- 具有特定专业领域的预定义角色
- 特定角色的系统提示和说明
- 可定制的音调配置文件
内存管理
- 角色特定的记忆存储
- 根据与当前查询的相关性进行记忆检索
- 记忆的生存时间(TTL)
- 每个角色的内存限制
MCP 集成
- 将角色公开为 MCP 资源
- 提供角色管理和查询处理工具
- 提供基于角色的交互提示
入门
先决条件
- Node.js 18+
- OpenAI API 密钥
安装
运行服务器
配置
可以通过修改src/config.ts
来配置服务器。关键配置选项包括:
- 默认角色及其属性
- 可用的音调配置文件
- 内存管理设置
- OpenAI模型选择
MCP 集成
资源
服务器公开以下资源:
role://{roleId}
- 有关特定角色的信息role://tones
- 可用的音调配置文件
工具
该服务器提供以下工具:
process-with-role
- 使用特定角色处理查询create-role
创建新角色update-role
- 更新现有角色delete-role
- 删除自定义角色change-role-tone
- 改变角色基调store-memory
- 为特定角色存储记忆clear-role-memories
- 清除角色的所有记忆
提示
服务器给出如下提示:
role-{roleId}
- 使用特定角色来处理请求create-custom-role
- 创建新的自定义角色
示例用法
使用角色处理查询(MCP)
使用角色处理查询(HTTP API)
创建自定义角色
执照
麻省理工学院
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器可为 AI 代理提供基于角色的上下文管理,允许用户建立特定指令、维护分区内存并根据系统中的不同代理角色调整音调。
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that enables AI agents to interact with ClickUp workspaces, allowing task creation, management, and workspace organization through natural language commands.Last updated -203MIT License
- -securityFlicense-qualityA Model Context Protocol server that provides persistent task management capabilities for AI assistants, allowing them to create, update, and track tasks beyond their usual context limitations.Last updated -1TypeScript
- -securityFlicense-qualityA demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.Last updated -Python
- -securityFlicense-qualityA Model Context Protocol server that bridges AI assistants like Claude with Wordware's specialized agent capabilities, allowing dynamic loading and access to any Wordware flow through a standardized interface.Last updated -Python