OM

openclaw/mcporter

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

5098 stars 362 forks 品質 88 トレンド 50MIT

単純なTypeScript APIを装ってMCPを呼び出すこともできます。またはCLIとしてパッケージ化してください。

概要

TypeScriptランタイム、CLI、モデルコンテキストプロトコル用のコード生成ツールキット。 MCPorterはAnthropicのガイダンスで強調されている「コード実行」ワークフローに身を置くのに役立ちます。システム上で既に設定されているMCPサーバーを発見し、直接呼び出せば、TypeScriptでより豊かな自動化を作成し、ツールを共有する際には単一目的のCLIをミントできます。これらはすべて箱からすぐに動作します――定型文もスキーマの探求も不要です。 - createRuntime() はまずホーム設定(~/.mcporter/mcporter.json[c]、または設定時の $XDG_CONFIG_HOME/mcporter/mcporter.json[c])をマージし、その後 config/mcporter.json、さらに Cursor/Claude/Codex/Windsurf/OpenCode/VS Code をインポートし、${ENV} プレースホルダーを拡張し、複数の呼び出し間でトランスポートを再利用できるように接続をプールします。- mcporter generate-cli は、任意の MCP サーバー定義をすぐに実行可能な CLI に変換し、オプションでバンドル/コンパイルやメタデータを容易に再生できるようにします。- mcporter emit-ts は .d. をエミットします。

概要(AI 翻訳)

MCPorterは、Model Context Protocolサーバーの発見と呼び出しを行うためのTypeScriptランタイムおよびコマンドラインツールです。これは、ターミナル、スクリプト、または生成されたスタンドアロンCLIから同じMCPツールを必要とする開発者やコーディングエージェント向けです。

インストール

CLIをインストールせずに試してみてください:

繰り返しコマンドラインで使用するためにインストールしてください:

npmのインストールにはNode 24以降が必要です。TypeScriptランタイムでは、パッケージマネージャーでプロジェクトにmcporterを追加してください。署名済みmacOSバイナリやその他のサポートされたインストールパスはインストールガイドで説明されています。

クイックスタート

公開MCPサーバーを検査し、そのツールのいずれかを呼び出します:

最初のコマンドはサーバーのTypeScriptスタイルのツールシグネチャを印刷します。2つ目はローカル設定や認証情報なしで一致するContext7ライブラリIDを返します。リソース、生成されたCLI、タイプ付きクライアントについては5分間のクイックスタートをご覧ください。

コアワークフロー

目標 コマンドまたはAPI 詳細
サーバーとツールの発見 mcporter list CLI参照

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCPorter 🧳 — Carry MCP tools into scripts, CLIs, and agents

MCPorter is a TypeScript runtime and command-line tool for discovering and calling Model Context Protocol servers. It is for developers and coding agents that need the same MCP tools from a terminal, a script, or a generated standalone CLI.

Install

Try the CLI without installing it:

npx mcporter --version

Install it for repeated command-line use:

brew install steipete/tap/mcporter
# or
npm install -g mcporter

Node 24 or newer is required for npm installs. For the TypeScript runtime, add mcporter to your project with your package manager. Signed macOS binaries and the other supported install paths are covered in the install guide.

Quick start

Inspect a public MCP server, then call one of its tools:

npx mcporter list https://mcp.context7.com/mcp --brief
npx mcporter call https://mcp.context7.com/mcp.resolve-library-id \
  query="React hooks docs" libraryName=react

The first command prints the server’s TypeScript-style tool signatures. The second returns matching Context7 library IDs without requiring local configuration or credentials. See the five-minute quickstart for resources, generated CLIs, and typed clients.

Core workflows

Goal Command or API Details
Discover servers and tools mcporter list CLI reference
Call tools and read resources mcporter call, mcporter resource Call syntax
Connect to a one-off URL or stdio command --http-url, --stdio Ad-hoc servers
Complete or seed OAuth mcporter auth, mcporter vault Configuration
Encrypt the OAuth vault at rest MCPORTER_VAULT_PASSWORD Vault Encryption
GitHub で README 全文を見る

インストール

npx mcporter --version
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "context7": { "url": "https://mcp.context7.com/mcp" } } }