Open Agent Connector 标志

Open Agent Connector

社区
Anil-matcha

Open-source, self-hosted alternative to Composio, Nango, Merge.dev, and Arcade.dev for AI agent integrations. Run GitHub, Slack, Hacker News, and custom HTTP actions over MCP or REST.

发布者Anil-matcha
代码仓库open-agent-connector
语言Python
复刻数
320
星标数
844
可用工具
0
传输类型streamable-http
分类
许可协议Apache-2.0
链接
  • 将工具接入 AI 工作流

    Open Agent Connector 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 844 个星标和 320 个复刻。

Open Agent Connector

An open-source, self-hosted integration gateway for AI agents. Connect accounts to app APIs, keep credentials in your own runtime, and let agents discover and run actions through the Model Context Protocol (MCP) or a REST API.

This project is for developers who want to inspect, run, and extend their own agent integration layer. It is an open-source option to evaluate alongside Composio, Nango, Merge.dev, and Arcade.dev. Those platforms offer broader catalogs and managed capabilities; Open Agent Connector currently prioritizes a compact self-hosted implementation that you can modify.

Project description

Open Agent Connector gives an agent a consistent way to discover connected services, find an action, read its input schema, and execute it. A FastAPI backend manages provider definitions, connections, outbound requests, and run records. A Next.js console provides screens for browsing providers and actions, managing connections and runtime tokens, and reviewing activity. SQLite stores application data locally by default, with PostgreSQL supported via SQLAlchemy async and Alembic migrations.

The catalog currently registers 263 providers with 8,472 actions (counted from server/app/providers/registry.py and actions_catalog.json) spanning Developer tools, Project Management & CRM, Communication, Storage, AI/ML, E-Commerce, Social Media, Financial, and Utilities. For a complete list of all 263 providers, auth types, action counts, and category classifications, see PROVIDER_GUIDE.md. Registered does not mean battle-tested: not every provider action or OAuth flow has been verified against a live account, so confirm the ones you depend on.

Features

  • MCP gateway: Model Context Protocol (MCP) JSON-RPC 2.0 endpoint over POST /mcp and tool discovery over GET /mcp/tools. Every remote MCP call fails closed and requires an admin or runtime token with granular scope enforcement.
  • Scoped runtime tokens: hashed, revocable tokens with deny-by-default action grants plus optional connection and proxy restrictions.
  • OAuth: authorization URL, state and code exchange, encrypted token storage, and refresh for providers that support OAuth.
  • Action discovery: agents can list providers, search actions, inspect action guides and schemas, and execute actions.
  • Direct MCP actions: provider actions are exposed as individual MCP tools (scoped to caller token grants), alongside discovery and execution meta-tools.
  • REST API: list providers and actions, execute an action, or use a provider proxy where supported.
  • Connections & credentials: save named provider connections; credential values are encrypted at rest with AES-256-GCM.
  • Local web console: browse the 263-provider catalog, configure connections, execute test runs, and manage runtime tokens and audit logs.
  • Outbound HTTP safeguards: SSRF protection with hop-by-hop redirect verification, cross-origin secret stripping, response size caps, and socket-level IP address pinning to eliminate DNS-rebinding attacks.
  • Idempotent execution: action requests can use an Idempotency-Key; matching completed requests return saved responses and detect payload conflicts.
  • Run records: action executions record duration, HTTP status, and bounded, secret-redacted input/output summaries.
  • Unified catalog: 8,472 action schemas maintained in server/app/providers/actions_catalog.json and registered through extensible Python providers.

How it compares

These products overlap in connecting apps to software and AI agents, but they have different scopes. Composio centers on a large app toolkit and agent execution platform. Nango focuses on building and operating product integrations, including auth and sync. Merge.dev provides unified APIs and common models across product integration categories. Arcade.dev focuses on agent-ready tools, authentication, and runtime controls. Open Agent Connector is a self-hosted integration gateway for teams who want to inspect, own, and customize their agent runtime.

Architecture

