Token导航 LogoToken导航TokenDH.com
MCP prompt broker logo
开发工具stdio官方级别未说明来源级核验

MCP prompt broker

MCP Server

MCP Prompt Broker 是一个基于Python的模型上下文协议(MCP)服务器,动态选择用户提示的最佳指令配置文件,提升AI助手(如GitHub Copilot)在创意构思、技术故障排除、隐私敏感操作等多样化场景中的响应质量。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
PythonVS Code开发工具VS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

michaelprinc

提供方

michaelprinc

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python -m pip install .

详细介绍

MCP提示经纪人

Python License MCP

基于模型上下文协议的人工智能代理智能指令路由

用户指南开发者指南报告

______________________________________________________________________

执行摘要

MCP提示经纪人 是一个基于Python的模型上下文协议(MCP)服务器,它为用户提示动态选择最佳指令配置文件。它使GitHub Copilot等人工智能助手能够自动应用特定于上下文的指导,提高不同领域的响应质量,包括创造性思维、技术故障排除、隐私敏感操作和通用交互。

关键价值主张

挑战解决方案
一刀切的AI指令上下文感知配置文件路由
静态AI行为热可重新加载的markdown配置文件
有限的领域专业知识创意、技术、隐私和一般任务的专业配置文件
不透明的路由决策透明的评分和置信度指标

核心能力

mindmap
  root((MCP Prompt Broker))
    Intelligent Routing
      Metadata extraction
      Rule-based scoring
      Confidence metrics
    Profile Management
      Markdown-based profiles
      Hot reload support
      Central metadata registry
    MCP Integration
      Standard MCP tools
      VS Code Copilot Chat
      Extensible architecture
    Quality Assurance
      Checklists per profile
      Capability inference
      Domain detection

______________________________________________________________________

快速开始

先决条件

  • Python 3.10或更高版本
  • 带有GitHub Copilot聊天扩展的VS代码(可选)

安装

选项1:自动安装(Windows)

git clone https://github.com/michaelprinc/MCP_prompt_broker.git
cd MCP_prompt_broker
./install.ps1

这将安装:

  • ✅ MCP提示代理服务器
  • ✅ MCP服务器配置(全局+工作区)
  • 配套报关员 GitHub Copilot聊天

选项2:手动安装

git clone https://github.com/michaelprinc/MCP_prompt_broker.git
cd MCP_prompt_broker
python -m pip install .

运行服务器

python -m mcp_prompt_broker

或者使用自定义配置文件目录:

python -m mcp_prompt_broker --profiles-dir /path/to/profiles

______________________________________________________________________

运作原理

sequenceDiagram
    participant User
    participant Copilot as GitHub Copilot
    participant MCP as MCP Prompt Broker
    participant Router as Profile Router
    participant Profiles as Profile Store

    User->>Copilot: Send prompt
    Copilot->>MCP: get_profile(prompt)
    MCP->>MCP: Analyze prompt metadata
    MCP->>Router: Route with metadata
    Router->>Profiles: Score all profiles
    Profiles-->>Router: Scored matches
    Router-->>MCP: Best profile + score
    MCP-->>Copilot: Profile + instructions
    Copilot->>User: Enhanced response

配置文件路由过程

  1. 即时分析:提取元数据(意图、领域、敏感性、主题)
  2. 配置文件匹配:评估每个配置文件的所需条件
  3. 加权评分:应用特定领域的权重来计算分数
  4. 置信度计算:使用softmax样式规范化一致性度量
  5. 响应:返回带有说明和检查表的最佳匹配配置文件

______________________________________________________________________

可用配置文件

简介用例复杂性
general_default通用回退标准
creative_brainstorm构思和创造性思维标准
technical_support故障排除和调试标准
privacy_sensitiveGDPR/HIPAA合规运营标准
*_complex具有元认知功能的增强版本复杂

______________________________________________________________________

配套定制代理

同伴 是一个智能AI助手,它使用MCP Prompt Broker自动将您的请求路由到最佳指令配置文件。

在GitHub Copilot聊天中使用Companion

