Claude Skill
openclaw/mcporter
McPorter 是一个 TypeScript 工具,允许你将 MCP 调用伪装成简单的 TypeScript API,或将其打包为 CLI 工具。轻量、类型安全、易于集成。
概览
仓库信息
安装这个 Skill
npx mcporter call linear.create_comment issueId:ENG-123 body:'Looks good!'Registry 信息
npx mcporter call linear.create_comment issueId:ENG-123 body:'Looks good!'npx mcporter call 'linear.create_comment(issueId: "ENG-123", body: "Looks good!")'npx mcporter call server.tool -- --raw-valuenpx mcporter listnpx mcporter list context7 --schema
项目简介
McPorter 是一个 TypeScript 工具,允许你将 MCP(模型上下文协议)调用伪装成简单的 TypeScript API,或者将其打包为 CLI 工具。
Call MCPs via TypeScript, masquerading as simple TypeScript API. Or package them as cli.
要点
- 将 MCP 调用伪装成简单的 TypeScript API
- 将 MCP 打包为 CLI 工具
- 使用 TypeScript 构建,提供类型安全
- 轻量级且易于集成
使用场景
- 将 MCP 无缝集成到 TypeScript 项目中
- 为基于 MCP 的服务创建 CLI 包装器
- 简化开发工作流中的 MCP 消费
README 摘要
# MCPorter 🧳 - Call MCPs from TypeScript or as CLI <p align="center"> <img src="https://raw.githubusercontent.com/steipete/mcporter/main/mcporter.png" alt="MCPorter header banner" width="1100"> </p> <p align="center"> <a href="https://www.npmjs.com/package/mcporter"><img src="https://img.shields.io/npm/v/mcporter?style=for-the-badge&logo=npm&logoColor=white" alt="npm version"></a> <a href="https://github.com/steipete/mcporter/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/steipete/mcporter/ci.yml?branch=main&style=for-the-badge&label=tests" alt="CI Status"></a> <a href="https://github.com/steipete/mcporter"><img src="https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=for-the-badge" alt="Platforms"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green?style=for-the-badge" alt="MIT License"></a> </p> _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