> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hasmcp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# What is the required JSON payload to create an MCP server?

> Detailed schema and explanation of the JSON payload required when creating an MCP server via the HasMCP API.

# JSON Payload for Creating an MCP Server

## Using HasMCP UI

<img src="https://mintcdn.com/hasmcp/9Embd1XJnDsV9Wi6/images/kb/create-server.png?fit=max&auto=format&n=9Embd1XJnDsV9Wi6&q=85&s=c23e2d23b5bfd73cdadab57b9d64d129" alt="New Server Creation Page" width="2560" height="1440" data-path="images/kb/create-server.png" />

When using the dashboard to create an MCP Server, the UI form automatically constructs the required JSON payload for you based on the fields you fill out (Name, Instructions, Providers, etc.).

## Using REST API

When creating an MCP server programmatically via the `POST /servers` endpoint, your request body must contain a JSON object conforming to the [`CreateServerRequest`](/api-reference/servers/create-mcp-server) schema.

### Required Structure

The payload must have a root `server` object containing your configuration details. The server `name` is typically the most crucial starting property.

#### Schema Map

* `server` (object, required):
* `name` (string): The name of your MCP server.
* `instructions` (string): System prompts or initial instructions for the server.
* `version` (integer): The numeric version of the server configuration.
* `providers` (array of objects): Associated API providers. Each object requires an `id` and optionally an array of `tools` (each with an `id`).
* `resources` (array of objects): Associated resources (requires an `id`).
* `prompts` (array of objects): Associated prompts (requires an `id`).

#### Example JSON Payload

```json theme={null}
{
 "server": {
 "name": "customerSupportServer",
 "instructions": "Help customers answer order-related questions.",
 "version": 1,
 "providers": [
 {
 "id": "kSuB9Gf6aD4",
 "tools": [
 {
 "id": "tOlM8Hr2zP1"
 }
 ]
 }
 ]
 }
}
```
