{
  "markdown": "<!-- mcp-name: io.github.bvenkata/mcp-api-connect -->\n\n# mcp-api-connect&trade;\n\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](pyproject.toml)\n\n**One payload in, any API out.** mcp-api-connect is a protocol- and auth-agnostic\nconnector engine: describe a target service (URL, protocol, auth, request/\nresponse shape) once, then send it a normalized payload and get a normalized\nresponse back — whether the target is a REST/JSON API, a legacy SOAP service,\nprotected by an API key, Basic auth, a Bearer token, or OAuth2 client\ncredentials.\n\nIt ships as three things built on the same core engine, so however you want\nto use it, you can:\n\n- **A Python library** — `pip install mcp-api-connect`, call `MCPAPIConnectEngine`\n  directly, no server required.\n- **A standalone HTTP API** — `pip install mcp-api-connect[api]`, run\n  `mcp-api-connect-api`, POST to `/invoke`.\n- **An MCP server** — `pip install mcp-api-connect[mcp]`, run `mcp-api-connect`,\n  point any MCP client (Claude, etc.) at it so an agent can call registered\n  connectors — or arbitrary services on the fly — as tools.\n\n## Why\n\nEvery integration project reinvents the same wheel: a REST client here, a\nSOAP client there, one auth flow per service, ad-hoc request/response\nmapping scattered across the codebase. mcp-api-connect centralizes that into one\ndeclarative spec (`InvokeSpec`) and one execution engine, so adding a new\ntarget service is config, not code.\n\n## Quick start (library)\n\n```bash\npip install mcp-api-connect\n```\n\n```python\nimport asyncio\nfrom mcp_api_connect import MCPAPIConnectEngine, InvokeSpec, Target, AuthSpec, AuthType, RequestFormat, ResponseFormat\n\nspec = InvokeSpec(\n    target=Target(base_url=\"https://api.example.com\"),\n    auth=AuthSpec(type=AuthType.API_KEY, config={\"api_key\": \"secret\", \"header_name\": \"X-API-Key\"}),\n    request_format=RequestFormat(method=\"POST\", path=\"/v1/orders\", content_type=\"json\"),\n    response_format=ResponseFormat(content_type=\"json\"),\n)\n\nasync def main():\n    async with MCPAPIConnectEngine() as engine:\n        result = await engine.invoke(spec, {\"customer\": \"jane\"})\n        print(result.success, result.data)\n\nasyncio.run(main())\n```\n\n## Quick start (HTTP API)\n\n```bash\npip install \"mcp-api-connect[api]\"\nmcp-api-connect-api   # serves on :8000, interactive docs at /docs\n```\n\n```bash\ncurl -X POST http://localhost:8000/invoke -H 'content-type: application/json' -d '{\n  \"spec\": {\n    \"target\": {\"base_url\": \"https://api.example.com\"},\n    \"auth\": {\"type\": \"api_key\", \"config\": {\"api_key\": \"secret\"}},\n    \"request_format\": {\"method\": \"POST\", \"path\": \"/v1/orders\"},\n    \"response_format\": {\"content_type\": \"json\"}\n  },\n  \"payload\": {\"customer\": \"jane\"}\n}'\n```\n\nRegister a reusable connector once, then invoke it by name:\n\n```bash\ncurl -X POST http://localhost:8000/connectors -d '{\"name\": \"orders-api\", \"spec\": {...}}'\ncurl -X POST http://localhost:8000/connectors/orders-api/invoke -d '{\"customer\": \"jane\"}'\n```\n\n## Quick start (MCP)\n\n```bash\npip install \"mcp-api-connect[mcp]\"\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-api-connect\": { \"command\": \"/path/to/.venv/bin/mcp-api-connect\" }\n  }\n}\n```\n\nOr run it in a container (stdio transport):\n\n```bash\ndocker build -t mcp-api-connect .\ndocker run --rm -i mcp-api-connect\n```\n\nExposes tools: `invoke` (stateless, one-off), `register_connector`,\n`list_connectors`, `invoke_connector` (by name), `delete_connector`. An agent\ncan register a connector for \"the Salesforce API\" once, then just say \"call\nit with this payload\" from then on.\n\n**➜ Full setup for Claude Desktop / Claude Code / Cursor, persistence,\nsecurity notes, and a worked example: [docs/mcp-integration.md](docs/mcp-integration.md).**\n\n## Core concepts\n\n- **`Target`** — base URL, protocol (`rest` | `soap`), timeout, default headers.\n- **`AuthSpec`** — `type` (`none`, `api_key`, `basic`, `bearer`,\n  `oauth2_client_credentials`) + a `config` dict shaped for that type. OAuth2\n  tokens are fetched and cached automatically.\n- **`RequestFormat`** / **`ResponseFormat`** — content type (`json`, `xml`,\n  `soap`) plus a declarative `field_map` (`{\"target.path\": \"$.source.jsonpath\"}`)\n  for reshaping payloads without writing code, or a Jinja2 `body_template`\n  for full control (required for SOAP envelopes).\n- **`InvokeSpec`** — bundles the three above; the unit of \"how to reach one\n  service.\" Store it as a named `Connector` or pass it inline per call.\n\nSee [`src/mcp_api_connect/core/models.py`](src/mcp_api_connect/core/models.py) for the\nfull schema, and [docs/auth-reference.md](docs/auth-reference.md) for the\n`config` shape each auth `type` expects.\n\n## Documentation\n\n- [docs/mcp-integration.md](docs/mcp-integration.md) — full MCP client setup\n  (Claude Desktop, Claude Code, Cursor), persistence, security, tool\n  reference, worked example, troubleshooting\n- [docs/auth-reference.md](docs/auth-reference.md) — `config` fields for\n  every auth type\n- [CONTRIBUTING.md](CONTRIBUTING.md) — dev setup, running tests, PR expectations\n\n## Extending\n\n- New auth type: implement `AuthStrategy`, register via\n  `engine.register_auth_strategy(...)`.\n- New protocol (e.g. GraphQL): implement `ProtocolAdapter`, register via\n  `engine.register_adapter(...)`.\n- New connector storage backend: implement `ConnectorStore` (ships with\n  `InMemoryConnectorStore` and `SqliteConnectorStore`, credentials encrypted\n  at rest via Fernet).\n\n## Roadmap\n\n- OAuth2 authorization-code flow, mTLS, AWS SigV4 auth strategies\n- WSDL-driven SOAP (optional `zeep`-backed adapter, no hand-written envelope needed)\n- GraphQL adapter\n- Postgres-backed `ConnectorStore`\n- Retry/backoff + rate limiting policies per connector\n- SSRF-safe target allow-listing for public deployments\n\n## Development\n\n```bash\npython -m venv .venv && source .venv/bin/activate\npip install -e \".[dev,api,storage,mcp]\"\npytest\n```\n\n## License\n\nApache License 2.0 — see [LICENSE](LICENSE) and [NOTICE](NOTICE).\n\nContributions are accepted under the same license (inbound = outbound); see\n[CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Trademark\n\n**mcp-api-connect&trade;** is a trademark of Balaji Venkatasubramaniyar. The\nApache 2.0 license covers copyright and patents but grants no trademark rights.\nYou may use the name to refer to this project and to state compatibility, but\nnot to name a fork, product, or service, or to imply endorsement. See\n[TRADEMARKS.md](TRADEMARKS.md) for the full policy.\n",
  "bytes": 6505,
  "sha": "6bd32612add24008f7da7a3f8b8d66326b1276faa4b2cd2f926febcc781f0eab",
  "repo_slug": "bvenkata/mcp-api-connect",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_bvenkata_mcp_api_connect_f4c13343/readme"
}