mcp-api-connect
mcp-api-connect
1つのペイロードで、あらゆるAPIに対応。 mcp-api-connectは、プロトコルと認証に依存しないコネクタエンジンです。ターゲットサービス(URL、プロトコル、認証、リクエスト/レスポンスの形状)を一度記述すれば、正規化されたペイロードを送信して、正規化されたレスポンスを受け取ることができます。ターゲットがREST/JSON API、レガシーSOAPサービス、APIキー、Basic認証、Bearerトークン、OAuth2クライアントクレデンシャルで保護されているかどうかは関係ありません。
同じコアエンジン上に構築された3つの形態で提供されるため、どのように使いたいかに応じて選択できます:
Pythonライブラリ —
pip install mcp-api-connectを実行し、MCPAPIConnectEngineを直接呼び出します。サーバーは不要です。スタンドアロンHTTP API —
pip install mcp-api-connect[api]を実行し、mcp-api-connect-apiを起動して、/invokeにPOSTします。MCPサーバー —
pip install mcp-api-connect[mcp]を実行し、mcp-api-connectを起動して、任意のMCPクライアント(Claudeなど)からエージェントが登録済みコネクタ(またはその場で任意のサービス)をツールとして呼び出せるようにします。
なぜ
すべての統合プロジェクトは同じ車輪を再発明しています。ここにRESTクライアント、あそこにSOAPクライアント、サービスごとに1つの認証フロー、コードベース全体に散らばったアドホックなリクエスト/レスポンスマッピング。mcp-api-connectはこれらを1つの宣言的仕様(InvokeSpec)と1つの実行エンジンに集中化するため、新しいターゲットサービスの追加はコードではなく設定で済みます。
Related MCP server: MCP REST Server
クイックスタート(ライブラリ)
pip install mcp-api-connectimport 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())クイックスタート(HTTP API)
pip install "mcp-api-connect[api]"
mcp-api-connect-api # serves on :8000, interactive docs at /docscurl -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"}
}'再利用可能なコネクタを一度登録し、名前で呼び出します:
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"}'クイックスタート(MCP)
pip install "mcp-api-connect[mcp]"{
"mcpServers": {
"mcp-api-connect": { "command": "/path/to/.venv/bin/mcp-api-connect" }
}
}ツールとして invoke(ステートレス、一回限り)、register_connector、list_connectors、invoke_connector(名前指定)、delete_connector を公開します。エージェントは「Salesforce API」用のコネクタを一度登録すれば、その後は「このペイロードで呼び出して」と言うだけで済みます。
➜ Claude Desktop / Claude Code / Cursor の完全なセットアップ、永続化、セキュリティメモ、および実例については、docs/mcp-integration.md を参照してください。
コアコンセプト
Target— ベースURL、プロトコル(rest|soap)、タイムアウト、デフォルトヘッダー。AuthSpec—type(none、api_key、basic、bearer、oauth2_client_credentials)と、そのタイプに合わせたconfigディクショナリ。OAuth2トークンは自動的に取得・キャッシュされます。RequestFormat/ResponseFormat— コンテンツタイプ(json、xml、soap)に加え、コードを書かずにペイロードを再整形するための宣言的field_map({"target.path": "$.source.jsonpath"})、または完全な制御のためのJinja2body_template(SOAPエンベロープに必須)。InvokeSpec— 上記3つをまとめたもので、「1つのサービスに到達する方法」の単位。名前付きConnectorとして保存するか、呼び出しごとにインラインで渡します。
完全なスキーマは src/mcp_api_connect/core/models.py を、各認証 type が期待する config の形状は docs/auth-reference.md を参照してください。
ドキュメント
docs/mcp-integration.md — MCPクライアントの完全なセットアップ(Claude Desktop、Claude Code、Cursor)、永続化、セキュリティ、ツールリファレンス、実例、トラブルシューティング
docs/auth-reference.md — すべての認証タイプの
configフィールドCONTRIBUTING.md — 開発環境のセットアップ、テストの実行、PRの期待事項
拡張
新しい認証タイプ:
AuthStrategyを実装し、engine.register_auth_strategy(...)で登録します。新しいプロトコル(例:GraphQL):
ProtocolAdapterを実装し、engine.register_adapter(...)で登録します。新しいコネクタストレージバックエンド:
ConnectorStoreを実装します(InMemoryConnectorStoreとSqliteConnectorStoreが同梱されており、資格情報はFernetで暗号化されて保存されます)。
ロードマップ
OAuth2認可コードフロー、mTLS、AWS SigV4認証戦略
WSDL駆動のSOAP(オプションの
zeepベースのアダプタ、手書きのエンベロープは不要)GraphQLアダプタ
Postgresバックエンドの
ConnectorStoreコネクタごとのリトライ/バックオフとレート制限ポリシー
公開デプロイ向けのSSRF安全なターゲット許可リスト
開発
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev,api,storage,mcp]"
pytestライセンス
MIT — LICENSE を参照してください。
This server cannot be installed
Maintenance
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
- FlicenseNot gradedqualityDmaintenanceEnables 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.
- FlicenseAqualityDmaintenanceEnables 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
- AlicenseAqualityDmaintenanceEnables AI agents to connect and interact with common business platforms like Shopify, WordPress, and Calendly via pre-built connectors for tasks such as product management, content operations, and scheduling.13MIT
- AlicenseNot gradedqualityAmaintenanceEnables 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.25MIT
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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