mcp-orchestrator-framework

mcp-orchestrator-framework

A configurable MCP server that enables creating custom analysis tools through JSON configuration, with built-in frameworks for error handling, self-evaluation, security guardrails, and output artifacts.

Category
访问服务器

README

MCP Orchestrator Framework

A generic, configurable MCP (Model Context Protocol) server that provides various analysis frameworks through JSON configuration. This server can be customized to create different types of analysis tools by simply changing the configuration file.

Features

  • Configurable Frameworks: Create custom analysis servers through JSON configuration
  • Built-in Frameworks:
    • Main Analyser Framework (configurable role and prompt)
    • Error Handling Framework
    • Self-Evaluation Framework (generic and configurable)
    • Security Guardrails Framework
    • Required Output Artifacts Framework
    • Template Mapping Framework (for template diagram access)
  • Template Support: Use custom templates for artifact generation
  • JSON Configuration: Easy setup and customization
  • Modular Design: Enable/disable frameworks as needed

Installation

npm install mcp-orchestrator-framework

Quick Start

1. Basic Usage (Default Configuration)

npm start

2. Custom Configuration

# Use UI analysis configuration
npm run start:ui

# Use generic analysis configuration  
npm run start:generic

# Use your own configuration
node framework-server.js path/to/your-config.json

MCP Server Setup (Cursor)

To use this framework as an MCP server in Cursor, add one of the following configurations to your Cursor settings:

Option 1: Using Node Command

{
  "mcpServers": {
    "mcp-orchestrator-framework": {
      "command": "node",
      "args": [
        "/path/to/mcp-orchestrator-framework/framework-server.js",
        "/path/to/mcp-orchestrator-framework/config-examples/ui-analysis-config.json"
      ],
      "env": {}
    }
  }
}

Option 2: Using NPX Command

{
  "mcpServers": {
    "mcp-orchestrator-framework": {
      "command": "npx",
      "args": [
        "mcp-orchestrator-framework",
        "/path/to/mcp-orchestrator-framework/config-examples/ui-analysis-config.json"
      ],
      "env": {}
    }
  }
}

Note: Update the paths in the configuration to match your local setup.

Configuration

The server is configured through JSON files. Here's the structure:

{
  "name": "your-framework-name",
  "version": "1.0.0",
  "description": "Your framework description",
  "frameworks": {
    "errorHandling": {
      "enabled": true,
      "title": "Error Handling Framework",
      "description": "Error handling for analysis tasks"
    },
    "selfEvaluation": {
      "enabled": true,
      "title": "Quality Assessment Framework",
      "description": "Quality assessment for analysis tasks",
      "metrics": {
        "accuracy": {
          "name": "Accuracy Score",
          "formula": "(Correct Items / Total Items) × 100",
          "target": 95,
          "weight": 1
        }
      },
      "overallScore": {
        "formula": "Average of all metrics",
        "passingThreshold": 90,
        "maxIterations": 3,
        "improvementThreshold": 5
      }
    },
    "securityGuardrails": {
      "enabled": true,
      "title": "Security Guardrails",
      "description": "Security protocols for analysis",
      "inputValidation": {
        "allowedDomains": ["*"],
        "blockedDomains": [],
        "contentTypes": ["text/html", "application/json"]
      },
      "promptInjectionProtection": {
        "enabled": true,
        "ignoreEmbeddedInstructions": true,
        "maintainFocus": true,
        "flagSuspiciousActivity": true
      },
      "outputSanitization": {
        "escapeOutput": true,
        "validateContent": true,
        "removeHarmfulContent": true
      }
    },
    "requiredOutputArtifacts": {
      "enabled": true,
      "title": "Required Output Artifacts",
      "description": "Required output artifacts",
      "artifacts": [
        {
          "name": "analysis_data",
          "type": "csv",
          "filename": "analysis_data.csv",
          "template": "analysis-template.csv",
          "required": true
        }
      ]
    }
  },
  "templates": {
    "basePath": "./templates",
    "customTemplates": {}
  }
}

Framework Configuration

Main Analyser Framework

Configurable main analyser with custom role and prompt:

{
  "mainAnalyser": {
    "enabled": true,
    "title": "EDS Block Analyser",
    "description": "Analyse the site and estimate the effort to implement the EDS blocks",
    "toolName": "eds_block_analyser",
    "role": "## Role Definition\nYou are a UI Architect...",
    "mainPrompt": "# UI Architect Prompt\n## Core Task\n..."
  }
}

