Role-Specific Context MCP Server

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キー

インストール

# Clone the repository git clone https://github.com/yourusername/role-context-mcp.git cd role-context-mcp # Install dependencies npm install # Set up environment variables echo "OPENAI_API_KEY=your_api_key_here" > .env # Build the project npm run build

サーバーの実行

# Run the MCP server npm start # Run the HTTP server for testing npm run start:http

構成

サーバーは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)

// Example of using the process-with-role tool const result = await client.executeToolRequest({ name: 'process-with-role', parameters: { roleId: 'marketing-expert', query: 'How can I improve my social media engagement?', customInstructions: 'Focus on B2B strategies' } });

ロールを使用したクエリの処理 (HTTP API)

// Example of using the HTTP API const response = await axios.post('http://localhost:3000/process', { roleId: 'marketing-expert', query: 'How can I improve my social media engagement?', customInstructions: 'Focus on B2B strategies' }); console.log(response.data.response);

カスタムロールの作成

// Example of using the create-role tool const result = await client.executeToolRequest({ name: 'create-role', parameters: { id: 'tech-writer', name: 'Technical Writer', description: 'Specializes in clear, concise technical documentation', instructions: 'Create documentation that is accessible to both technical and non-technical audiences', domains: ['technical-writing', 'documentation', 'tutorials'], tone: 'technical', systemPrompt: 'You are an experienced technical writer with expertise in creating clear, concise documentation for complex systems.' } });

ライセンス

マサチューセッツ工科大学

-
security - not tested
F
license - not found
-
quality - not tested

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 エージェントのロールベースのコンテキスト管理を可能にするモデル コンテキスト プロトコル サーバー。これにより、ユーザーは特定の指示を確立し、パーティション化されたメモリを維持し、システム内のさまざまなエージェント ロールに合わせてトーンを調整できます。

  1. Overview
    1. Features
      1. Role Management
      2. Memory Management
      3. MCP Integration
    2. Getting Started
      1. Prerequisites
      2. Installation
      3. Running the Server
      4. Configuration
    3. MCP Integration
      1. Resources
      2. Tools
      3. Prompts
    4. Example Usage
      1. Processing a Query with a Role (MCP)
      2. Processing a Query with a Role (HTTP API)
      3. Creating a Custom Role
    5. License

      Related MCP Servers

      • -
        security
        A
        license
        -
        quality
        A 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 -
        203
        MIT License
      • -
        security
        F
        license
        -
        quality
        A 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 -
        1
        TypeScript
      • -
        security
        F
        license
        -
        quality
        A demonstration implementation of the Model Context Protocol server that facilitates communication between AI models and external tools while maintaining context awareness.
        Last updated -
        Python
        • Linux
        • Apple
      • -
        security
        F
        license
        -
        quality
        A 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

      View all related MCP servers

      ID: 8rburmo36a