Token导航 LogoToken导航TokenDH.com
registry (Everythingisalientome) logo
运维云端未说明官方级别未说明来源级核验

registry (Everythingisalientome)

MCP Server

一个基于Python FastAPI的桌面代理会话管理服务,提供会话的启动、健康检查和池化管理,并通过HTTP API进行会话的获取和释放。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
会话管理FastAPIAPI集成

安装说明

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

作者 / 组织

everythingisalientome

提供方

everythingisalientome

最后核验

2026/5/17 20:19

快速接入

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

详细介绍

注册表

管理桌面代理会话池的Python FastAPI服务。它启动、运行状况检查和池代理+MCP进程对,公开了一个用于获取和释放会话的简单HTTP API。通过PyInstaller打包为独立的Windows可执行文件。

______________________________________________________________________

项目结构

registry/
├── main.py                     # FastAPI app — session acquire/release/status endpoints
├── session_manager.py          # AgentPool and SessionManager — core pool logic
├── models.py                   # Session dataclass and enums
├── config.yaml                 # Server config (rdsh mode)
├── config.local.yaml           # Local dev config (local mode)
└── dist/
    └── registry/               # PyInstaller output
        ├── registry.exe
        ├── config.yaml
        └── config.local.yaml

______________________________________________________________________

端点

GET /session/acquire?agent_type=desktop

从温水池获取可用会话。返回会话详细信息,包括 agent_url.

答复:

{
  "slot": 1,
  "agent_type": "desktop",
  "agent_port": 8001,
  "mcp_port": 5001,
  "type": "warm",
  "status": "busy",
  "agent_url": "http://192.168.0.135:8001",
  "mcp_url": "http://192.168.0.135:5001"
}

POST /session/release/{agent_port}?agent_type=desktop

将会话释放回池中。暖会已标记为可用;动态会话被取消。

GET /session/status

返回所有代理类型的所有会话的当前状态。

______________________________________________________________________

会话模式

local

直接通过以下方式启动代理和MCP subprocess.Popen 在当前桌面上。用于本地开发和测试。

rdsh

通过以下方式在隔离的Windows RDSH用户会话中启动代理和MCP SessionLauncher.exe。每个插槽在专用用户下运行(agent_user_1, agent_user_2等等),因此自动化是完全隔离的。

______________________________________________________________________

配置

config.yaml (服务器--rdsh模式)

agent_types:
  desktop:
    session_mode: "rdsh"
    warm_sessions: 3
    max_sessions: 10
    agent_script: "C:/agents/desktop_agent/desktop_agent.exe"
    mcp_binary: "C:/agents/GoogleSearchMcp/GoogleSearchMcp.exe"
    session_launcher: "C:/agents/SessionLauncher/SessionLauncher.exe"
    session_users:
      - "agent_user_1"
      - "agent_user_2"
      - "agent_user_3"
    agent_base_port: 8000
    mcp_base_port: 5000
    host: "192.168.0.135"

health_check_interval_seconds: 30
health_check_timeout_seconds: 5
startup_timeout_seconds: 30

config.local.yaml (本地开发--本地模式)

agent_types:
  desktop:
    session_mode: "local"
    warm_sessions: 1
    max_sessions: 3
    agent_script: "D:/VisualStudioCodeWrkSpce/LLMs/demo-desktop-agent/dist/desktop_agent/desktop_agent.exe"
    mcp_binary: "D:/VisualStudioWrkSpce/2022/demo-mcp/GoogleSearchMcp/publish/GoogleSearchMcp.exe"
    session_launcher: ""
    session_users: []
    agent_base_port: 8000
    mcp_base_port: 5000
    host: "localhost"

health_check_interval_seconds: 30
health_check_timeout_seconds: 5
startup_timeout_seconds: 30

______________________________________________________________________

构建

cd D:\VisualStudioCodeWrkSpce\LLMs\registry

.venv\Scripts\pyinstaller --onedir --name registry main.py ^
  --hidden-import session_manager ^
  --hidden-import models ^
  --add-binary "C:\Users\PreetPragyan\AppData\Local\Programs\Python\Python312\python312.dll;_internal"

输出: dist\registry\registry.exe

cd D:\\VisualStudioCodeWrkSpce\\LLMs\\registry .venv\\Scripts\\pyinstaller--onedir--名称注册表main.py--隐藏导入会话管理器--隐藏导入模型--添加二进制文件“C:\\Users\\PreeTRagyan\\AppData\\Local\\Programs\\Python\\Python312\\Python312.dll;\_internal”

本地测试

cd D:\VisualStudioCodeWrkSpce\LLMs\registry\dist\registry

# Copy config first
copy ..\..\config.local.yaml .

.\registry.exe --config config.local.yaml

在服务器上

cd C:\agents\registry
.\registry.exe

负载 config.yaml 默认情况下,来自同一目录。

______________________________________________________________________

部署到服务器

  1. 复制 dist\registry\ 内容到 C:\agents\registry\
  2. 复制 config.yamlC:\agents\registry\
  3. 停止现有进程:
Get-Process registry, desktop_agent, GoogleSearchMcp | Stop-Process -Force
  1. 重新启动:
.\registry.exe

______________________________________________________________________

港口参考

组件本地端口服务器端口
注册表90009000
桌面代理插槽1-38001-80038001-8003
MCP工具槽1-35001-50035001-5003

______________________________________________________________________

健康检查流程

注册表轮询每个代理的 /health 每30秒结束一次。死会话会自动重新启动。

目录标签

目录标签

会话管理FastAPIAPI集成Python本地部署健康检查HTTPAPIWindows

接入字段

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

未说明

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

session

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明session部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP