Files
market/skills/tool-mcp-authoring/SKILL.md
T
yige ae42a56205 docs: 自建 MCP 指南的连接测试显式传 timeout / Pass an explicit timeout to MCP connection tests (#281)
## 中文

### 背景

DesireCore 主仓
[desirecore/desirecore#6228](https://github.com/desirecore/desirecore/pull/6228)(ADR-366)把
stdio MCP 服务端的连接测试期限从 30 秒改为 120 秒:uvx / npx 首次启动要先下载依赖,30
秒常常不够。测试结果要等子进程回收后才返回,最长约 130 秒。

内置技能「自建 Tool 与 MCP」(`tool-mcp-authoring`)的 MCP 服务参考引导 Agent 经
`HttpRequest` 调 `POST /api/mcp/test-connection`,但没有写
`timeout`。`HttpRequest` 缺省 30 秒,会先于服务端测试结束:Agent
只看到「请求超时」,看不到期限说明、stderr 尾部与启动未完成提示。

### 改动

-
`references/mcp-server.zh-CN.md`、`references/mcp-server.md`:test-connection
调用补一句:首次启动可能约两分钟才返回,经 `HttpRequest` 调用时传 `timeout: 150000`。中英两份内容一致。
- 技能版本 1.0.1 → 1.0.2(`SKILL.md` 与 `catalog-metadata.v1.json`),市场版本
1.5.25 → 1.5.26。

旧客户端的连接测试仍是 30 秒,多传 `timeout` 不影响它们。

### 验证

- `validate-i18n.py`:0 个错误
- `validate_catalog_metadata.py --require-complete`:0 个错误
- `translate.py --check`:退出码 0;技能正文与元数据字符串没有变,翻译哈希仍然有效
- diff 不含凭据,内容与客户无关

主仓的 `defaults/market.zip` 不在本 PR 范围内,合入后再另行运行 `npm run sync-market`。

## English

### Background

DesireCore
[desirecore/desirecore#6228](https://github.com/desirecore/desirecore/pull/6228)
(ADR-366) raises the connection-test deadline for stdio MCP servers from
30 to 120 seconds, because uvx / npx often need longer than 30 seconds
to download dependencies on first launch. The result is returned only
after the child process is reclaimed, so it can take about 130 seconds.

The MCP server reference of the built-in "Self-authored Tools and MCP"
skill (`tool-mcp-authoring`) tells the Agent to call `POST
/api/mcp/test-connection` through `HttpRequest` without a `timeout`.
`HttpRequest` defaults to 30 seconds and gives up before the server-side
test finishes. The Agent then sees only "request timed out" and never
gets the deadline message, the stderr tail or the startup hint.

### Changes

- `references/mcp-server.zh-CN.md` and `references/mcp-server.md`: the
test-connection call now says a first launch can take about two minutes
and that `HttpRequest` calls should pass `timeout: 150000`. Both
languages say the same thing.
- Skill version 1.0.1 → 1.0.2 (`SKILL.md` and
`catalog-metadata.v1.json`); market version 1.5.25 → 1.5.26.

Older clients still use a 30-second connection test; the extra `timeout`
does not affect them.

### Validation

- `validate-i18n.py`: 0 errors
- `validate_catalog_metadata.py --require-complete`: 0 errors
- `translate.py --check`: exit code 0; the skill body and metadata
strings are unchanged, so translation hashes stay fresh
- The diff contains no credentials and stays customer-neutral

Updating `defaults/market.zip` in the main repository is out of scope
here; `npm run sync-market` runs separately after this merges.
2026-11-16 23:36:33 +08:00

7.3 KiB

name, description, license, compatibility, version, requiredClientVersion, type, risk_level, status, disable-model-invocation, tags, metadata, market
name description license compatibility version requiredClientVersion type risk_level status disable-model-invocation tags metadata market
tool-mcp-authoring Use when the user needs to build, package or modify a custom Tool, MCP Server or device-protocol integration. Reuse existing execution and approval contracts. Requires actual runtimes, drivers/libraries and authorized devices/services; third-party licenses, deployment and costs depend on the chosen dependencies. Report missing prerequisites. MIT Requires DesireCore 10.0.203 or newer and actually available file/execution/configuration capabilities. Runtimes, third-party drivers/libraries, hardware and hosted services are not bundled by this Skill and require their applicable license, deployment, authorization and costs. Report unavailable prerequisites. 1.0.2 10.0.203 procedural medium enabled true
tools
mcp
development
devices
author updated_at i18n
desirecore 2026-11-09
default_locale source_locale locales zh-CN en-US
en-US zh-CN
zh-CN
en-US
name short_desc description body source_hash translated_by translated_at
自建 Tool 与 MCP 编写、登记和验证可复用工具与 MCP 服务 在用户需要自主编写、封装或修改自定义 Tool、MCP Server 或设备协议接入能力时使用。复用现有执行与审批合同;依赖真实可用的运行时、驱动/库及获准设备或服务,第三方许可、部署和费用按所选依赖确认,缺条件时报告。 ./SKILL.zh-CN.md sha256:4a1d9c15821f8571 ai:gpt-6 2026-11-09
name short_desc description body source_hash translated_by translated_at
Self-authored Tools and MCP Build, register and verify reusable tools and MCP services Use when the user needs to build, package or modify a custom Tool, MCP Server or device-protocol integration. Reuse existing execution and approval contracts. Requires actual runtimes, drivers/libraries and authorized devices/services; third-party licenses, deployment and costs depend on the chosen dependencies. Report missing prerequisites. ./SKILL.md sha256:4a1d9c15821f8571 ai:gpt-6 2026-11-09
icon category maintainer channel
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="1.6"><rect x="3" y="3" width="18" height="18" rx="3"/><path d="M3 8h18M8 8v13M12 13h5M12 17h5"/></svg> development
name verified
DesireCore Official true
latest

Self-authored Tools and MCP

Choose the delivery

Implement the requested capability as verifiable code and contracts that remain usable. The Agent chooses language, libraries and approach; the platform supplies original file tools, execution, discovery, approvals and runtime facts without imposing a business workflow.

User goal Possible carrier
One diagnosis, read or conversion A script in the authorized workspace
Reusable atomic operation with an input schema An AgentFS custom Tool
Operations sharing a device connection or service state A self-authored MCP Server attached to the actual Agent Service
Reusable method, conventions and supporting scripts A Skill; it does not register a function tool by itself
Configuration UI, multiple devices, installable delivery An application or plugin, optionally composing existing Tool/MCP capabilities

Check existing capabilities and the user's choice. An explicit request to build can proceed directly without searching the market first. For application delivery, load the application authoring Skill from the actual directory: authoring actions use AppAuthoring, installation lifecycle uses AppManage.

Use real environments and original authority

  • Continue the current Plan, work directory and authorization. Creating a tool does not justify changing approval mode, extracting a platform token or widening a child task's authority. Another Agent's installation/configuration needs its original authorization.
  • Probe actual runtimes, libraries, drivers and devices/services. Prepare missing prerequisites through available runtime Skills or original execution tools, recording versions and location. Third-party libraries, hardware and hosted services retain their license, deployment and cost requirements; report unavailable prerequisites.
  • Keep reviewable code/configuration in permitted directories, private device settings and credentials in private configuration or original connection owners, and out of public Skills, CLI arguments, logs and examples. Registering a connector does not provide external hardware, licenses or services.
  • Derive serial ports, baud rates, addresses and endpoints from the actual device and protocol material. Provide descriptions in configuration/parameter schemas. Classify read/write risk by actual effects and test authorized read-only operations or simulated endpoints first without calling them physical-device evidence.

Read the relevant authoring contract

  • Atomic scripts, complete TOOL.md, registration and discovery: AgentFS Tool.
  • Local/remote MCP, dependencies, connections and sharing: MCP service.
  • For reusable operating methods, load Skill authoring/management guidance from the actual directory. For a shared HTTP/MCP catalog, load service-registration guidance. Attaching MCP to yourself needs no global listing.

Verify results and lifecycle

Report separately: source/dependencies prepared, configuration saved, registration/discovery successful, actual invocation successful, device behavior observed and restart recovery verified. Earlier stages do not establish later ones.

After registry refresh, call actual current catalog/declaration names. Loading does not increase authority; a worker/background Run with a fixed tool ceiling cannot bypass it by creating new capabilities. Use the error and original context to choose a subsequent turn, a suitable execution Agent or a precise authorization requirement instead of blindly loading again.

Continuous subscriptions such as MQTT need a real process/service carrier and an explicit path through an authorized existing schedule, Webhook or other real ingress to the Agent. MCP list-change notifications are not a general device-event wakeup facility. A saved config, one background command or registered MCP does not prove listening survives an application restart. If choosing scheduling, use ManageSchedule rather than writing persistent schedule files directly.

Verify relevant device ownership, timeout, cancellation, disconnect/recovery and concurrency for the chosen delivery. Reconcile uncertain device writes before deciding to retry. Close/remove only your owned connections, processes and registrations rather than shared services. Deliver actual entrypoints, call examples and unverified limits without packaging every simple script as an application.