安装后,将Companion代理与 @companion 提及:

@companion Generate creative names for a fitness tracking app
@companion Debug this Python KeyError on line 42
@companion Analyze this medical data with privacy compliance

伴侣是如何工作的

  1. 自动配置文件选择:每个请求都通过以下方式进行分析 get_profile 工具
  2. 上下文感知指令:自动应用特定领域的指导
  3. 最佳响应质量:利用专业配置文件(创意、技术、隐私、一般)
  4. 透明路由:显示选择了哪个配置文件以及原因

同伴福利

没有伴侣有伴侣
通用AI响应领域优化响应
手动指令编写自动指令路由
质量不一致基于配置文件的一致性
一刀切情境感知适应

用户指南 了解详细的Companion使用说明。

______________________________________________________________________

MCP工具参考

工具说明
list_profiles列出所有可用的指令配置文件
get_profile分析提示并返回最佳匹配配置文件
reload_profiles从markdown文件热重新加载配置文件
get_checklist获取特定配置文件的质量检查表
get_registry_summary获取元数据注册表统计信息
find_profiles_by_capability按能力查找配置文件(例如,“构思”)
find_profiles_by_domain按域查找个人资料(例如,“医疗保健”)

______________________________________________________________________

文档结构

该项目遵循 Diátaxi文件框架,提供四种不同类型的文档:

graph TB
    subgraph "Learning-Oriented"
        A[README.md
Executive Summary]
    end
    
    subgraph "Goal-Oriented"
        B[docs/USER_GUIDE.md
User Guide]
    end
    
    subgraph "Understanding-Oriented"
        C[docs/DEVELOPER_GUIDE.md
Developer Guide]
    end
    
    subgraph "Information-Oriented"
        D[docs/REPORTS_INDEX.md
Ad-hoc Reports]
    end
    
    A --> B
    A --> C
    A --> D
    B --> C
    C --> D
级别文档目的受众
1README.md执行摘要,快速入门每个人
2用户指南安装、配置、使用最终用户
3开发者指南架构,API,贡献开发人员
4报告索引开发历史、决策维护人员

文件编制方法

本文档是按照以下原则创建的:

  • 迪亚斯出租车框架:将教程、操作指南、解释和参考分开
  • 渐进式披露:信息复杂性随着文档深度的增加而增加
  • 加注使相互参照:所有文档都相互连接,便于导航
  • 可视化文档:流程和架构的美人鱼图
  • 生活文档:报告跟踪发展历史和决策

______________________________________________________________________

项目结构

MCP_Prompt_Broker/
├── .github/
│   └── agents/
│       ├── companion-instructions.md  # Companion agent instructions
│       ├── companion-agent.json       # Agent definition (reference)
│       └── README.md                  # Agent directory documentation
├── src/
│   └── mcp_prompt_broker/
│       ├── server.py              # MCP server entry point
│       ├── profile_parser.py      # Markdown profile parser
│       ├── metadata_registry.py   # Central metadata management
│       ├── config/
│       │   └── profiles.py        # InstructionProfile class
│       ├── metadata/
│       │   └── parser.py          # Prompt metadata extraction
│       ├── router/
│       │   └── profile_router.py  # Profile routing logic
│       └── copilot-profiles/      # Markdown profile files
├── tests/                         # Unit tests
├── docs/                          # Documentation
├── reports/                       # Ad-hoc development reports
├── companion-agent.json           # Source agent definition
├── companion-instructions.md      # Source agent instructions
├── pyproject.toml                 # Package configuration
└── install.ps1                    # Windows installation script

______________________________________________________________________

贡献

我们欢迎捐款!请查看 开发者指南 用于:

  • 架构概述
  • 建立开发环境
  • 创建新配置文件
  • 代码风格指南
  • 测试要求

______________________________________________________________________

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

______________________________________________________________________

致谢

______________________________________________________________________

📖 用户指南 | 🔧 开发者指南 | 📋 报告

目录标签

目录标签

PythonVS Code开发工具AI指令路由本地部署上下文感知动态配置GitHubCopilot集成多领域优化

支持客户端

VS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP