Cline角色模板
STDIO管理.clinerules文件中可重用组件和角色模板的服务器
管理.clinerules文件中可重用组件和角色模板的服务器
An MCP server for managing .clinerules files using shared components and persona templates.
.clinerules filenpm install
npm run build
import { ComponentPersonaService } from './src/service'; const service = new ComponentPersonaService(process.cwd()); // Create a new component service.setComponent('greeting', 'Welcome message', 'Hello {{name}}!', 1); // Get a component const component = service.getComponent('greeting'); // List all components const components = service.listComponents();
// Create a new persona service.setPersona( 'welcome', 'Welcome persona', '{{greeting}}\nPlease enjoy your stay!', 1 ); // Activate a persona service.activatePersona('welcome'); // Get active persona const active = service.getActivePersona();
.cline-personas/
  components/
    [component-name].json
  personas/
    [persona-name].json
src/
  component.ts    # Component class and operations
  persona.ts      # Persona class and template rendering
  service.ts      # Main service implementation
  index.ts        # MCP server entry point
test/             # Unit tests
The main service class providing all operations:
Component Operations:
setComponent(name, description, text, version)getComponent(name)listComponents()deleteComponent(name)Persona Operations:
setPersona(name, description, template, version)getPersona(name)listPersonas()deletePersona(name)activatePersona(name)getActivePersona()renderPersona(name)Run tests:
npm test
Build the project:
npm run build
Run the MCP server:
npm start