---
title: Create MCP Configuration
---

# Create MCP Configuration

Create a new MCP (Model Context Protocol) configuration that can be reused across multiple API requests. Configurations store connector settings, credentials, and access permissions.


{% api-container %}
{% api-content %}

{% endpoint method="POST" path="https://api.aitronos.com/v1/mcp-configurations" /%}

#### Request Body

**`name`** string <em style="color: #ef4444 !important; font-weight: 600 !important; font-style: normal !important;">required</em>

Human-readable name for the configuration. Used to identify the configuration in lists and logs.

**`organization_id`** string <em style="color: #ef4444 !important; font-weight: 600 !important; font-style: normal !important;">required</em>

Organization ID to associate this configuration with.

**`server_url`** string <em style="color: #ef4444 !important; font-weight: 600 !important; font-style: normal !important;">required</em>

URL of the MCP server endpoint.

**`transport_type`** string <em style="color: #ef4444 !important; font-weight: 600 !important; font-style: normal !important;">required</em>

Transport protocol for the MCP connection. Example: `"sse"`, `"stdio"`.

**`auth_type`** string <em style="color: #ef4444 !important; font-weight: 600 !important; font-style: normal !important;">required</em>

Authentication type for the MCP server. Example: `"none"`, `"bearer"`, `"oauth"`.

**`credentials`** object <em style="color: #9ca3af !important; font-weight: 500 !important; font-style: normal !important;">optional</em>

Authentication credentials for the MCP server. Structure depends on `auth_type`.

**`tool_configuration`** object <em style="color: #9ca3af !important; font-weight: 500 !important; font-style: normal !important;">optional</em>

Configuration for which tools are enabled or restricted on this MCP server.


## Returns

Returns a JSON response indicating success or failure.

{% /api-content %}
{% api-examples %}
{% tabs %}
{% tab label="Request" %}

{% code-group mode="dropdown" %}

```bash {% title="cURL" %}
curl -X POST "https://api.aitronos.com/v1/mcp-configurations" \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My MCP Server",
    "organization_id": "org_abc123",
    "server_url": "https://mcp.example.com/sse",
    "transport_type": "sse",
    "auth_type": "bearer",
    "credentials": {
      "token": "my-bearer-token"
    }
  }'
```

```python {% title="Python" %}
import os
import requests

api_key = os.environ["FREDDY_API_KEY"]

response = requests.post(
    "https://api.aitronos.com/v1/mcp-configurations",
    headers={"X-API-Key": api_key},
    json={
        "name": "My MCP Server",
        "organization_id": "org_abc123",
        "server_url": "https://mcp.example.com/sse",
        "transport_type": "sse",
        "auth_type": "bearer",
        "credentials": {
            "token": "my-bearer-token"
        }
    }
)

print(response.json())
```

```javascript {% title="JavaScript" %}
const apiKey = process.env.FREDDY_API_KEY;

const response = await fetch('https://api.aitronos.com/v1/mcp-configurations', {
  method: 'POST',
  headers: {
    'X-API-Key': apiKey,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'My MCP Server',
    organization_id: 'org_abc123',
    server_url: 'https://mcp.example.com/sse',
    transport_type: 'sse',
    auth_type: 'bearer',
    credentials: {
      token: 'my-bearer-token'
    }
  })
});

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

{% /code-group %}

{% /tab %}
{% tab label="Response" %}

```json {% title="201 Created" %}
{
  "id": "mcp_config_abc123",
  "name": "My MCP Server",
  "type": "custom",
  "organizationId": "org_abc123",
  "userId": null,
  "serverUrl": "https://mcp.example.com/sse",
  "transportType": "sse",
  "authType": "bearer",
  "isActive": true,
  "connectionStatus": "untested",
  "createdAt": "2025-11-01T10:00:00Z",
  "updatedAt": "2025-11-01T10:00:00Z"
}
```

```json {% title="4xx Error" %}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The request contains invalid parameters.",
    "system_message": "Missing required field: server_url",
    "type": "client_error",
    "status": 422,
    "details": {
      "field": "server_url"
    },
    "trace_id": "2fbbf3b6-51a1-4f1b-88e2-c00e8b52fbb8",
    "timestamp": "2025-11-02T08:21:45Z"
  }
}
```

{% /tab %}
{% /tabs %}
{% /api-examples %}
{% /api-container %}

---

## Related Resources

- [List Configurations](./list.md)
