
Mcp Api Connect
io.github.bvenkata由 GitHub 账号 bvenkata 发布v0.1.0更新于 Oct 25, 2026
Protocol- & auth-agnostic API connector: SOAP/REST behind any auth, config-driven. Lib/API/MCP.
概览
一个配置驱动的连接器引擎,让助手通过可复用或一次性的连接器规格调用 REST 或 SOAP API,并支持多种认证方式。
- 可以做什么
- 用内联规格(URL、协议、认证、请求与响应结构)一次性调用任意 REST 或 SOAP 服务。注册、列出、按名称调用和删除可复用的命名连接器。支持 API key、Basic、Bearer 和 OAuth2 客户端凭证认证,OAuth2 令牌会自动获取并缓存。通过字段映射或 Jinja2 请求体模板声明式地重塑载荷,包括 SOAP 信封。
- 适用场景
- 当助手需要访问多个协议和认证方式各异的第三方或内部 API,并希望把每个目标一次性描述为配置、而不必为每个服务编写客户端时适用。
- 运行要求
- 以 Python 包形式通过 stdio 在本地运行,需安装带 MCP 扩展的包和 Python 环境。目标服务需可经网络访问。认证凭据在各连接器规格中提供,而非通过已声明的环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Api Connect,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-api-connect™
[License: Apache 2.0] [Python 3.10+]
One payload in, any API out. mcp-api-connect is a protocol- and auth-agnostic connector engine: describe a target service (URL, protocol, auth, request/ response shape) once, then send it a normalized payload and get a normalized response back — whether the target is a REST/JSON API, a legacy SOAP service, protected by an API key, Basic auth, a Bearer token, or OAuth2 client credentials.
It ships as three things built on the same core engine, so however you want to use it, you can:
- A Python library —
pip install mcp-api-connect, callMCPAPIConnectEnginedirectly, no server required. - A standalone HTTP API —
pip install mcp-api-connect[api], runmcp-api-connect-api, POST to/invoke. - An MCP server —
pip install mcp-api-connect[mcp], runmcp-api-connect, point any MCP client (Claude, etc.) at it so an agent can call registered connectors — or arbitrary services on the fly — as tools.
Why
Every integration project reinvents the same wheel: a REST client here, a
SOAP client there, one auth flow per service, ad-hoc request/response
mapping scattered across the codebase. mcp-api-connect centralizes that into one
declarative spec (InvokeSpec) and one execution engine, so adding a new
target service is config, not code.
Quick start (library)
Quick start (HTTP API)
Register a reusable connector once, then invoke it by name:
Quick start (MCP)
Or run it in a container (stdio transport):
Exposes tools: invoke (stateless, one-off), register_connector,
list_connectors, invoke_connector (by name), delete_connector. An agent
can register a connector for "the Salesforce API" once, then just say "call
it with this payload" from then on.
➜ Full setup for Claude Desktop / Claude Code / Cursor, persistence, security notes, and a worked example: docs/mcp-integration.md.
Core concepts
Target— base URL, protocol (rest|soap), timeout, default headers.AuthSpec—type(none,api_key,basic,bearer,oauth2_client_credentials) + aconfigdict shaped for that type. OAuth2 tokens are fetched and cached automatically.RequestFormat/ResponseFormat— content type (json,xml,soap) plus a declarativefield_map({"target.path": "$.source.jsonpath"}) for reshaping payloads without writing code, or a Jinja2body_templatefor full control (required for SOAP envelopes).InvokeSpec— bundles the three above; the unit of "how to reach one service." Store it as a namedConnectoror pass it inline per call.
See src/mcp_api_connect/core/models.py for the
full schema, and docs/auth-reference.md for the
config shape each auth type expects.
Documentation
- docs/mcp-integration.md — full MCP client setup (Claude Desktop, Claude Code, Cursor), persistence, security, tool reference, worked example, troubleshooting
- docs/auth-reference.md —
configfields for every auth type - CONTRIBUTING.md — dev setup, running tests, PR expectations
Extending
- New auth type: implement
AuthStrategy, register viaengine.register_auth_strategy(...). - New protocol (e.g. GraphQL): implement
ProtocolAdapter, register viaengine.register_adapter(...). - New connector storage backend: implement
ConnectorStore(ships withInMemoryConnectorStoreandSqliteConnectorStore, credentials encrypted at rest via Fernet).
Roadmap
- OAuth2 authorization-code flow, mTLS, AWS SigV4 auth strategies
- WSDL-driven SOAP (optional
zeep-backed adapter, no hand-written envelope needed) - GraphQL adapter
- Postgres-backed
ConnectorStore - Retry/backoff + rate limiting policies per connector
- SSRF-safe target allow-listing for public deployments
Development
License
Apache License 2.0 — see LICENSE and NOTICE.
Contributions are accepted under the same license (inbound = outbound); see CONTRIBUTING.md.
Trademark
mcp-api-connect™ is a trademark of Balaji Venkatasubramaniyar. The Apache 2.0 license covers copyright and patents but grants no trademark rights. You may use the name to refer to this project and to state compatibility, but not to name a fork, product, or service, or to imply endorsement. See TRADEMARKS.md for the full policy.
来源:README.md,提交 29e0246
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分