Skip to main content
Glama
bvenkata

mcp-api-connect

by bvenkata

mcp-api-connect

License: MIT Python 3.10+

Ein Payload rein, jede API raus. mcp-api-connect ist eine protokoll- und auth-agnostische Connector-Engine: Beschreibe einen Zielservice (URL, Protokoll, Auth, Request-/Response-Form) einmal, sende dann einen normalisierten Payload und erhalte eine normalisierte Antwort zurück – egal ob das Ziel eine REST/JSON-API, ein Legacy-SOAP-Service, geschützt durch einen API-Schlüssel, Basic Auth, ein Bearer-Token oder OAuth2-Client-Credentials ist.

Es wird als drei Dinge geliefert, die auf derselben Kern-Engine basieren, sodass du es nutzen kannst, wie du willst:

  • Eine Python-Bibliothekpip install mcp-api-connect, rufe MCPAPIConnectEngine direkt auf, kein Server erforderlich.

  • Eine eigenständige HTTP-APIpip install mcp-api-connect[api], führe mcp-api-connect-api aus, POST an /invoke.

  • Ein MCP-Serverpip install mcp-api-connect[mcp], führe mcp-api-connect aus, richte jeden MCP-Client (Claude usw.) darauf aus, damit ein Agent registrierte Connectors – oder beliebige Dienste spontan – als Tools aufrufen kann.

Warum

Jedes Integrationsprojekt erfindet das Rad neu: hier ein REST-Client, dort ein SOAP-Client, ein Auth-Flow pro Dienst, Ad-hoc-Request-/Response-Mapping über die gesamte Codebasis verstreut. mcp-api-connect zentralisiert das in einer deklarativen Spezifikation (InvokeSpec) und einer Ausführungs-Engine, sodass das Hinzufügen eines neuen Zielservices Konfiguration und nicht Code ist.

Related MCP server: MCP REST Server

Schnellstart (Bibliothek)

pip install mcp-api-connect
import asyncio
from mcp_api_connect import MCPAPIConnectEngine, InvokeSpec, Target, AuthSpec, AuthType, RequestFormat, ResponseFormat

spec = InvokeSpec(
    target=Target(base_url="https://api.example.com"),
    auth=AuthSpec(type=AuthType.API_KEY, config={"api_key": "secret", "header_name": "X-API-Key"}),
    request_format=RequestFormat(method="POST", path="/v1/orders", content_type="json"),
    response_format=ResponseFormat(content_type="json"),
)

async def main():
    async with MCPAPIConnectEngine() as engine:
        result = await engine.invoke(spec, {"customer": "jane"})
        print(result.success, result.data)

asyncio.run(main())

Schnellstart (HTTP-API)

pip install "mcp-api-connect[api]"
mcp-api-connect-api   # serves on :8000, interactive docs at /docs
curl -X POST http://localhost:8000/invoke -H 'content-type: application/json' -d '{
  "spec": {
    "target": {"base_url": "https://api.example.com"},
    "auth": {"type": "api_key", "config": {"api_key": "secret"}},
    "request_format": {"method": "POST", "path": "/v1/orders"},
    "response_format": {"content_type": "json"}
  },
  "payload": {"customer": "jane"}
}'

Registriere einen wiederverwendbaren Connector einmal und rufe ihn dann per Namen auf:

curl -X POST http://localhost:8000/connectors -d '{"name": "orders-api", "spec": {...}}'
curl -X POST http://localhost:8000/connectors/orders-api/invoke -d '{"customer": "jane"}'

Schnellstart (MCP)

pip install "mcp-api-connect[mcp]"
{
  "mcpServers": {
    "mcp-api-connect": { "command": "/path/to/.venv/bin/mcp-api-connect" }
  }
}

Stellt Tools bereit: invoke (zustandslos, einmalig), register_connector, list_connectors, invoke_connector (per Name), delete_connector. Ein Agent kann einmal einen Connector für „die Salesforce-API“ registrieren und dann einfach sagen „ruf sie mit diesem Payload auf“.

➜ Vollständige Einrichtung für Claude Desktop / Claude Code / Cursor, Persistenz, Sicherheitshinweise und ein durchgearbeitetes Beispiel: docs/mcp-integration.md.

Kernkonzepte

  • Target – Basis-URL, Protokoll (rest | soap), Timeout, Standard-Header.

  • AuthSpectype (none, api_key, basic, bearer, oauth2_client_credentials) plus ein config-Dict, das für diesen Typ geformt ist. OAuth2-Tokens werden automatisch abgerufen und zwischengespeichert.

  • RequestFormat / ResponseFormat – Inhaltstyp (json, xml, soap) plus eine deklarative field_map ({"target.path": "$.source.jsonpath"}) zum Umformen von Payloads ohne Code, oder ein Jinja2-body_template für volle Kontrolle (erforderlich für SOAP-Envelopes).

  • InvokeSpec – bündelt die drei oben genannten; die Einheit von „wie man einen Dienst erreicht“. Speichere es als benannten Connector oder übergib es inline pro Aufruf.

Siehe src/mcp_api_connect/core/models.py für das vollständige Schema und docs/auth-reference.md für die config-Form, die jeder Auth-type erwartet.

Dokumentation

  • docs/mcp-integration.md – vollständige MCP-Client-Einrichtung (Claude Desktop, Claude Code, Cursor), Persistenz, Sicherheit, Tool-Referenz, durchgearbeitetes Beispiel, Fehlerbehebung

  • docs/auth-reference.mdconfig-Felder für jeden Auth-Typ

  • CONTRIBUTING.md – Entwickler-Setup, Tests ausführen, PR-Erwartungen

Erweitern

  • Neuer Auth-Typ: Implementiere AuthStrategy, registriere über engine.register_auth_strategy(...).

  • Neues Protokoll (z. B. GraphQL): Implementiere ProtocolAdapter, registriere über engine.register_adapter(...).

  • Neues Connector-Speicher-Backend: Implementiere ConnectorStore (wird mit InMemoryConnectorStore und SqliteConnectorStore geliefert, Anmeldedaten werden im Ruhezustand per Fernet verschlüsselt).

Roadmap

  • OAuth2-Autorisierungscode-Flow, mTLS, AWS-SigV4-Auth-Strategien

  • WSDL-gesteuertes SOAP (optionaler zeep-basierter Adapter, kein handgeschriebenes Envelope nötig)

  • GraphQL-Adapter

  • Postgres-basiertes ConnectorStore

  • Retry/Backoff- und Rate-Limiting-Richtlinien pro Connector

  • SSRF-sichere Ziel-Allowlist für öffentliche Bereitstellungen

Entwicklung

python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev,api,storage,mcp]"
pytest

Lizenz

MIT – siehe LICENSE.

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with over 2,800 APIs and applications through Pipedream's Connect platform. Provides managed OAuth authentication and API request capabilities for integrating multiple services through natural language.
  • F
    license
    A
    quality
    D
    maintenance
    Enables interaction with any REST API through token or login authentication, with automatic Swagger/OpenAPI documentation integration for endpoint discovery and comprehensive HTTP request support.
    7
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to discover, search, and call any REST API described by an OpenAPI or Swagger document. Supports multiple API endpoints with authentication and parameter handling.
    25
    MIT

View all related MCP servers

Related MCP Connectors

  • Connect AI assistants to Stellary projects, boards, documents, and governed agent workflows.

  • Search, document and execute authenticated API calls across 700+ apps via one MCP server

  • Connect MCP clients to 2,000+ AI models without managing provider API keys.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bvenkata/mcp-api-connect'

If you have feedback or need assistance with the MCP directory API, please join our Discord server