Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-cline-personas

MCP.Pizza Chef: bradfair

The mcp-cline-personas MCP server enables efficient management of .clinerules files by leveraging reusable components and persona templates with mustache-style variable substitution. It supports full lifecycle operations on components, including creation, reading, updating, and deletion, while ensuring persona templates only reference valid components through dependency validation. The server features an activation system that writes active personas to .clinerules files and tracks versions for both components and personas. All data is stored as JSON files, facilitating easy file-based storage and management. This server is ideal for developers looking to modularize and version-control persona-driven configurations within the MCP ecosystem.

Use This MCP server To

Manage reusable components for persona templates Create and update persona templates with variable substitution Validate dependencies between components and personas Activate personas by writing to .clinerules files Track version history of components and personas Store persona and component data as JSON files

README

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
  1. 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:

npm start

mcp-cline-personas FAQ

How do I install the mcp-cline-personas server?
Clone the repository, run 'npm install' to install dependencies, then 'npm run build' to build the project.
How does the server manage persona templates?
It uses mustache-style variable substitution to define persona templates that reference reusable components.
Can I track changes to components and personas?
Yes, the server supports version tracking for both components and personas to manage changes over time.
How does dependency validation work?
The server ensures that persona templates only reference existing components, preventing invalid dependencies.
How are active personas applied?
Active personas are written to the .clinerules file through the server's activation system.
What format is used for storing components and personas?
Components and personas are stored as JSON files for easy file-based management.
Is there a programmatic API to manage components?
Yes, the server exposes services like ComponentPersonaService for creating, reading, updating, and deleting components.
Can this server be integrated with other MCP clients?
Yes, it follows MCP protocols and can be integrated with any MCP client supporting server communication.