[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F1PJ7CG4VE3VRZ3E7WQZB8":3,"skill-same:01M7F1PJ7CG4VE3VRZ3E7WQZB8":67},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":48},"01M7F1PJ7CG4VE3VRZ3E7WQZB8","mcp-server-integration",null,"Connect mcp-agent applications to MCP servers and expose MCPApp workflows as FastMCP servers.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fmcp-server-integration\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: mcp-server-integration\ndescription: \"Connect mcp-agent applications to MCP servers and expose MCPApp\n  workflows as FastMCP servers.\"\ndisable-model-invocation: true\nmetadata:\n  disco-role: operating\nlicense: Apache 2.0\n---\n\n# MCP Server Integration\n\nUse this sub-skill when an agent needs to connect an `mcp-agent` app to upstream MCP servers or expose an `MCPApp` itself as an MCP server. It covers transport configuration, server registry behavior, connection lifecycle, MCP primitives, OAuth\u002Fauthentication, roots, sampling, elicitation, and safe client-install preparation.\n\n## Start Here\n\n1. For app and agent construction, first read `..\u002Fcore-sdk\u002FSKILL.md`, then return here for server wiring.\n2. Choose the direction:\n   - **Consume upstream MCP servers**: configure `mcp.servers`, attach agents with `server_names`, or use `gen_client`\u002F`MCPAggregator` directly.\n   - **Expose this app as an MCP server**: decorate tools\u002Fworkflows on `MCPApp`, then call `create_mcp_server_for_app(app, **kwargs)`.\n   - **Prepare client installation\u002Fdeployment**: use the checks here, then follow `..\u002Fcli-cloud-operations\u002FSKILL.md` for CLI install\u002Fdeploy commands.\n3. Read the closest bundled reference:\n   - `references\u002Fconfiguration.md` for `MCPServerSettings`, transports, roots, registry, and client install dry-runs.\n   - `references\u002Fserver-and-client-workflows.md` for `create_mcp_server_for_app`, workflow tools, decorators, primitives, aggregators, sampling, and elicitation.\n   - `references\u002Foauth-and-auth.md` for downstream OAuth servers, token storage, pre-authorization, and OAuth-protected app servers.\n   - `references\u002Ftroubleshooting.md` for common failure modes and fixes.\n4. Use bundled scripts before running real services:\n   - `scripts\u002Fvalidate_server_config.py --help`\n   - `scripts\u002Fvalidate_server_config.py path\u002Fto\u002Fmcp_agent.config.yaml --check-executables`\n   - `scripts\u002Fminimal_app_server.py --help`\n   - `scripts\u002Fminimal_app_server.py --mode dry-run --json`\n\n## Upstream Server Checklist\n\n- Define every upstream server under `mcp.servers.\u003Cserver_name>` and make sure the agent\u002Fworkflow uses the same exact `server_name`.\n- Use `transport: stdio` with `command` and `args`; use `sse`, `streamable_http`, or `websocket` with `url`.\n- Put bearer\u002FAPI tokens in `headers` or secrets-backed placeholders; use `auth.oauth` only for delegated OAuth flows.\n- Set `roots` as `file:\u002F\u002F` URIs when a server needs declared filesystem access, and include `server_uri_alias` only when the server expects a different mounted URI.\n- Use `allowed_tools` to restrict high-risk or collision-prone tool surfaces before exposing them to an LLM.\n- Prefer `gen_client(server_name, app.context.server_registry, context=app.context)` for a direct client session and `MCPAggregator([...])` when an agent needs a combined tools\u002Fresources\u002Fprompts surface.\n\n## App Server Checklist\n\n- Register simple callable tools with `@app.tool` for synchronous results and `@app.async_tool` when callers should receive `workflow_id`\u002F`run_id` and poll later.\n- Register workflow classes with `@app.workflow` and `@app.workflow_run` when the workflow needs explicit workflow semantics or signals.\n- Wrap the running app with `create_mcp_server_for_app(agent_app, **fastmcp_kwargs)` only after `async with app.run() as agent_app`.\n- Expect generic workflow tools: `workflows-list`, `workflows-runs-list`, `workflows-run`, `workflows-get_status`, `workflows-resume`, `workflows-cancel`, and `workflows-store-credentials`.\n- For explicit workflow classes, expect per-workflow tools named `workflows-\u003CWorkflowName>-run`; decorator tools expose their declared names instead.\n- Avoid starting public network transports during validation; use `scripts\u002Fminimal_app_server.py --mode dry-run` to inspect the expected surface first.\n\n## MCP Primitives\n\n- **Tools**: call with `agent.call_tool(...)`, `session.call_tool(...)`, or let an attached LLM invoke allowed tools.\n- **Resources**: list\u002Fread with `list_resources()` and `read_resource(uri)`.\n- **Prompts**: list\u002Fget with `list_prompts()` and `get_prompt(...)`; use agent prompt helpers when combining prompts with resource content.\n- **Roots**: configure `roots` on the server entry; validate every URI starts with `file:\u002F\u002F`.\n- **Sampling**: provide an `MCPApp` human-input callback when nested servers may request LLM sampling approval.\n- **Elicitation**: provide an `MCPApp` elicitation callback when servers may call `elicitation\u002Fcreate`; schema fields must stay primitive (`str`, `int`, `float`, `bool`).\n\n## When Not To Use This Sub-skill\n\n- Use `..\u002Fcore-sdk\u002FSKILL.md` for basic `MCPApp`, `Agent`, LLM, and workflow construction before server integration.\n- Use `..\u002Fdurable-execution\u002FSKILL.md` for Temporal worker operations and durable workflow runtime management.\n- Use `..\u002Fcli-cloud-operations\u002FSKILL.md` for CLI command syntax, cloud deployment, and hosted app lifecycle operations.\n","# MCP Server Integration\n\nUse this sub-skill when an agent needs to connect an `mcp-agent` app to upstream MCP servers or expose an `MCPApp` itself as an MCP server. It covers transport configuration, server registry behavior, connection lifecycle, MCP primitives, OAuth\u002Fauthentication, roots, sampling, elicitation, and safe client-install preparation.\n\n## Start Here\n\n1. For app and agent construction, first read `..\u002Fcore-sdk\u002FSKILL.md`, then return here for server wiring.\n2. Choose the direction:\n   - **Consume upstream MCP servers**: configure `mcp.servers`, attach agents with `server_names`, or use `gen_client`\u002F`MCPAggregator` directly.\n   - **Expose this app as an MCP server**: decorate tools\u002Fworkflows on `MCPApp`, then call `create_mcp_server_for_app(app, **kwargs)`.\n   - **Prepare client installation\u002Fdeployment**: use the checks here, then follow `..\u002Fcli-cloud-operations\u002FSKILL.md` for CLI install\u002Fdeploy commands.\n3. Read the closest bundled reference:\n   - `references\u002Fconfiguration.md` for `MCPServerSettings`, transports, roots, registry, and client install dry-runs.\n   - `references\u002Fserver-and-client-workflows.md` for `create_mcp_server_for_app`, workflow tools, decorators, primitives, aggregators, sampling, and elicitation.\n   - `references\u002Foauth-and-auth.md` for downstream OAuth servers, token storage, pre-authorization, and OAuth-protected app servers.\n   - `references\u002Ftroubleshooting.md` for common failure modes and fixes.\n4. Use bundled scripts before running real services:\n   - `scripts\u002Fvalidate_server_config.py --help`\n   - `scripts\u002Fvalidate_server_config.py path\u002Fto\u002Fmcp_agent.config.yaml --check-executables`\n   - `scripts\u002Fminimal_app_server.py --help`\n   - `scripts\u002Fminimal_app_server.py --mode dry-run --json`\n\n## Upstream Server Checklist\n\n- Define every upstream server under `mcp.servers.\u003Cserver_name>` and make sure the agent\u002Fworkflow uses the same exact `server_name`.\n- Use `transport: stdio` with `command` and `args`; use `sse`, `streamable_http`, or `websocket` with `url`.\n- Put bearer\u002FAPI tokens in `headers` or secrets-backed placeholders; use `auth.oauth` only for delegated OAuth flows.\n- Set `roots` as `file:\u002F\u002F` URIs when a server needs declared filesystem access, and include `server_uri_alias` only when the server expects a different mounted URI.\n- Use `allowed_tools` to restrict high-risk or collision-prone tool surfaces before exposing them to an LLM.\n- Prefer `gen_client(server_name, app.context.server_registry, context=app.context)` for a direct client session and `MCPAggregator([...])` when an agent needs a combined tools\u002Fresources\u002Fprompts surface.\n\n## App Server Checklist\n\n- Register simple callable tools with `@app.tool` for synchronous results and `@app.async_tool` when callers should receive `workflow_id`\u002F`run_id` and poll later.\n- Register workflow classes with `@app.workflow` and `@app.workflow_run` when the workflow needs explicit workflow semantics or signals.\n- Wrap the running app with `create_mcp_server_for_app(agent_app, **fastmcp_kwargs)` only after `async with app.run() as agent_app`.\n- Expect generic workflow tools: `workflows-list`, `workflows-runs-list`, `workflows-run`, `workflows-get_status`, `workflows-resume`, `workflows-cancel`, and `workflows-store-credentials`.\n- For explicit workflow classes, expect per-workflow tools named `workflows-\u003CWorkflowName>-run`; decorator tools expose their declared names instead.\n- Avoid starting public network transports during validation; use `scripts\u002Fminimal_app_server.py --mode dry-run` to inspect the expected surface first.\n\n## MCP Primitives\n\n- **Tools**: call with `agent.call_tool(...)`, `session.call_tool(...)`, or let an attached LLM invoke allowed tools.\n- **Resources**: list\u002Fread with `list_resources()` and `read_resource(uri)`.\n- **Prompts**: list\u002Fget with `list_prompts()` and `get_prompt(...)`; use agent prompt helpers when combining prompts with resource content.\n- **Roots**: configure `roots` on the server entry; validate every URI starts with `file:\u002F\u002F`.\n- **Sampling**: provide an `MCPApp` human-input callback when nested servers may request LLM sampling approval.\n- **Elicitation**: provide an `MCPApp` elicitation callback when servers may call `elicitation\u002Fcreate`; schema fields must stay primitive (`str`, `int`, `float`, `bool`).\n\n## When Not To Use This Sub-skill\n\n- Use `..\u002Fcore-sdk\u002FSKILL.md` for basic `MCPApp`, `Agent`, LLM, and workflow construction before server integration.\n- Use `..\u002Fdurable-execution\u002FSKILL.md` for Temporal worker operations and durable workflow runtime management.\n- Use `..\u002Fcli-cloud-operations\u002FSKILL.md` for CLI command syntax, cloud deployment, and hosted app lifecycle operations.\n",{"name":5,"license":24,"metadata":25,"description":7,"disable-model-invocation":27},"Apache 2.0",{"disco-role":26},"operating",true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fmcp-server-integration",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":27},[38,41,44],{"tool":39,"command":40},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill mcp-server-integration",{"tool":42,"command":43},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill mcp-server-integration",{"tool":45,"command":46},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill mcp-server-integration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fmcp-server-integration\u002FSKILL.md",[49,55,59,63],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"references\u002Fconfiguration.md","REFERENCE","参考文档",7649,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fmcp-server-integration\u002Freferences\u002Fconfiguration.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Foauth-and-auth.md",9584,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fmcp-server-integration\u002Freferences\u002Foauth-and-auth.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fserver-and-client-workflows.md",9273,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fmcp-server-integration\u002Freferences\u002Fserver-and-client-workflows.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Ftroubleshooting.md",8977,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F05-技能与代理开发\u002Fmcp-agent\u002Fsub-skills\u002Fmcp-server-integration\u002Freferences\u002Ftroubleshooting.md",[68,76,81,88,95,102],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":77,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":72,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]