claude-code-skillIntegrates MCP tool servers for orchestration, state persistence with IndexedDB/localStorage, and session sync across devices in OpenClaw/Clawdbot.
Install via ClawdBot CLI:
clawdbot install Enderfga/claude-code-skillMCP (Model Context Protocol) integration for OpenClaw/Clawdbot. Use when you need to:
Triggers: "MCP", "tool server", "sub-agent orchestration", "session sync", "state persistence", "Claude Code integration"
npm install openclaw-claude-code-skill
import {
initializeMcpSystem,
addMcpServer,
executeMcpAction,
getAllTools
} from "openclaw-claude-code-skill";
// 1. Initialize all configured servers
await initializeMcpSystem();
// 2. Add a new MCP server
await addMcpServer("fs", {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
});
// 3. Get available tools
const tools = await getAllTools();
// 4. Call a tool
const result = await executeMcpAction("fs", {
method: "tools/call",
params: { name: "read_file", arguments: { path: "/tmp/test.txt" } }
});
import { createPersistStore, indexedDBStorage } from "openclaw-claude-code-skill";
const useStore = createPersistStore(
{ count: 0, items: [] },
(set, get) => ({
increment: () => set({ count: get().count + 1 }),
addItem: (item: string) => set({ items: [...get().items, item] })
}),
{ name: "my-store" },
indexedDBStorage // or omit for localStorage
);
// Check hydration status
if (useStore.getState()._hasHydrated) {
console.log("State restored!");
}
import { mergeSessions, mergeWithUpdate, mergeKeyValueStore } from "openclaw-claude-code-skill";
// Merge chat sessions from multiple sources
const mergedSessions = mergeSessions(localSessions, remoteSessions);
// Merge configs with timestamp-based resolution
const mergedConfig = mergeWithUpdate(localConfig, remoteConfig);
| Function | Purpose |
|----------|---------|
| initializeMcpSystem() | Start all MCP servers from config |
| addMcpServer(id, config) | Add new server dynamically |
| removeMcpServer(id) | Remove a server |
| pauseMcpServer(id) | Pause a server |
| resumeMcpServer(id) | Resume a paused server |
| executeMcpAction(id, req) | Call a tool on specific server |
| getAllTools() | List all available tools |
| getClientsStatus() | Get status of all MCP clients |
| setConfigPath(path) | Set custom config file location |
| createPersistStore() | Create Zustand store with persistence |
| mergeSessions() | Merge session arrays |
| mergeWithUpdate() | Merge with timestamp resolution |
| mergeKeyValueStore() | Merge key-value stores |
Create mcp_config.json:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
"status": "active"
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "your-token" },
"status": "active"
}
}
}
Set custom config path:
import { setConfigPath } from "openclaw-claude-code-skill";
setConfigPath("/path/to/mcp_config.json");
Generated Mar 1, 2026
Developers working on multiple machines can sync their MCP tool configurations and session states. This ensures consistent access to filesystem, GitHub, and other MCP servers across devices, reducing setup time and improving workflow continuity.
Teams can merge chat sessions and tool states from different members during code reviews. This allows for synchronized discussions and shared access to files or GitHub data via MCP servers, enhancing collaboration efficiency.
AI agents using this skill can maintain state across sessions with IndexedDB or localStorage. This is useful for long-running tasks like data processing or monitoring, where state persistence prevents data loss and enables resumption.
Organizations can dynamically add or remove MCP servers (e.g., filesystem, GitHub) based on project needs. This supports flexible integration of external tools without restarting the main application, ideal for agile development environments.
Instructors can set up MCP servers for students to interact with filesystems or GitHub in coding exercises. Session sync allows sharing progress across devices, while state persistence helps track learning milestones over time.
Offer a cloud-based service that integrates this skill to provide synchronized MCP tool management and state persistence. Charge subscription fees based on team size and usage, targeting companies needing cross-device development tools.
Provide consulting to help businesses implement this skill for specific MCP server setups, such as custom filesystem or GitHub integrations. Revenue comes from project-based fees and ongoing support contracts.
Release a free version with basic MCP server management and state persistence, then upsell to a premium tier with advanced features like enhanced session sync and priority support. Monetize through in-app purchases or annual licenses.
💬 Integration Tip
Start by configuring a simple filesystem MCP server to test persistence and sync features, then gradually add more servers like GitHub for broader tool integration.
Transform AI agents from task-followers into proactive partners that anticipate needs and continuously improve. Now with WAL Protocol, Working Buffer, Autonomous Crons, and battle-tested patterns. Part of the Hal Stack 🦞
Use the ClawdHub CLI to search, install, update, and publish agent skills from clawdhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawdhub CLI.
Clawdbot documentation expert with decision tree navigation, search scripts, doc fetching, version tracking, and config snippets for all Clawdbot features
Interact with Moltbook social network for AI agents. Post, reply, browse, and analyze engagement. Use when the user wants to engage with Moltbook, check their feed, reply to posts, or track their activity on the agent social network.
OpenClaw CLI wrapper — gateway, channels, models, agents, nodes, browser, memory, security, automation.
MoltGuard — runtime security plugin for OpenClaw agents by OpenGuardrails. Helps users install, register, activate, and check the status of MoltGuard. Use wh...