← Home

Guide

McPorter for OpenClaw

McPorter is a TypeScript runtime and command-line tool for calling MCP (Model Context Protocol) servers. This guide explains what it does and how it relates to OpenClaw, which has its own way of connecting MCP servers.

Commands on this page were checked on OpenClaw 2026.11.6 and mcporter 0.17.1 on 23 November 2026.

What Is McPorter?

McPorter (npm package mcporter, repository github.com/openclaw/mcporter) is for developers and coding agents that need the same MCP tools from a terminal, a script or a generated standalone CLI. It is not a marketplace and it does not install MCP servers. It connects to servers you point it at. Its main parts are:

  • Discovery — mcporter list shows the servers it knows about and the tools each one exposes
  • Calling — mcporter call runs one tool, and mcporter resource lists or reads resources
  • Generation — mcporter generate-cli builds a standalone CLI for one server, and mcporter emit-ts produces TypeScript types or a typed client
  • Auth and replay — auth and vault handle OAuth, and record and replay capture and rerun an MCP session
  • Serving — mcporter serve exposes configured servers through one endpoint

McPorter vs. OpenClaw's MCP Client

McPorter and OpenClaw are separate tools with separate config. Giving your OpenClaw agent an MCP server is done in OpenClaw, not with McPorter.

McPorterOpenClaw MCP client
What it isCLI and TypeScript runtime for calling MCP serversBuilt-in client that gives agents MCP tools
Configconfig/mcporter.jsonmcp.servers in OpenClaw config
Who calls the toolsYou, a script or a coding agentYour OpenClaw agent
How to add a servermcporter config addControl UI or openclaw mcp add

OpenClaw does not read McPorter's config/mcporter.json, and McPorter does not write to OpenClaw's config. ClawHub is neither: it is a registry of skills (SKILL.md files), not MCP servers.

Installing McPorter

McPorter needs Node 24 or newer for npm installs:

# Try it without installing
npx mcporter --version

# Install globally
npm install -g mcporter

Using McPorter

List a Server and Call a Tool

This example uses the public Context7 server, so it needs no local configuration:

npx mcporter list https://mcp.context7.com/mcp --brief
npx mcporter call https://mcp.context7.com/mcp.resolve-library-id \
  query="React hooks docs" libraryName=react

The first command prints the server's tool signatures. The second calls one tool and prints the result. Use --output text|markdown|json|raw to choose the format.

Configure a Server

McPorter reads project and user config, and also imports servers from other clients such as Cursor, Claude Code and Claude Desktop, Codex, Windsurf, OpenCode and VS Code. A minimal config/mcporter.json:

{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    }
  }
}

Generate a CLI or Typed Client

npx mcporter generate-cli --command https://mcp.context7.com/mcp --minify
npx mcporter emit-ts context7 --mode client --out src/context7-client.ts

Run mcporter <command> --help for the flags each command supports.

Giving OpenClaw an MCP Server

To make an MCP server available to your OpenClaw agent, add it to OpenClaw. In the Control UI go to Settings → MCP and select Add server, or use the CLI:

openclaw mcp add memory --command npx --arg -y --arg @modelcontextprotocol/server-memory

The CLI commands that write config need the local Gateway stopped. To check that a server connects, run openclaw mcp doctor memory --probe; it also requires the Gateway to be stopped and refuses to run while a Gateway owns the selected state directory. While the Gateway runs, openclaw mcp status --verbose only checks the saved definition and does not connect. See our MCP servers for OpenClaw guide for more examples and OpenClaw + MCP for how the client works.

McPorter on OpenClaw Launch

OpenClaw Launch runs the OpenClaw Gateway for you. McPorter is a separate command-line tool that you run on your own machine, so it is useful for testing an MCP server from your terminal before you add it to your agent, or for scripts that call MCP tools directly.

Frequently Asked Questions

What is McPorter?

McPorter is a TypeScript runtime and command-line tool for calling MCP (Model Context Protocol) servers and generating typed clients and standalone CLIs from them. It is not a marketplace and does not install servers.

Does McPorter install MCP servers into OpenClaw?

No. McPorter has no install command and no OpenClaw target. OpenClaw keeps its own server list under mcp.servers and does not read McPorter's config/mcporter.json. To add a server to OpenClaw, use openclaw mcp add or the Control UI.

Do I need McPorter if I use ClawHub?

No. ClawHub is a registry of skills, not MCP servers, and OpenClaw connects to MCP servers by itself. McPorter is useful when you want to call MCP tools from a shell or a script.

Is McPorter free?

McPorter is open source under the MIT license. The MCP servers you call may have their own pricing or require API keys.

On Hermes Agent

McPorter is a standalone CLI, so the same commands work wherever you run it. For the Hermes Agent side, see Hermes Agent + McPorter.

What's Next?

OpenClaw, Already Running

Deploy a managed OpenClaw agent in about 30 seconds, then connect MCP servers.

Deploy with OpenClaw Launch