---
title: "CreateMcpServerBody"
description: "Request body for creating a McpServer."
section: "Reference"
group: "Types"
order: 146
---

## Definition

```ts
interface CreateMcpServerBody {
  workspaceId: string;
  name: string;
  url: string;
  authType?: "none" | "oauth" | "api_key" | undefined;
  apiKey?: string | undefined;
  oauthClientId?: string | undefined;
  oauthClientSecret?: string | undefined;
  oauthTokenEndpoint?: string | undefined;
  oauthAuthorizationEndpoint?: string | undefined;
  oauthScopes?: string | undefined;
  headers?: Record<string, unknown> | undefined;
  connectorId?: string | undefined;
  connectorConfig?: Record<string, unknown> | undefined;
}
```

## Fields

| Field                        | Type                                          | Notes      |
| ---------------------------- | --------------------------------------------- | ---------- |
| `workspaceId`                | `string`                                      | `required` |
| `name`                       | `string`                                      | `required` |
| `url`                        | `string`                                      | `required` |
| `authType`                   | `"none" \| "oauth" \| "api_key" \| undefined` | `optional` |
| `apiKey`                     | `string \| undefined`                         | `optional` |
| `oauthClientId`              | `string \| undefined`                         | `optional` |
| `oauthClientSecret`          | `string \| undefined`                         | `optional` |
| `oauthTokenEndpoint`         | `string \| undefined`                         | `optional` |
| `oauthAuthorizationEndpoint` | `string \| undefined`                         | `optional` |
| `oauthScopes`                | `string \| undefined`                         | `optional` |
| `headers`                    | `Record<string, unknown> \| undefined`        | `optional` |
| `connectorId`                | `string \| undefined`                         | `optional` |
| `connectorConfig`            | `Record<string, unknown> \| undefined`        | `optional` |
