MCP ConfigsMay 14, 2026·3 min read

mcporter — TypeScript API Wrapper for MCPs

A TypeScript-first wrapper to call MCP tools as a typed API or package them as a CLI; verified 4399★, pushed 2026-05-14.

Agent ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Native · 94/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Mcp
Install
Pnpm|Npm|Brew
Trust
Trust: Established
Entrypoint
mcporter
Universal CLI install command
npx tokrepo install 66d97d29-dfb4-5d21-b021-d98ae7935530
Intro

A TypeScript-first wrapper to call MCP tools as a typed API or package them as a CLI; verified 4399★, pushed 2026-05-14.

Best for: TypeScript teams who want a clean API surface over MCP tool calls

Works with: Node.js runtimes; works with MCP tool providers and CLI workflows per README

Setup time: 6-12 minutes

Key facts (verified)

  • GitHub: 4399 stars · 281 forks · pushed 2026-05-14.
  • License: MIT · owner avatar + repo URL verified via GitHub API.
  • README-backed entrypoint: mcporter.

Main

  • Treat MCP calls as an API: wrap tool invocations behind typed functions so your agent/app logic stays readable.

  • Start with the CLI when prototyping; switch to a library import once the tool surface stabilizes.

  • Keep transport concerns separate: use mcporter to standardize how you connect to MCP providers across environments.

  • Document your tool contracts in code: types + examples reduce agent hallucinations about tool params.

README (excerpt)

MCPorter 🧳 - Call MCPs from TypeScript or as CLI

MCPorter header banner

npm version CI Status Platforms MIT License

TypeScript runtime, CLI, and code-generation toolkit for the Model Context Protocol.

MCPorter helps you lean into the "code execution" workflows highlighted in Anthropic's Code Execution with MCP guidance: discover the MCP servers already configured on your system, call them directly, compose richer automations in TypeScript, and mint single-purpose CLIs when you need to share a tool. All of that works out of the box -- no boilerplate, no schema spelunking.

Key Capabilities

  • Zero-config discovery. createRuntime() merges your home config (~/.mcporter/mcporter.json[c], or $XDG_CONFIG_HOME/mcporter/mcporter.json[c] when set) first, then config/mcporter.json, plus Cursor/Claude/Codex/Windsurf/OpenCode/VS Code imports, expands ${ENV} placeholders, and pools connections so you can reuse transports across multiple calls.
  • One-command CLI generation. mcporter generate-cli turns any MCP server definition into a ready-to-run CLI, with optional bundling/compilation and metadata for easy regeneration.
  • Typed tool clients. mcporter emit-ts emits .d.ts interfaces or ready-to-run client wrappers so agents/tests can call MCP servers with strong TypeScript types without hand-writing plumbing.
  • Friendly composable API. createServerProxy() exposes tools as ergonomic camelCase methods, automatically applies JSON-schema defaults, validates required arguments, and hands back a CallResult with .text(), .markdown(), .json(), .images(), and .content() helpers.

Source-backed notes

  • README shows install options including pnpm add mcporter, npm install -g mcporter, and a Homebrew tap.
  • GitHub topics include mcp and cli (verified via GitHub API).
  • Repo is MIT licensed and recently pushed (verified via GitHub API).

FAQ

  • Is there a CLI?: Yes—README includes npm install -g mcporter and mcporter --help usage.
  • Do I need TypeScript?: TypeScript is the primary target, but CLI usage works from any shell environment with Node installed.
  • What license is it under?: MIT (verified via GitHub license metadata).
🙏

Source & Thanks

Created by openclaw. Licensed under MIT.

openclaw/mcporter — ⭐ 4399

Thanks to the upstream maintainers and contributors for publishing this work under an open license.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets