Docs/OpenClaw/MCP Servers
Guide

MCP Servers

Model Context Protocol (MCP) servers extend your agent with standardized tools from a 13,000+ server ecosystem. Connect to filesystems, APIs, databases, and more.

What is MCP?#

The Model Context Protocol (MCP) is an open standard originally developed by Anthropic for connecting AI agents to external tools and data sources. It was donated to the Linux Foundation's Agentic AI Foundation in late 2025 and is co-governed by Anthropic, OpenAI, and Block.

MCP servers are lightweight programs that expose tools (functions the AI can invoke), resources (data for context), and prompts (templates). They communicate via JSON-RPC 2.0 over stdio or HTTP.

P

Portable

MCP servers work with any MCP-compatible host: OpenClaw, Claude Code, Cursor, VS Code, and more.

S

Standardized

JSON-RPC 2.0 protocol with typed schemas. No custom integration code needed.

E

Ecosystem

13,000+ community servers on registries like npm, PyPI, and mcp.run.

Available MCP Servers#

Lobstack pre-configures these MCP servers. Enable them from Dashboard → Skills → MCP.

ServerPackageCategoryDescription
Filesystem@modelcontextprotocol/server-filesystemFilesystemRead, write, search files in the agent workspace
Web Fetch@modelcontextprotocol/server-fetchSearchFetch and extract content from URLs
GitHub@modelcontextprotocol/server-githubDevelopmentInteract with repos, issues, PRs, and actions
Memory@modelcontextprotocol/server-memoryDataPersistent key-value memory across conversations
Slack@modelcontextprotocol/server-slackCommunicationRead and send Slack messages, manage channels

How It Works#

When an MCP server is enabled, OpenClaw spawns it as a child process and discovers its available tools. The AI model can then call those tools naturally during conversation, just like built-in tools.

MCP Server Lifecycle
1. Agent starts  ->  OpenClaw reads openclaw.json
2. For each mcpServers entry:
   a. Spawn process (npx/node/python command)
   b. Initialize JSON-RPC 2.0 connection
   c. Discover available tools via "tools/list"
   d. Register tools in agent's tool inventory
3. During conversation:
   a. AI model decides to call an MCP tool
   b. OpenClaw forwards the call to the server
   c. Server executes and returns results
   d. Results passed back to the AI model

Configuration#

MCP servers are configured in the mcpServers section of openclaw.json:

openclaw.json — MCP section
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/root/.openclaw/workspace"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Configuration Fields#

FieldTypeDescription
commandstringCommand to spawn the server (npx, node, python, uvx)
argsstring[]Arguments passed to the command
envobjectEnvironment variables for the server process

MCP vs Skills#

AspectMCP ServersOpenClaw Skills
ProtocolJSON-RPC 2.0 (standardized)Markdown + YAML frontmatter
RuntimeExternal process (child process)Runs inside OpenClaw gateway
PortabilityWorks with any MCP hostOpenClaw-specific
Ecosystem13,000+ servers5,700+ on ClawHub
Use CaseStructured tool accessNatural language task guidance
Best ForAPIs, databases, file systemsWorkflows, specialized tasks

Use both

MCP servers and Skills complement each other. Use MCP for structured tool access (GitHub API, database queries) and Skills for natural-language task guidance (code review workflows, content writing patterns).

Security#

MCP servers run on the agent VM with these security measures:

  • Process isolation — Each MCP server runs as a separate child process
  • Workspace scoping — Filesystem server restricted to /root/.openclaw/workspace
  • Credential management — API keys stored via Lobstack's encrypted credential system
  • Audit logging — MCP server enable/disable actions are logged
⚠️

Community servers

Before enabling a community MCP server, review its source code and check for known vulnerabilities. Only install servers from trusted publishers.

API Reference#

List MCP Servers#

GET /api/agent/mcp
curl -b "sb-access-token=YOUR_TOKEN" \
  "https://lobstack.ai/api/agent/mcp"

Enable/Disable MCP Server#

POST /api/agent/mcp
curl -X POST -H "Content-Type: application/json" \
  -b "sb-access-token=YOUR_TOKEN" \
  -d '{"serverId": "github", "enabled": true, "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..."}}' \
  "https://lobstack.ai/api/agent/mcp"