text
Agent or application
        │
        ├── MCP JSON-RPC: POST /mcp (authenticated)
        └── REST: /v1/* (authenticated execution)
                │
        FastAPI action runtime
        ├── provider and action registry (263 providers / 8,472 actions)
        ├── principal resolution & deny-by-default policy enforcement
        ├── connection & AES-256-GCM credential encryption
        ├── DNS-pinned guarded outbound HTTP client (SSRF & rebinding guard)
        └── audit run logs and idempotency records
                │
        SQLite / PostgreSQL database + external provider APIs
                │
Next.js web console ────────┘

Stack

AreaTechnology
Web consoleNext.js App Router, React, TypeScript, Tailwind CSS
API and runtimeFastAPI, Python 3.11+, Pydantic v2
PersistenceSQLite / PostgreSQL, SQLAlchemy async, aiosqlite / asyncpg, Alembic
Credential encryptionAES-256-GCM via cryptography
Agent interfaceMCP JSON-RPC 2.0 (HTTP & STDIO transports)

Provider catalog overview

The registry includes 263 providers across 10 functional domains. Below is a representative cross-section:

CategoryProvider countRepresentative providersAuth types
Developer & DevOps35+GitHub, GitLab, Docker, Kubernetes, AWS, Cloudflare, Sentry, JiraAPI Key, OAuth2, Bearer Token
Communication & Marketing40+Slack, Discord, Twilio, SendGrid, Mailchimp, WhatsApp, Telegram, ClickSendOAuth2, Bot Token, API Key
CRM & Sales25+HubSpot, Salesforce, Pipedrive, Zoho CRM, Capsule CRM, CloseOAuth2, API Key
Project Management30+Notion, Linear, Asana, Trello, ClickUp, Monday, Basecamp, TogglOAuth2, API Key, Token
AI & Machine Learning15+OpenAI, Anthropic, ElevenLabs, Perplexity, Replicate, Mistral, GroqAPI Key
Storage & Cloud20+Google Drive, Dropbox, Box, OneDrive, AWS S3, CloudinaryOAuth2, API Key
E-Commerce & Billing18+Shopify, Stripe, PayPal, Square, WooCommerce, ChargebeeOAuth2, API Key
Social Media & Content18+Twitter/X, LinkedIn, Reddit, YouTube, Medium, WordPressOAuth2, API Key
Financial & Accounting12+QuickBooks, Xero, FreshBooks, Wave, PlaidOAuth2, API Key
Utilities & Data20+Hacker News, OpenWeatherMap, Mapbox, IPinfo, Custom HTTPNone, API Key

For the complete 263-provider matrix and action schemas, consult PROVIDER_GUIDE.md. Provider definitions and action schemas can also be queried programmatically via GET /v1/providers and GET /v1/actions.

Quick start

Requirements

  • Python 3.11 or newer
  • Node.js and npm

1. Run the API

bash
cd server
python -m venv venv
source venv/bin/activate
python -m pip install -r requirements.txt
uvicorn main:app --host 127.0.0.1 --port 8000 --reload

On Windows PowerShell, activate the environment with:

powershell
venv\Scripts\Activate.ps1

The API creates its SQLite database and a local encryption key on first startup if they do not exist. For a durable deployment, configure and back up a stable key before saving credentials; losing the key makes previously encrypted credentials unreadable.

2. Run the web console

Open another terminal from the repository root:

bash
cd client
npm install
npm run dev

Open http://localhost:3000. The console uses http://localhost:8000 for the API by default. Set NEXT_PUBLIC_API_URL before starting or building the frontend to use a different API URL.

Local service URLs

  • Web console: http://localhost:3000
  • Health check: http://localhost:8000/health
  • Interactive API docs: http://localhost:8000/docs
  • MCP endpoint: http://localhost:8000/mcp
  • MCP tool preview: http://localhost:8000/mcp/tools

Configuration

Backend settings use the CONNECTOR_ environment prefix. A .env file in the server/ directory is loaded when you launch Uvicorn from that directory.

VariablePurposeDefault
CONNECTOR_HOSTAPI bind address127.0.0.1
CONNECTOR_PORTAPI port8000
CONNECTOR_PUBLIC_ORIGINPublic origin used by the servicehttp://localhost:8000
CONNECTOR_DATABASE_URLSQLAlchemy async database URL (SQLite or PostgreSQL)SQLite file under server/data/connector.db
CONNECTOR_DATA_DIRApplication data directoryserver/data/
CONNECTOR_ENCRYPTION_KEYStable AES-256 key used to encrypt stored credentialsGenerated local key file if unset
CONNECTOR_ADMIN_TOKENBearer token for the admin API and management routesGenerated into server/data/.admin_token if unset
CONNECTOR_RUNTIME_TOKENOptional static runtime token for /v1 and /mcpUnset (persistent DB tokens preferred)
CONNECTOR_EXPOSE_LOCAL_TOKENLet /api/auth/status return the admin token to genuine loopback callers (never when proxy headers are present). Set false on any network-facing deployment.true
CONNECTOR_ALLOW_PUBLIC_ACCESSLet visitors without a token use the console and API in a shared public sandbox (their own isolated tenant, never the operator's data). Leave it off on any instance that holds real credentials.false
CONNECTOR_ALLOWED_RETURN_ORIGINSComma-separated origins, besides CONNECTOR_PUBLIC_ORIGIN, that a redirectUri may point to after OAuth. Anything else is rejected, and the callback only ever redirects to the URL stored when the flow started.http://localhost:3000,http://127.0.0.1:3000
CONNECTOR_ALLOW_PRIVATE_NETWORKAllow private network destinations for outbound requestsfalse
NEXT_PUBLIC_API_URLAPI base URL used by the browser frontendhttp://localhost:8000

Set CONNECTOR_ENCRYPTION_KEY to a strong, stable secret before creating connections in an environment you need to preserve. Back up the key separately from the database and restrict access to both. Do not commit .env files or secret values.

Connect an account

  1. Start both the API and web console.
  2. Open the Connections screen and select any of the 236 providers.
  3. Add the required token, API key, or OAuth credentials and choose a connection alias, such as default.
  4. Browse the Actions screen to inspect available operations, required scopes, and JSON input schemas.
  5. Generate a scoped runtime token on the Tokens screen granting access to selected actions and connection aliases.
  6. Use MCP or the REST API to execute actions securely under that token.

GitHub and Slack credentials are validated against their provider APIs when saved. Hacker News does not require credentials. Custom HTTP can use no auth or a saved API key.

MCP usage

Configure an MCP client (such as Claude Desktop, Cursor, or Antigravity) that supports remote HTTP MCP with the local endpoint:

json
{
  "mcpServers": {
    "open-agent-connector": {
      "url": "http://localhost:8000/mcp",
      "headers": {
        "Authorization": "Bearer <runtime-or-admin-token>"
      }
    }
  }
}

A token is required. Unauthenticated, invalid, or revoked tokens receive 401. Tool discovery and execution are filtered by the token's action and connection grants.

The MCP gateway provides five discovery and execution meta-tools:

  • list_apps: list providers with display names, categories, and authentication requirements.
  • list_connections: list configured accounts with safe identities (filtered by token grants).
  • search_actions: search 8,024 catalog actions by keywords or provider service ID (scoped to token grants).
  • get_action_guide: retrieve full Markdown parameter documentation and JSON Schema for an action.
  • execute_action: execute an authorized action with input arguments and target connection alias.

Individual provider actions are also exposed as direct MCP tools (e.g. github_get_current_user), dynamically filtered by the caller's authorized action permissions. An action call may include a connectionName argument; it defaults to default.

REST API examples

List providers (catalog browsing is public):

bash
curl http://localhost:8000/v1/providers

Search actions across catalog:

bash
curl 'http://localhost:8000/v1/actions?service=github&query=issue'

Execute an action with a runtime token:

bash
curl -X POST http://localhost:8000/v1/actions/github.get_current_user \
  -H 'Authorization: Bearer <runtime-or-admin-token>' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: example-request-001' \
  -d '{"input": {}, "connectionName": "default"}'

Main routes

RoutePurposeAuthentication
GET /v1/providersList providers; accepts an optional category filterPublic
GET /v1/providers/{service}Get a provider and its actionsPublic
GET /v1/actionsSearch actions; accepts query and service filtersScoped by Bearer token
GET /v1/actions/{action_id}Get an action schema and provider detailsScoped by Bearer token
POST /v1/actions/{action_id}Execute an action with scoped permissionsRuntime or Admin Bearer token
POST /v1/proxy/{service}Use a provider's raw proxy implementationRuntime or Admin Bearer token
POST /mcpMCP JSON-RPC 2.0 endpoint (tools/list & tools/call)Runtime or Admin Bearer token
GET /mcp/toolsList MCP tool definitions scoped to callerRuntime or Admin Bearer token
/api/connectionsCreate, list, and delete saved provider connectionsAdmin Bearer token
/api/runtime-tokensCreate, list, and revoke runtime token recordsAdmin Bearer token
/api/runs and /api/statsInspect audit run records and execution statisticsAdmin Bearer token

Action execution accepts an input object and optional connectionName. You can also select a connection with the x-connector-alias header. The Idempotency-Key header is supported on action execution.

Extending the catalog

Providers are registered in server/app/providers/registry.py. Built-in implementations live in server/app/providers/builtins/ and share the base classes in server/app/providers/base.py.

To add a new provider action:

  1. Define its stable action ID, display name, description, input JSON schema, and required scopes.
  2. Implement its asynchronous execute method using the shared HTTP client and the provider credential passed to it.
  3. Register it from the provider implementation and register the provider in the registry.
  4. Add or update credential validation if the provider requires authentication.
  5. Confirm the action schema works through both the REST API and MCP clients.

Provider actions are maintained in a unified catalog at server/app/providers/actions_catalog.json, partitioned by provider service ID for scalable expansion.

Data and security notes

  • The default database and generated local key are stored under server/data/; keep this directory out of source control and protect it in backups.

  • Connection credentials and OAuth tokens are encrypted at rest with AES-256-GCM. The database alone is not sufficient to recover them; the encryption key must also be preserved securely.

  • Outbound requests check resolved IP addresses and block private or internal destinations by default. The CONNECTOR_ALLOW_PRIVATE_NETWORK option relaxes some private-address blocking and should be used only in a controlled environment. Loopback, link-local, and metadata addresses remain blocked.

  • Run logs keep bounded summaries of action inputs and outputs with sensitive credentials automatically redacted.

  • Authentication is enforced per route:

    RoutesCredential
    /api/* (connections, runtime tokens, runs, stats, OAuth config and authorize)Admin token
    POST /v1/actions/{id}, POST /v1/proxy/{service}Runtime or admin token, plus action, connection, and proxy grants
    POST /mcp, GET /mcp/toolsRuntime or admin token (fail closed)
    GET /v1/providers, GET /v1/actions, /health, /docs, OAuth callback, /api/auth/status and /api/auth/verifyPublic. These expose catalog metadata or the OAuth redirect, not credentials.
  • Outbound HTTP / SSRF Defense: All outbound provider calls execute through GuardedTransport, which validates target IP addresses and pins TCP connections directly to the vetted IP, preventing DNS rebinding (TOCTOU) attacks while preserving TLS SNI and certificate validation. Private subnets, loopback, link-local, and cloud metadata (e.g. AWS/GCP 169.254.169.254) are strictly blocked.

  • Behind a reverse proxy, set CONNECTOR_EXPOSE_LOCAL_TOKEN=false, bind the API to loopback or a private network, terminate TLS at the proxy, and rate-limit /api/auth/verify. See docker-compose.prod.yml for a loopback-only overlay.

  • Database Portability & Deployment: Backed by SQLite async by default with auto-migration, with PostgreSQL supported via SQLAlchemy async and versioned Alembic migrations (alembic upgrade head). A single-instance deployment is recommended until distributed locking and replication coordination are configured across multiple instances.

Tenancy

Every tenant-owned row (connections, OAuth state, runtime tokens, run logs, idempotency records) carries a tenant_id. A self-hosted install uses a single default tenant, so nothing changes for you. The core enforces the boundary on every query: services take tenant_id as a required argument, and a tenant id only ever comes from the authenticated principal or from server-side state created for it (for example the OAuth state record), never from request input.

  • Connection names are unique per tenant, so two tenants can each have a github / default connection.
  • OAuth client credentials a tenant supplies are stored per tenant. Credentials from the server environment belong to the operator and are used only by the default tenant.
  • Unauthenticated visitors (only when CONNECTOR_ALLOW_PUBLIC_ACCESS is turned on; it is off by default) live in a separate public tenant and never see the operator's data.
  • A multi-user or hosted layer plugs in through two hooks in app.core.tenancy: register_principal_resolver(...) maps its own credentials (API keys, sessions) to a Principal with a tenant_id (kind tenant_admin for the management API, runtime for agents), and register_token_extractor(...) lets it read a credential from somewhere other than the standard headers (for example a session cookie). A resolver can raise a 401 for a credential it recognises but finds invalid, so that request never falls back to the public sandbox. Platform-wide hosted OAuth credentials remain operator-only. The open core itself has no user accounts: it is meant for your own agents, with the admin token and scoped runtime tokens.

server/tests/test_tenant_isolation.py is the contract: two tenants, the operator, and anonymous visitors try to reach each other's data through every route.

Production deployment

bash
# .env.prod: PUBLIC_ORIGIN=https://connector.example.com
#            ADMIN_TOKEN=<long random value>  ENCRYPTION_KEY=<long random value>
docker compose -f docker-compose.yml -f docker-compose.prod.yml --env-file .env.prod up -d --build

This publishes the API on 127.0.0.1:8100 and the console on 127.0.0.1:3100. Put nginx or another TLS-terminating proxy in front: route /api, /v1, /mcp, /health, and /docs to the API and everything else to the console. Back up .env.prod and the connector_data volume together; without the encryption key, saved credentials cannot be decrypted. Run one instance only.

Backups

deploy/backup/connector-backup.sh takes a consistent snapshot of the SQLite database while the service is running (SQLite's online backup API), verifies it, keeps 14 days of history, and saves the env file (which holds ENCRYPTION_KEY) whenever it changes. Run it daily from root's cron:

bash
15 3 * * * COMPOSE_DIR=/home/ubuntu/open-agent-connector /home/ubuntu/open-agent-connector/deploy/backup/connector-backup.sh >> /var/log/connector-backup.log 2>&1

Snapshots land in /var/backups/connector (override with BACKUP_DIR). They protect against corruption and bad migrations but not against losing the machine, so copy that directory off the host as well. The database holds credentials encrypted with the key, so store the key backup separately from the database backup when you copy them off the host.

To restore: stop the server, replace the database file in the data volume with a snapshot (gunzip -k connector-<time>.db.gz), and start the server again. Check with PRAGMA integrity_check first.

Development

Backend dependencies are listed in server/requirements.txt. Frontend scripts are defined in client/package.json:

bash
cd client
npm run lint
npm run build

For API changes, run the backend locally with Uvicorn's reload option and use /docs to inspect the generated OpenAPI schema.

Run the in-process MCP authentication regression tests from server/:

bash
pip install pytest pytest-asyncio
CONNECTOR_ADMIN_TOKEN=test-admin python -m pytest tests/test_mcp_auth_regression.py tests/test_mcp_security.py

Project status

Open Agent Connector provides 236 registered providers and 8,024 catalog actions with fail-closed MCP authentication, runtime token authorization, AES-256-GCM encryption, SSRF protection with DNS rebinding defenses, and versioned Alembic database migrations. Contributions that improve provider coverage, documentation, and agent workflows are welcome.

License

Open Agent Connector is licensed under the Apache License 2.0. Unless you state otherwise, any contribution you submit for inclusion is licensed under the same terms (section 5 of the license).

将 Open Agent Connector MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Open Agent Connector 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 在 TypingMind 中,您可以使用远程托管的 MCP 服务器的 URL 连接此 MCP 服务。

添加 MCP 服务器 URL

如果 Open Agent Connector 已托管在远程服务器上,或您的团队希望让多个用户共用一个连接器,请选择此方式。

1

打开 MCP 连接器

在 TypingMind 中,前往“插件”,打开“MCP 连接器”,然后选择“添加 URL”。

  1. 在您的浏览器中打开 TypingMind。
  2. 进入“插件”。
  3. 打开“MCP 连接器”。
  4. 点击“添加 URL”。
TypingMind 的“添加自定义 MCP 服务器 URL”表单
2

粘贴服务器 URL

在“服务器 URL”字段中输入 提供商提供的 MCP 服务器 URL。根据服务器要求,添加连接名称、描述、图标、自定义 HTTP 请求头或 OAuth 客户端设置。

  1. 将 提供商提供的 MCP 服务器 URL 粘贴到“服务器 URL”字段中。
  2. 为 Open Agent Connector 输入连接名称。
  3. 您可以添加描述和图标,以便更容易识别此连接。
  4. 如果服务器需要身份验证,请添加自定义 HTTP 请求头或 OAuth 客户端信息。
3

创建连接

点击“创建连接”,然后返回插件列表,确认新的 MCP 连接处于可用状态。

  1. 点击“创建连接”。
  2. 返回 MCP 连接器列表。
  3. 确认列表中的 Open Agent Connector 连接显示为可用状态。
  4. 如果连接未立即出现,请刷新插件列表。
4

切换模型,无需重新连接

使用您偏好的模型开始聊天,在“插件”中启用 Open Agent Connector 工具,并根据需要随时切换到其他模型。该 MCP 连接在 TypingMind 工作区中仍然可用。

  1. 在 TypingMind 中开始新聊天。
  2. 选择您想使用的 AI 模型。
  3. 在“插件”中启用 Open Agent Connector 工具。
  4. 需要时,请让模型使用该工具。
  5. 切换到其他 AI 模型,继续使用同一个 MCP 连接。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Open Agent Connector 帮我完成这项任务吗?
Open Agent Connector
当然,我看过了。
以下是我使用 Open Agent Connector 得到的结果。

常见问题

Open Agent Connector MCP 服务器有什么用途?

Open Agent Connector 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Open Agent Connector MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 Open Agent Connector。

为什么在 TypingMind 中使用 Open Agent Connector MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 Open Agent Connector 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Open Agent Connector MCP 连接到 TypingMind?

要连接 Open Agent Connector,请在 TypingMind 中添加该远程 MCP 服务器的 URL。如果您希望在 TypingMind 工作区中使用远程 MCP 连接,这种方式很适合。

Open Agent Connector MCP 在 TypingMind 中提供哪些工具?

Open Agent Connector 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Open Agent Connector MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 Open Agent Connector 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