Cline Personas

by bradfair

22 stars
206 downloads
Not rated
GitHub

About

Implements a persona management system for dynamic AI behavior adjustment using reusable components and templates defined in .clinerules files.

Details

Author
bradfair
Repository
bradfair/mcp-cline-personas
GitHub stars
22
Downloads
206
License
MIT License
Categories
Developer Tools, Design, Workplace, File Management, AI, Community, Communication, Frontend, Other

- Component Management: Create, read, update and delete reusable components
- Persona Templates: Define persona templates with mustache-style variable substitution
- Dependency Validation: Ensure persona templates only reference existing components
- Activation System: Activate personas by writing to .clinerules file
- Version Tracking: Track versions for both components and personas
- File-based Storage: Store components and personas as JSON files

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Cline Personas
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, run npm install and npm run build. Use the ComponentPersonaService class to create components (e.g., service.setComponent('greeting', 'Welcome message', 'Hello {{name}}!', 1)), define personas (e.g., service.setPersona(...)), and activate a persona with service.activatePersona('welcome'). Start the MCP server with npm start.

setComponent

Create or update a component with the specified name, description, text, and version.

getComponent

Retrieve a component by its name.

listComponents

List all components available in the system.

deleteComponent

Delete a component by its name.

setPersona

Create or update a persona with the specified name, description, template, and version.

getPersona

Retrieve a persona by its name.

listPersonas

List all personas available in the system.

deletePersona

Delete a persona by its name.

activatePersona

Activate a persona by its name, writing to the .clinerules file.

getActivePersona

Retrieve the currently active persona.

renderPersona

Render a persona's template by its name.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "cline personas": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

Cline Personas MCP Server

An MCP server for managing .clinerules files using shared components and persona templates.

Features

- Component Management: Create, read, update and delete reusable components
- Persona Templates: Define persona templates with mustache-style variable substitution
- Dependency Validation: Ensure persona templates only reference existing components
- Activation System: Activate personas by writing to .clinerules file
- Version Tracking: Track versions for both components and personas
- File-based Storage: Store components and personas as JSON files

Installation

1. Clone the repository
2. Install dependencies:

npm install

3. Build the project:
npm run build

Usage

Managing Components

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();

Managing Personas

// 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();

File Structure

.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

API Documentation

ComponentPersonaService

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)

Development

Run tests:

npm test

Build the project:

npm run build

Run the MCP server:
```bash
npm start

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.