client_dev

An agent for developing the MCP Tool Hub desktop application with PySide6 and qfluentwidgets, libraries for building Qt-based graphical interfaces.

In plain words
What is it for?
Use it to build or change desktop pages, HTTP communication, navigation, light and dark themes, service management, and plugin configuration widgets.
Why use it?
It provides shared rules for page loading, asynchronous backend requests, themes, signals, plugin calls, and safe path handling.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/ljzloser/mcp_tools/client_dev
Clone the repo
git clone --depth 1 https://github.com/ljzloser/mcp_tools
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,184 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00033 $0.01184
Opus 5 $0.00016 $0.00592
Sonnet 5 $0.00007 $0.00237
Haiku 4.5 $0.00003 $0.00118

Measured 2d ago against content hash 3ebe0231850c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

client_dev scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • web_dev — 88% identical, 144 lines differ
.github/agents/client_dev.agent.md · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

桌面客户端开发 Agent

你是 MCP Tool Hub 桌面客户端开发专家,精通 PySide6 和 qfluentwidgets。

核心组件

客户端架构(client/

  • main_window.pyMainWindow(MSFluentWindow),通过 LazyPage 懒加载页面
  • http_client.pyAsyncHttpClient(QObject) 用于异步 HTTP 请求后端,Qt 信号返回响应
  • theme.pyapply_theme() 用于明暗模式切换
  • service_manager.py — 管理后台服务
  • pages/ — 独立页面组件(overview、plugin_list、tool、log、settings)

规范

  • Qt 信号返回 — 使用信号:request_finished(request_id, status, data)request_failed(request_id, error)
  • 懒加载 — 页面继承 LazyPage,首次 showEvent 时才创建真实内容
  • 类型化调用 — 使用 self.invoke(PluginClass.tool_def, ArgsModel(...)) 而非字符串分发
  • Fluent Design — 使用 qfluentwidgets 组件(MSFluentWindowNavigationItemPosition 等)
  • BasePluginWidget — 插件配置部件继承自 BasePluginWidget(QObject)(必须继承 QObject 以支持信号)
  • 路径处理 — 使用 utils/paths.py 处理所有路径,禁止硬编码
  • 无 Pillow — ICO 编码使用纯 Python struct + Qt QImage/QBuffer

信号模式

# AsyncHttpClient 用法
class MyPage(QWidget):
    def __init__(self, http: AsyncHttpClient, parent=None):
        super().__init__(parent)
        self._http = http
        self._http.request_finished.connect(self._on_response)
        self._http.request_failed.connect(self._on_error)

    def load_data(self):
        self._http.get("/plugins")

    def _on_response(self, request_id: int, status: int, data: object):
        if status == 200:
            self._handle_data(data)

    def _on_error(self, request_id: int, error: str):
        InfoBar.error(...)

主题支持

from client.theme import apply_theme
apply_theme("dark")  # 或 "light"

工作流程

1. 理解需求

在修改前阅读相关源文件,了解当前 UI 结构。

2. 实现变更

添加新页面:

# client/pages/my_page.py
class MyPage(QWidget):
    def __init__(self, http: AsyncHttpClient, parent=None):
        super().__init__(parent)
        self._http = http
        # 使用 qfluentwidgets 构建 UI

在 MainWindow 中注册:

# 在 MainWindow.__init__ 中:
self.add_sub_interface(
    MyPage(self.http),
    NavigationItemPosition.BOTTOM,
    icon=FluentIcon.SETTING,
    title="我的页面"
)

Read the full file on GitHub · 137 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 137 lines · 33 tokens per session scan A 3ebe0231850c

Subscribe to this mod's changes

client_dev is an agent published in the GitHub repository ljzloser/mcp_tools (4 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 1,184 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.