跳到正文
TakoAPI
返回技能列表

claude-code-skill

由 enderfga 提供

Clawdbot Tools
2.4k下载量由 clawskills.sh 提供
2浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

MCP (Model Context Protocol) integration.

描述

该技能的功能

npm package for integrating MCP (Model Context Protocol) tool servers into OpenClaw/Clawdbot agents. Provides APIs for managing MCP server lifecycles, persisting state via IndexedDB or localStorage, and merging sessions across devices.

Bundles MCP server orchestration, state persistence, and session merging into one package instead of wiring each concern separately.

何时使用

  • Connecting a filesystem MCP server to read and write local files during agent tasks
  • Adding a GitHub MCP server to let an agent query repos and issues
  • Persisting agent state between page reloads using IndexedDB
  • Syncing chat session history across multiple browser tabs or devices
  • Dynamically pausing and resuming MCP servers without restarting the agent

示例工作流

输入

User asks: set up a filesystem MCP server and read a file

智能体
  1. 1

    Call initializeMcpSystem() to start servers from mcp_config.json

  2. 2

    Call addMcpServer('fs', { command: 'npx', args: ['-y', '@modelcontextprotocol/server-filesystem', '/tmp'] }) to register the server

  3. 3

    Call getAllTools() to confirm the read_file tool is available

  4. 4

    Call executeMcpAction('fs', { method: 'tools/call', params: { name: 'read_file', arguments: { path: '/tmp/test.txt' } } }) to read the file

输出

File contents returned from the filesystem MCP server

前置要求

  • GITHUB_TOKEN environment variable (only if using the GitHub MCP server)

安装

clawhub install enderfga/claude-code-skill

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接