Error Handling Framework

Controls how errors are handled during analysis:

{
  "errorHandling": {
    "enabled": true,
    "title": "Custom Error Handling",
    "description": "Error handling for your specific use case"
  }
}

Self-Evaluation Framework

Configurable quality assessment with custom metrics:

{
  "selfEvaluation": {
    "enabled": true,
    "title": "Quality Assessment",
    "description": "Quality assessment framework",
    "metrics": {
      "customMetric": {
        "name": "Custom Metric Name",
        "formula": "Your formula here",
        "target": 95,
        "weight": 1
      }
    },
    "overallScore": {
      "formula": "Average of all metrics",
      "passingThreshold": 90,
      "maxIterations": 3,
      "improvementThreshold": 5
    }
  }
}

Security Guardrails Framework

Configurable security protocols:

{
  "securityGuardrails": {
    "enabled": true,
    "title": "Security Guardrails",
    "description": "Security protocols",
    "inputValidation": {
      "allowedDomains": ["example.com", "trusted-site.com"],
      "blockedDomains": ["malicious-site.com"],
      "contentTypes": ["text/html", "application/json"]
    },
    "promptInjectionProtection": {
      "enabled": true,
      "ignoreEmbeddedInstructions": true,
      "maintainFocus": true,
      "flagSuspiciousActivity": true
    },
    "outputSanitization": {
      "escapeOutput": true,
      "validateContent": true,
      "removeHarmfulContent": true
    }
  }
}

Required Output Artifacts Framework

Define required output artifacts:

{
  "requiredOutputArtifacts": {
    "enabled": true,
    "title": "Required Output Artifacts",
    "description": "Required output artifacts",
    "artifacts": [
      {
        "name": "analysis_data",
        "type": "csv",
        "filename": "analysis_data.csv",
        "template": "analysis-template.csv",
        "required": true
      },
      {
        "name": "summary_report",
        "type": "markdown",
        "filename": "summary_report.md",
        "template": "summary-template.md",
        "required": true
      }
    ]
  }
}

Template Mapping Framework

Provides access to template mapping diagrams:

{
  "templateMapping": {
    "enabled": true,
    "title": "Template Mapping Diagram",
    "description": "Access the generic template mapping diagram for website template analysis",
    "toolName": "template_mapping_diagram",
    "templateFile": "generic_template_mapping_diagram.md"
  }
}

Example Configurations

UI Analysis Configuration

For UI component analysis with specific metrics:

node framework-server.js config-examples/ui-analysis-config.json

Generic Analysis Configuration

For general analysis tasks:

node framework-server.js config-examples/generic-analysis-config.json

Templates

Templates are stored in the templates/ directory and can be referenced in the configuration:

templates/
├── analysis-template.csv
├── summary-template.md
├── evaluation-template.md
└── README.md

Creating Custom Frameworks

  1. Create a configuration file based on the examples
  2. Define your metrics in the self-evaluation framework
  3. Set up security rules for your use case
  4. Define required artifacts and their templates
  5. Run with your configuration:
node framework-server.js your-config.json

API

The server exposes the following tools based on your configuration:

  • main_analyser (or custom tool name) - Main analysis tool with configurable role and prompt
  • error_handling_framework - Error handling protocols
  • self_evaluation_framework - Quality assessment metrics
  • security_guardrails_framework - Security protocols
  • required_output_artifacts_framework - Required output specifications
  • template_mapping_diagram (or custom tool name) - Template mapping diagram access

Development

Project Structure

├── framework-server.js          # Main server implementation
├── config-examples/             # Example configurations
│   ├── ui-analysis-config.json
│   └── generic-analysis-config.json
├── templates/                   # Template files
│   ├── analysis-template.csv
│   ├── summary-template.md
│   └── evaluation-template.md
├── package.json
└── README.md

Adding New Frameworks

To add a new framework:

  1. Add the framework configuration to your JSON config
  2. Implement the framework setup in framework-server.js
  3. Create the framework content generation logic

License

MIT

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support

For issues and questions:

  • Check the configuration examples
  • Review the template documentation
  • Open an issue on GitHub

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选