# Create custom connector

> Source: https://elaichi.ai/docs/api-reference/custom-connectors/connector/createcustomconnector/

`POST /connector`

Resource: **Connector** · API: **Custom connectors**

## Request body

- **`remote_mcp`** _(object, required)_
  Mutually exclusive with `config`.
  - **`url`** _(string)_
    The server's streamable-HTTP MCP endpoint (https).
  - **`auth_mode`** _(string)_
    Allowed: `oauth_auto`, `oauth_client`, `custom`, `none`
  - **`auth_config`** _(object)_
    `custom` only: `credentials` (an `api_key` form), `authorization`, `headers`, `query` — the shape of a connector config minus `resources`. Values are placeholders (`{{api_key}}`); a literal secret is refused.
  - **`client_id`** _(string)_
    `oauth_client` only.
  - **`client_secret`** _(string)_
    `oauth_client` only. Write-only.
  - **`scopes`** _(array<string>)_
    OAuth only. Defaults to what the server advertises.
  - **`omit_refresh_scope`** _(boolean)_
    OAuth modes only (400 for `custom` and `none`). Off by default. `true` makes a token refresh send no `scope` (RFC 6749 §6: omitted means the original grant); the RFC 8707 `resource` is still sent. For a server that rejects a scope on refresh, such as Close (`400 invalid_scope`). Echoed as `auth.omit_refresh_scope`.
- **`logo`** _(string)_
  `remote_mcp` only. An https URL.
- **`description`** _(string)_
  `remote_mcp` only.
- **`slug`** _(string)_
  Lowercase letters, digits and hyphens. `new` is reserved.
- **`label`** _(string)_
- **`category`** _(string,null)_
- **`config`** _(object)_
  Connector definition (resources, methods, auth). Mutually exclusive with `remote_mcp`; `config.remote_mcp` is reserved.

## Code examples

### curl

```bash
curl -X POST 'https://api.elaichi.ai/connector' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"remote_mcp":{},"logo":"your_logo","description":"your_description","slug":"your_slug","label":"your_label","config":{}}'
```

### JavaScript

```javascript
const body = {
  "remote_mcp": {},
  "logo": "your_logo",
  "description": "your_description",
  "slug": "your_slug",
  "label": "your_label",
  "config": {}
};

const response = await fetch('https://api.elaichi.ai/connector', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/connector"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "remote_mcp": {},
    "logo": "your_logo",
    "description": "your_description",
    "slug": "your_slug",
    "label": "your_label",
    "config": {}
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```
