Skip to content

LDMB123/mcporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

720 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCPorter

TypeScript runtime, CLI, and code-generation toolkit for the Model Context Protocol. MCPorter discovers MCP servers already configured on your machine, calls their tools from a stable CLI or TypeScript API, and can generate server-specific CLIs or typed clients when a workflow needs a smaller surface.

Try It

npx mcporter list
npx mcporter list linear --schema
npx mcporter call linear.create_comment issueId:ENG-123 body:'Looks good!'
npx mcporter generate-cli linear --bundle dist/linear.js
npx mcporter emit-ts linear --mode client --out src/linear-client.ts

Human progress and prompts go to stderr. Use command-specific machine output flags for scripts, such as mcporter call --output json.

What It Does

  • Discovers home, project, and imported MCP config from Cursor, Claude, Codex, Windsurf, OpenCode, and VS Code.
  • Calls HTTP, SSE, and stdio MCP tools through one CLI/runtime surface.
  • Handles OAuth setup and cached token refresh without putting secrets in project files.
  • Keeps selected stateful servers warm through the daemon and can expose them through mcporter serve.
  • Generates standalone CLIs with embedded schemas and typed clients for agent or test workflows.
  • Records and replays MCP JSON-RPC traffic for offline debugging and redacted repros.

Docs

Developer Workflow

Use pnpm and the repo runner so guardrails apply consistently:

pnpm install
./runner pnpm check
./runner pnpm test
./runner pnpm build

Useful local smokes:

./runner pnpm mcporter:list
./runner pnpm mcporter:call -- --help

Live MCP tests are opt-in:

MCP_LIVE_TESTS=1 ./runner pnpm test:live

Safety

Keep OAuth tokens, bearer tokens, .env*, and provider credentials in local environment, the MCPorter vault, or provider-managed stores. Project config may reference environment variables, but should not store secret values directly.

License

MIT. See LICENSE.

About

Call MCPs via TypeScript, masquerading as simple TypeScript API. Or package them as cli.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 95.1%
  • JavaScript 4.6%
  • Shell 0.3%