Universal Connector Mcp

io.github.TeodorMCP由 GitHub 帳號 TeodorMCP 發布v0.2.0更新於 Oct 24, 2026

Security-first MCP server that connects any OpenAPI, GraphQL, gRPC or SOAP API to AI agents.

概覽

AI 產生的概覽

讓助理從規格載入任意 OpenAPI、GraphQL、gRPC 或 SOAP API,並透過少量中繼工具呼叫其操作。

可以做什麼
這台伺服器不為每個端點各開一個工具,而是把 API 規格正規化為操作登錄表,助理用 search_catalog、load_api、search_operations 和 get_operation 瀏覽,再用 execute 呼叫。它支援鏈式與平行執行、依欄位擷取以縮小回應,並對唯讀呼叫做短時間快取。內建目錄包含精選清單以及 APIs.guru 的公開規格目錄。
適用情境
當助理需要存取許多不同的 HTTP 或 RPC API,又不想為每個服務個別安裝 MCP 伺服器時適用;也適合大型 API 否則會用數百個工具佔滿上下文視窗的情況。還適合在一次呼叫中查詢多個 API 並合併結果的多步驟工作流程。
執行需求
透過 stdio 在本機執行,通常用 uvx 從 PyPI 套件 universal-connector-mcp 啟動;GraphQL、gRPC 和 SOAP 支援需要對應的額外套件。憑證依慣例從環境變數讀取,例如 GITHUB_TOKEN 或 _API_KEY。選用設定包括 UCMCP_ALLOWED_HOSTS、UCMCP_APIS_CONFIG、UCMCP_BLOCK_PRIVATE_IPS 和 UCMCP_CACHE_TTL。需要能連線目標 API 的網路。
安裝前請注意
助理可以呼叫真實 API,因此寫入、傳送或刪除資料的操作會在上游生效,依呼叫計費的 API 可能產生費用。GITHUB_TOKEN 等憑證透過環境變數提供,不應貼到對話中。預設啟用對外主機允許清單並阻擋私有 IP;放寬 UCMCP_ALLOWED_HOSTS 或 UCMCP_ALLOW_ALL_HOSTS 會擴大伺服器可觸及的範圍。已載入的規格位置會記錄在本機狀態檔中。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Universal Connector Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Universal API Connector MCP

[Universal API Connector - Any API. One MCP server.]

Any API. One MCP server.

Stop installing a new MCP server for every service: point this one at any OpenAPI/Swagger, GraphQL,
gRPC or SOAP spec - or pick one from the built-in catalog of 2500+ public APIs - and your AI agent
can call it. Securely, in fewer steps, with fewer tokens.

[CI] [PyPI] [Python] [License: MIT]

[Add to Cursor]

Installation · Meta-tools · API catalog · Examples · Configuration · Security

[Live demo: the agent discovers, loads and calls an API in a single session]

Why another one?

Most "universal API" MCP servers only speak REST/OpenAPI. This project is built around three differentiators:

  1. Truly universal - a normalized Operation model with pluggable spec adapters (OpenAPI, GraphQL, gRPC, SOAP). Tools and executors never care which protocol produced an operation.
  2. Security-first / local-first - a direct response to supply-chain attacks like the AgentBaiting / FakeGit campaign. Outbound requests are restricted to an allowlist, secrets never touch logs, responses are size-capped, and every call is audit-logged. No arbitrary code execution, no binary downloads, no telemetry.
  3. Built for context efficiency - field-level response filtering, chained and parallel execution, and response caching mean whole workflows fit in one tool call and responses stay small.

How it works

[One connector, every protocol]

The agent explores APIs like a filesystem instead of loading hundreds of tools at once (which would blow up the context window on large APIs like Stripe). It searches for operations, inspects the ones it needs, then executes them.

Architecture (click to expand)
mermaid
flowchart TD    Agent["AI Agent"] -->|"MCP stdio"| Server["FastMCP Server"]    Server --> Tools["Meta-tools"]    Tools --> Registry["Operation Registry (normalized)"]    Adapters["Spec Adapters"] --> Registry    Tools --> Guard["Security Guard"]    Guard --> Executor["Protocol Executors"]    Executor --> Auth["Auth Manager"]    Executor --> UpstreamAPI["Upstream API"]

Meta-tools

ToolPurpose
search_catalogFind ready-to-load public APIs (curated list + APIs.guru directory, 2500+ specs)
load_apiRegister an API from a spec URL/file (protocol auto-detected)
list_apisList loaded APIs
search_operationsFuzzy-search operations across loaded APIs
get_operationFull parameter/response schema for one operation
executeCall an operation (auth + security guard applied); extract returns only the fields you ask for
execute_chainedRun a sequence of operations in one call, piping results between steps; nested lists run in parallel
execute_graphRun a dependency graph of operations; order is inferred from ${id.path} references and independent nodes run in parallel automatically
unload_apiRemove a loaded API
audit_logRecent outbound calls (method, host, path, status)

