应用创建转发服务

Forgex Ingestor MCP Server是一个通过MCP协议将结构化应用创建负载转发到Forgex后端的服务,适用于需要自动化应用创建和管理的场景。

  • by BharanitharanR
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 bharanitharanr/mcp-google-search

使用说明

Forgex Ingestor MCP服务器

MCP(机器控制协议)服务器,其将结构化应用程序创建有效载荷转发到Forgex API。

此服务器公开了一个工具(create_app_with_forgex)通过MCP,Forgex后端可以接收描述应用程序的结构化JSON有效载荷。

🧩 特性

  • 使用MCP兼容服务器 mcp Python库
  • 公开了一种从结构化有效负载创建应用程序的工具
  • 将数据转发到可配置的Forgex API端点
  • 记录活动和错误以进行监控和调试

🚀 入门指南

先决条件

  • Python 3.9+
  • 正在运行的Forgex API端点(默认值: http://localhost:8081/graph/process)

安装

克隆仓库并安装依赖项:

git clone https://github.com/your-org/forgex-ingestor-server.git
cd forgex-ingestor-server
pip install -r requirements.txt

运行服务器

python forgex_ingestor_server.py

要检查版本,请执行以下操作:

python forgex_ingestor_server.py --version

🔌 工具接口

工具名称: create_app_with_forgex

描述

使用Forgex从结构化有效负载创建应用程序。

输入架构

{
  "type": "object",
  "properties": {
    "app_spec": {
      "type": "object",
      "description": "The structured JSON payload representing the app (entities, edges, rules, etc.)"
    }
  },
  "required": ["app_spec"]
}

有效载荷示例

{
  "app_spec": {
    "entities": [...],
    "edges": [...],
    "rules": [...]
  }
}

🛠 配置

更新 FORGEX_API_URL 如果您的Forgex API端点不同,请在脚本中:

FORGEX_API_URL = "http://localhost:8081/graph/process"

📝 日志记录

日志以名为的记录器写入stdout forgex-ingestor-server.

📁 项目结构

forgex_ingestor_server.py     # Main server implementation
README.md                     # This file
requirements.txt              # Python dependencies

🧪 开发与调试

要调试请求/响应或扩展工具列表,请修改:

  • handle_list_tools() --展示新工具
  • _handle_forgex_create() --自定义有效载荷的处理方式

🛡️ 许可证

麻省理工学院或您首选的许可证。