mcporter
Call MCPs via TypeScript, masquerading as simple TypeScript API. Or package them as cli.
claude mcp add --transport stdio steipete-mcporter npx -y mcporter
How to use
MCPorter is a TypeScript runtime, CLI, and code-generation toolkit that helps you discover and call MCP servers already configured on your system. It can auto-discover MCPs from your environment, generate typed tool clients, and produce per-server CLIs so you can integrate MCP calls into automated workflows or downstream tooling. With mcporter you can list available MCP servers, inspect their signatures, call tools directly from TypeScript, or spin up ad-hoc CLI endpoints that map to any MCP endpoint you encounter. The tool emphasizes zero-configuration discovery, a friendly API surface for composing multiple MCP calls, and on-the-fly OAuth support for endpoints that require authentication. Use mcporter call to invoke a specific MCP’s functionality, or mcporter list to enumerate all known MCPs, their parameters, and return shapes. The project also ships capabilities to generate CLI wrappers and TypeScript typings so agents and tests can call MCP servers with strong type guarantees.
Once installed, you can rely on two core flows: discovering and calling existing MCPs, and generating code or CLIs for those MCPs. The CLI supports two primary operations: list and call. list shows registered MCP servers and their available tools, while call allows you to invoke a specific function signature either in a colon-delimited style or a function-call style that mirrors TypeScript signatures. If you are developing tooling in TypeScript, you can generate d.ts typings or client wrappers with mcporter emit-ts, making it straightforward to integrate MCPs into your own apps without manually wiring transport or argument validation.
How to install
Prerequisites
- Node.js (preferred via Node 16+ with npm/yarn)
- Access to the internet to install npm packages
Installation steps
- Install the mcporter CLI from npm (global install recommended for CLI use):
# Using npm
npm install -g mcporter
# Or using corepack if available (macOS/Linux/Windows)
corepack enable
corepack prepare mcporter@latest --activate
- Verify installation
mcporter --version
- (Optional) Initialize a local configuration or use ad-hoc connections as you discover MCPs. The CLI will auto-discover MCPs configured in your environment and through Cursor/Claude/Codex integrations when available.
Prerequisites in brief
- Node.js runtime and npm/yarn available
- Network access to fetch the mcporter package and any MCP definitions
- Basic familiarity with MCPs and how to structure calls (via mcporter call)
Additional notes
Notes and tips:
- mcporter supports ad-hoc MCP endpoints; you can point the CLI at any HTTP or stdio MCP endpoint and later persist it to your config for reuse.
- For endpoints requiring OAuth, mcporter can perform on-the-fly OAuth prompts and cache tokens for subsequent calls.
- Use mcporter list --json for machine-readable summaries of MCPs, including per-server statuses and signatures.
- If you plan to embed MCP calls in TypeScript projects, use mcporter emit-ts to generate typed client wrappers and .d.ts definitions for strong typing.
- When working with ad-hoc endpoints, you can use the --env flag to inject environment variables required by the MCP (e.g., API keys or tokens).
Related MCP Servers
gemini -tool
MCP server that enables AI assistants to interact with Google Gemini CLI, leveraging Gemini's massive token window for large file analysis and codebase understanding
sudocode
Lightweight agent orchestration dev tool that lives in your repo
mcpm
A command-line tool for managing MCP servers in Claude App. Also can run a MCP Server to help you manage all your MCP Servers
Alph
Universal MCP Server Configuration Manager
mcp_ctl
A package manager to manage all your mcp servers across platforms
PDFlow
Transform PDFs into structured data with AI-powered extraction + CLI + MCP + Web.