Cline Personas MCP Server

by bradfair

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
-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

An MCP server for managing and activating persona templates and components by writing to .clinerules files, supporting version tracking and file-based storage.

  1. Features
    1. Installation
      1. Usage
        1. Managing Components
        2. Managing Personas
      2. File Structure
        1. API Documentation
          1. ComponentPersonaService
        2. Development

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A MCP server for managing and storing code snippets in various programming languages, allowing users to create, list, and delete snippets via a standardized interface.
            Last updated -
            3
            4
            JavaScript
            MIT License
          • A
            security
            A
            license
            A
            quality
            An MCP server that provides access to project files and their contents, allowing users to retrieve file data from specified project directories with error handling and configuration options.
            Last updated -
            1
            4
            TypeScript
            MIT License
          • A
            security
            A
            license
            A
            quality
            A tool that dynamically generates and configures MCP servers by automatically creating necessary directories and files according to user specifications.
            Last updated -
            1
            9
            9
            JavaScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            An MCP server that assists with the orchestration of new software projects by applying standardized templates and best practices in design patterns and software architecture.
            Last updated -
            3
            Python
            MIT License
            • Apple

          View all related MCP servers

          ID: pwpxbeorz7