Why fewer steps (and fewer tokens)

[Fewer steps, fewer tokens]

Where a per-API MCP server needs one tool round-trip per call - each returning a full JSON payload into the agent's context - this server collapses whole workflows:

  • extract - execute(..., extract=["items.*.name", "total_count"]) returns just those fields instead of a multi-kilobyte response. * fans out over arrays.
  • Chaining - execute_chained pipes step results into later params via ${save_as.path} references: one tool call instead of N.
  • Parallel groups - a nested list of steps runs concurrently, so "query three APIs and combine" is still one call:
text
execute_chained(steps=[  [    {"operation_id": "github.repos_get", "params": {"owner": "o", "repo": "r"},     "save_as": "gh", "extract": ["stargazers_count"]},    {"operation_id": "open_meteo.get_v1_forecast", "params": {"latitude": 52.5, "longitude": 13.4},     "save_as": "weather", "extract": ["current_weather.temperature"]}  ],  {"operation_id": "github.issues_list_for_repo",   "params": {"owner": "o", "repo": "r"}, "extract": ["*.title"]}])
  • Response cache - successful GET/query results are cached for UCMCP_CACHE_TTL seconds (default 60), so repeated lookups are instant and free; pass fresh: true to bypass. Successful mutations invalidate that API's cached reads.

Built-in API catalog

You don't need to hunt for spec URLs. search_catalog searches two sources:

  1. A curated list of verified free/popular APIs: GitHub, GitLab, Stripe, OpenAI, Wikipedia, Open-Meteo (weather, no key), a countries GraphQL API, httpbin and the Swagger Petstore. Entries carry working spec URLs, base-URL overrides and auth hints (e.g. "optional GITHUB_TOKEN").
  2. The APIs.guru directory - 2500+ community-indexed OpenAPI specs (Google, AWS, Microsoft, Twilio, NASA, ...), fetched once per session and searched locally.
text
search_catalog(query="weather forecast")  -> [{"name": "open_meteo", "spec": "https://...forecast.yml", "base_url": "https://api.open-meteo.com", ...}]load_api(spec="https://...forecast.yml", name="open_meteo", base_url="https://api.open-meteo.com")execute(operation_id="open_meteo.get_v1_forecast", params={"latitude": 52.52, "longitude": 13.41, "hourly": "temperature_2m"})

The catalog is discovery-only: it returns spec URLs, never loads or executes anything itself, so the security guard still applies to everything you load from it.

Installation

The server runs in any MCP host via uvx - no manual install needed, the package is fetched from PyPI automatically (add [all] for GraphQL/gRPC/SOAP support):

json
{  "mcpServers": {    "universal-connector": {      "command": "uvx",      "args": ["universal-connector-mcp"],      "env": { "UCMCP_ALLOWED_HOSTS": "api.github.com" }    }  }}

From source (development): pip install -e ".[all,dev]" and use "command": "universal-connector-mcp" instead. Extras: graphql, grpc, soap, keyring, all, dev; the core install supports OpenAPI/REST only.

Cursor

[Add to Cursor]

One click via the badge above, or add the JSON block to .cursor/mcp.json in your project (shared with your team) or ~/.cursor/mcp.json (personal, all projects). See examples/mcp.json for a full config with credentials.

Claude Desktop

Add the same mcpServers block to claude_desktop_config.json (Settings > Developer > Edit Config).

Claude Code

bash
claude mcp add universal-connector -- uvx universal-connector-mcp

VS Code (Copilot)

Add the server under "servers" in .vscode/mcp.json:

json
{  "servers": {    "universal-connector": { "command": "uvx", "args": ["universal-connector-mcp"] }  }}

Windsurf / Cline / others

