← Back to directory
M

MCPorter

Community
Carry MCP tools into scripts, CLIs, and agents
GitHub source repository ↗
★ 5.0k Stars Category · Dev Tools Very popular Source revision ae3d9000c320
63FMRS · C
Reliability
8/20
Security and permissions
12/20
Maintenance
17/20
Documentation
16/20
Setup experience
10/20

MCPorter is a versatile tool for calling MCP tools from scripts and CLIs, offering flexible commands and a TypeScript API. It is suitable for developers and coding agents, but requires careful handling of security and configuration.

Read the FMRS scoring method →

MCPorter is a TypeScript runtime and command-line tool for discovering and calling Model Context Protocol (MCP) servers. It is for developers and coding agents that need the same MCP tools from a terminal, a script, or a generated standalone CLI. It supports stdio, Streamable HTTP, and legacy SSE servers, reads project and user config, and can import MCP servers from Cursor, Claude Code and Desktop, Codex, Windsurf, OpenCode, and VS Code. It provides commands like mcporter list, call, resource, auth, vault, generate-cli, emit-ts, record, and replay. It also offers a TypeScript runtime API such as createRuntime(), callOnce(), and createServerProxy() for tool calling in scripts.

Tools

list
List MCP servers and their tools
call
Call an MCP tool and get results
resource
Read an MCP resource
auth
Complete or seed OAuth authentication
vault
Manage authentication secrets or tokens
generate-cli
Generate a standalone CLI for a specific server
emit-ts
Generate TypeScript types or clients
record
Record a reproducible MCP session
replay
Replay a recorded MCP session

Setup

Install globally via npm: npm install -g mcporter; or via Homebrew: brew install steipete/tap/mcporter. You can also try the CLI without installing using npx mcporter --version. Node 24 or newer is required.

Fit and risk

Best for

  • Developers who need to call MCP tools from scripts or CLIs
  • Developers building generated clients or CLIs
  • TypeScript and Node.js environments

Not for

  • Long-running, always-on server endpoints (not the focus)
  • Non-TypeScript or non-Node.js environments
  • Users requiring advanced authentication and permission management (needs external config)

Required permissions

  • Access to MCP servers (network or local stdio commands)
  • Read user and project configuration files based on config
  • File writes for generated artifacts (e.g., CLI generation or type emission)

Risks and side effects

  • Executing tools fetched from MCP servers can have side effects
  • Misconfiguration could accidentally connect to untrusted servers
  • Using OAuth credentials may pose security risks if not configured properly

Troubleshooting

  1. Check Node version (>=24)
  2. Verify server URL or command is correct
  3. Check config file JSONC format and path
  4. Try `mcporter list` to confirm connectivity

Use cases

Quickly inspect public MCP servers and call tools from the command line
Integrate MCP tools into TypeScript scripts or runtimes
Generate standalone CLIs for specific servers
Record and replay MCP sessions for reproducible testing
Import MCP servers from other client configurations

Supported clients

Supported clients have not been confirmed yet.