Customize
Add a connector
Add a connector.
/workspaces/{workspace}/customize/connectorsfrom says where it comes from: {"kind": "directory", "id"} for one of the directory’s remote MCP servers, {"kind": "plugin", "ref", "server"} for a server an installed plugin names, or {"kind": "address", "name", "url"} for any MCP server over HTTP (name is 2 to 32 lowercase letters, digits and hyphens). auth is none, header (give header with the header’s name and value, kept sealed and never returned) or oauth (an owner then signs in on the site: sign-in needs a browser, so it has no route). Its tools are listed as soon as it can be reached. At most 50 a workspace. Owners only. Recorded in the audit log.
from is {"kind": "directory", "id"} for a server in g1t’s directory, {"kind": "plugin", "ref", "server"} for one an installed plugin names in its .mcp.json, or {"kind": "address", "name", "url"} for any MCP server over HTTP. With auth oauth the connector starts as needs_sign_in and an owner signs in on the site. The key’s value is sealed under the workspace’s CONNECTORS_KEY and never returned. A new connector reaches no agent until it is granted: see grant_connector. At most 50 connectors a workspace.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
customizewithactionadd_connector, and the same inputs - Scope: An access token needs
workspace:admin.
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
workspace |
string | Yes | The workspace’s slug. |
Body parameters
Section titled “Body parameters”Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.
| Name | Type | Required | Description |
|---|---|---|---|
from |
object | Yes | Where it comes from: {“kind”: “directory”, “id”}, {“kind”: “plugin”, “ref”, “server”} or {“kind”: “address”, “name”, “url”}. |
from.kind |
string | Yes | One of directory, plugin, address. |
from.id |
string | No | For directory: the directory entry’s id. |
from.ref |
string | No | For plugin: the installed plugin, as name@marketplace. |
from.server |
string | No | For plugin: the server’s name in its .mcp.json. |
from.name |
string | No | For address: 2 to 32 lowercase letters, digits and hyphens. |
from.url |
string | No | For address: the MCP server’s https address. |
auth |
string | No | How it signs in. none when left out. One of none, header, oauth. |
header |
object or null | No | For header auth: the header’s name and value. The value is kept sealed and never returned. |
Example request
Section titled “Example request”curl -X POST https://api.g1t.sh/workspaces/flagon-io/customize/connectors \ -H "Authorization: Bearer $G1T_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "from": { "kind": "address", "name": "docs-search", "url": "https://mcp.flagon.dev/docs" }, "auth": "header", "header": { "name": "X-Api-Key", "value": "fd_live_…" } }'Example response
Section titled “Example response”A successful request answers 200 with:
{ "id": "con_01kq9j6m8p0r2t4v6x8z0b2d4f", "name": "docs-search", "title": "docs-search", "url": "https://mcp.flagon.dev/docs", "category": null, "about": null, "auth": "header", "state": "connected", "problem": null, "from": { "kind": "address" }, "tools": [ { "name": "search_docs", "description": "Search Flagon's documentation.", "input_schema": { "type": "object", "properties": { "query": { "type": "string" } }, "required": [ "query" ] } } ], "checked_at": "2026-10-11T14:40:56.402Z", "header_name": "X-Api-Key", "signed_in_as": null, "signed_in_at": null, "grants": [], "added_by": "syntaqx", "added_at": "2026-10-11T14:40:55.130Z"}Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
A token is required, or the one sent is not valid. |
| 403 | forbidden |
The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | not_found |
It does not exist, or you cannot see it. |
| 409 | conflict |
The request conflicts with the current state. |
| 422 | invalid |
The input is not valid. message says which field and why. |