All major MCP hosts accept the same mcpServers block shown above in their respective config files (~/.codeium/windsurf/mcp_config.json, Cline's MCP settings, etc.).

AI agents installing this server for a user: follow llms-install.md.

Preloading APIs

Point UCMCP_APIS_CONFIG at a YAML file to auto-load APIs at startup - see examples/apis.example.yaml.

Managing APIs from chat

You never edit config files to manage APIs - just tell your agent:

  • "Connect the Stripe API" - the agent finds it in the catalog and loads it.
  • "What APIs are connected?" - list_apis shows them.
  • "Forget GitHub" - unload_api removes it (and from the remembered state).

When an API needs credentials, load_api tells the agent exactly which environment variable to set (e.g. STRIPE_API_KEY), whether it is already configured, and the agent relays copy-pasteable instructions - you add the variable to the env block of your MCP config and restart. Secrets are never typed into the chat.

Session persistence

The server remembers which APIs you loaded (their spec locations - never credentials or response data) in UCMCP_STATE_FILE and restores them automatically on the next start, so the agent can pick up right where it left off. Set UCMCP_STATE_FILE=off to disable.

Supported protocols

ProtocolSpec sourceNotes
OpenAPI / SwaggerOpenAPI 3.x or Swagger 2.0 (JSON/YAML), URL/file/rawCore install. Local $ref resolution, all HTTP methods.
GraphQLIntrospection JSON or SDLpip install '.[graphql]'. Auto-generates selection sets; execute accepts a fields override.
gRPCServer reflection (grpc://host:port)pip install '.[grpc]'. Unary-unary methods; reflection must be enabled server-side.
SOAPWSDL (URL/file/raw)pip install '.[soap]'. One body object parameter per operation.

Each loaded operation gets an id namespaced as <api>.<operation> (e.g. github.repos_get).

Example session

More walkthroughs (weather, GitHub with auth, GraphQL, parallel multi-API workflows, internal APIs): docs/EXAMPLES.md

text
search_catalog(query="github")load_api(spec="https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json", name="github")search_operations(query="list repositories for user", api="github")get_operation(operation_id="github.repos_list_for_user")execute(operation_id="github.repos_list_for_user", params={"username": "torvalds"},        extract=["*.name", "*.stargazers_count"])

GraphQL with field selection:

text
load_api(spec="https://countries.trevorblades.com/", protocol="graphql", name="countries")execute(operation_id="countries.country", params={"code": "US", "fields": "name capital currency"})

Chaining (feed one result into the next; wrap steps in a nested list to run them in parallel):

text
execute_chained(steps=[  {"operation_id": "github.repos_list_for_user", "params": {"username": "torvalds"}, "save_as": "repos"},  {"operation_id": "github.repos_get", "params": {"owner": "torvalds", "repo": "${repos.data.0.name}"},   "extract": ["description", "stargazers_count"]}])

Configuration

All settings are environment variables prefixed with UCMCP_:

VariableDefaultDescription
UCMCP_ALLOWED_HOSTS(empty)Comma-separated extra hosts allowed for outbound calls. Prefix with . for suffix matches.
UCMCP_DENIED_HOSTS(empty)Comma-separated hosts always blocked (wins over allow).
UCMCP_ALLOW_ALL_HOSTSfalseDisable the allowlist entirely (not recommended). Does not disable private-IP blocking.
UCMCP_BLOCK_PRIVATE_IPStrueBlock outbound calls that resolve to private/loopback/link-local/cloud-metadata IPs (SSRF protection).
UCMCP_MAX_REDIRECTS5Max HTTP redirects to follow; every hop is re-checked against the guard.
UCMCP_MAX_RESPONSE_BYTES100000Response body cap sent back to the agent.
UCMCP_HTTP_TIMEOUT30Per-request timeout (seconds).
UCMCP_MAX_RETRIES2Retries on transient HTTP failures (429/502/503/504).
UCMCP_CACHE_TTL60Seconds to cache successful GET/query responses (0 disables).
UCMCP_AUDIT_ENABLEDtrueToggle audit logging.
UCMCP_AUDIT_FILE(none)Append audit entries to this file (JSON lines).
UCMCP_USE_KEYRINGfalseAlso resolve secrets from the OS keyring.
UCMCP_APIS_CONFIG(none)Path to a YAML file of APIs to preload at startup.
UCMCP_STATE_FILE~/.universal-connector-mcp/state.jsonWhere loaded APIs are remembered between restarts (spec locations only - never secrets or data). Set to off to disable.

Credentials are looked up by convention from <API_NAME>_TOKEN, <API_NAME>_API_KEY, <API_NAME>_CLIENT_ID / <API_NAME>_CLIENT_SECRET (OAuth2 client credentials), etc.

Development

bash
pip install -e ".[all,dev]"pytest          # run the test suiteruff check .    # lint

The test suite (60+ tests) and lint run in CI on Ubuntu and Windows with Python 3.10 and 3.12 on every push (.github/workflows/ci.yml); tagging v* builds and publishes to PyPI via trusted publishing (.github/workflows/release.yml).

Contributions welcome - see CONTRIBUTING.md. Security reports go through private reporting.

Releases are automated: tagging v* publishes to PyPI via trusted publishing (see docs/RELEASING.md).

Security model

  • Outbound allowlist - by default only hosts of explicitly loaded specs are reachable. Extend/limit via UCMCP_ALLOWED_HOSTS / UCMCP_DENIED_HOSTS.
  • SSRF protection - requests that resolve to private, loopback, link-local, reserved or cloud-metadata addresses are blocked (including spec fetches, GraphQL introspection and SOAP imports). Every redirect hop is re-validated. Reaching an internal address requires an explicit UCMCP_ALLOWED_HOSTS entry.
  • Secret handling - credentials come from environment variables or the OS keyring, are injected only at request time, and are redacted from audit logs and errors.
  • Response caps - responses are truncated to a configurable byte limit to protect the context window.
  • Audit log - method, host, path and status of every outbound call (never secrets or bodies) are recorded.

License

MIT

來源:README.md,提交 78753e3

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分