Community生產力與協作github.com

steipete/mcporter

透過 HTTP 或 stdio 列出、設定、驗證、呼叫及檢視 MCP 伺服器/工具。

mcporter 是什麼?

這個技能讓 AI 代理(如 Claude Code、Cursor、Codex 等)能夠與 MCP(Model Context Protocol)伺服器互動,透過 `mcporter` 工具以 HTTP 或 stdio 協定進行操作。使用者可以動態列出所有可用的 MCP 伺服器及其工具、設定驗證方式(如 API 金鑰或 OAuth)、建立安全的呼叫管道、檢查工具定義(包括參數與回傳值),以及直接執行工具呼叫。此技能支援跨平台環境(包括本地端與雲端),讓開發者能夠無縫整合 MCP 伺服器至他們的工作流程中,無需手動處理底層的傳輸細節。其核心優勢在於簡化 MCP 伺服器的管理與偵錯,提升 AI 代理串接外部工具時的穩定性與可擴充性。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/steipete/clawdis/tree/main/skills/mcporter

Installed? Explore more 生產力與協作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

mcporter 是做什麼的?

透過 HTTP 或 stdio 列出、設定、驗證、呼叫及檢視 MCP 伺服器/工具。

概述

mcporter 是一個指令列工具,負責管理 MCP (Model Context Protocol) 伺服器與工具的生命週期。它將多個 MCP 伺服器抽象化為單一介面,支援 HTTP API 與標準 I/O (stdio) 兩種通訊模式。

功能

  • 列出:顯示所有已註冊的 MCP 伺服器及其提供的工具。
  • 設定:動態調整伺服器設定,包括端點 URL、逾時值及驗證資訊。
  • 驗證:支援多種驗證機制,如 API 金鑰、OAuth 或自訂標頭。
  • 呼叫:透過統一的 API 叫用特定工具,無需直接與個別伺服器通訊。
  • 檢視:檢查工具的完整定義,包括輸入參數、輸出格式與任何必要條件。

安裝

# 透過 npm 安裝(範例)
npm install -g mcporter

# 或者從原始碼編譯
git clone https://github.com/steipete/mcporter.git
cd mcporter
pip install .

使用方式

啟動 mcporter 伺服器

mcporter serve --port 8080

列出所有伺服器與工具

mcporter list

設定伺服器驗證

mcporter configure myserver --auth-type api-key --api-key "your-api-key"

呼叫工具

mcporter call myserver mytool --param1 value1 --param2 value2

透過 HTTP 呼叫

curl -X POST http://localhost:8080/call \
  -H "Content-Type: application/json" \
  -d '{"server": "myserver", "tool": "mytool", "args": {"param1": "value1"}}'

支援的環境

  • 本地環境:直接透過 stdio 或本地 HTTP 伺服器執行。
  • 雲端環境:可部署為獨立服務,支援反向代理與 SSL/TLS。
  • CI/CD 管道:可整合至自動化腳本,用於測試或部署前檢查。

設定檔

mcporter 會從下列位置載入設定(依優先順序):

  1. 指令列參數
  2. 環境變數(MCPORTER_*)
  3. 設定檔(~/.mcporter/config.yaml)
  4. 預設值

範例設定檔 ~/.mcporter/config.yaml:

servers:
  myserver:
    type: mcp
    endpoint: https://api.example.com/mcp
    auth:
      type: api-key
      key: "your-api-key"

與 AI 代理整合

此技能可直接被 AI 代理(如 Claude Code、Cursor 或 Codex)使用,透過 mcporter 的 HTTP 或 stdio 介面來動態探索與叫用 MCP 工具。代理可以自動列出可用的工具、檢查其定義,並根據使用者需求執行呼叫,無需手動設定每項工具的連線細節。

進階範例

使用 stdio 通訊

mcporter stdio --server myserver --tool mytool --args '{"param1": "value"}'

註冊多個伺服器

mcporter add-server mydb --type mcp --endpoint https://db.example.com/mcp
mcporter add-server myllm --type mcp --endpoint https://llm.example.com/mcp

偵錯模式

mcporter serve --debug --log-file mcporter.log

限制與注意事項

  • 部分驗證方式(如 OAuth 2.0 with PKCE)需要使用者互動,無法完全自動化。
  • 工具的回傳資料大小可能會受到 HTTP 或 stdio 緩衝區限制。
  • 對於高延遲的伺服器,建議設定合適的逾時值。

延伸閱讀

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

steipete/1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

steipete/apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

steipete/apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

steipete/bear-notes

Create, search, and manage Bear notes via grizzly CLI.

steipete/blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

steipete/blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

steipete/bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

steipete/camsnap

Capture frames or clips from RTSP/ONVIF cameras.

steipete/clawhub

Search, install, update, sync, or publish agent skills with the ClawHub CLI and registry.

steipete/coding-agent

Delegate coding work to Codex, Claude Code, or OpenCode as background workers; not simple edits or read-only code lookup.

steipete/discord

Discord message-tool ops: send/read/edit/delete, react, poll, pin, thread, search, presence, media/components.

steipete/eightctl

Control Eight Sleep pods (status, temperature, alarms, schedules).

steipete/gemini

Gemini CLI one-shot prompts, summaries, generation, skills, hooks, MCP, or Gemma routing.

steipete/gh-issues

Fetch GitHub issues, select candidates, spawn background fix agents, open PRs, and optionally process PR review comments.

steipete/gifgrep

Search GIF providers with CLI/TUI, download results, and extract stills/sheets.

steipete/github

GitHub CLI for issues, PRs, CI/check logs, comments, reviews, releases, repos, and gh api queries.

steipete/gog

Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.

steipete/goplaces

Query Google Places for text search, place details, resolve, reviews, or scriptable JSON via goplaces.

steipete/healthcheck

Audit/harden OpenClaw hosts: SSH, firewall, updates, exposure, backups, disk encryption, gateway security.

steipete/himalaya

Himalaya CLI for IMAP/SMTP mail: list, read, search, compose, reply, forward, copy, move, delete.

相關技能