Skip to content

MCP Hosting API

Endpoints for provisioning and managing private MCP servers. Available to Studio tier organizations only.

Overview

Studio tier organizations can host private MCP (Model Context Protocol) servers managed by Nexus Suite. Each server runs in an isolated container with network access restricted to authenticated organization members.

Limits

  • Maximum 5 private MCP server instances per Studio organization
  • Servers can be deployed from a Git repository URL or a pre-built container image

Provision a Server

Create a new private MCP server instance.

http
POST /v1/mcp/servers
Authorization: Bearer <jwt>

Requires Studio tier admin role.

Body:

json
{
  "name": "my-database-tools",
  "source_type": "git",
  "source_url": "https://github.com/org/mcp-server.git"
}
FieldRequiredDescription
nameYesDisplay name for the server
source_typeYesgit (build from repo) or image (pre-built container)
source_urlYesGit repository URL or container image reference

Response: 201 Created

json
{
  "data": {
    "id": "mcp_abc123",
    "name": "my-database-tools",
    "status": "provisioning",
    "source_type": "git",
    "source_url": "https://github.com/org/mcp-server.git",
    "endpoint_url": null,
    "created_at": "2024-01-15T10:30:00Z"
  }
}

The server starts in provisioning status. Once the container is built and running, the status changes to running and endpoint_url is populated.

Errors:

CodeCondition
TIER_REQUIREDUser is not on Studio tier
FORBIDDENUser does not have admin role in the organization
QUOTA_EXCEEDEDOrganization has reached the 5-server limit

List Servers

List all MCP servers for the organization.

http
GET /v1/mcp/servers
Authorization: Bearer <jwt>

Response: 200 OK

json
{
  "data": {
    "servers": [
      {
        "id": "mcp_abc123",
        "name": "my-database-tools",
        "status": "running",
        "endpoint_url": "wss://mcp.nexus-suite.dev/mcp_abc123",
        "source_type": "git",
        "source_url": "https://github.com/org/mcp-server.git",
        "created_by": "usr_xyz789",
        "created_at": "2024-01-15T10:30:00Z"
      }
    ],
    "limit": 5,
    "used": 1
  }
}

Server Statuses

StatusDescription
provisioningContainer is being built and deployed
runningServer is active and accepting connections
stoppedServer has been stopped
errorDeployment or runtime error occurred

Get Server Details

Get detailed information about a specific MCP server, including recent logs.

http
GET /v1/mcp/servers/:id
Authorization: Bearer <jwt>

Response: 200 OK

json
{
  "data": {
    "id": "mcp_abc123",
    "name": "my-database-tools",
    "status": "running",
    "endpoint_url": "wss://mcp.nexus-suite.dev/mcp_abc123",
    "source_type": "git",
    "source_url": "https://github.com/org/mcp-server.git",
    "container_id": "ctr_def456",
    "created_by": "usr_xyz789",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:35:00Z",
    "logs": [
      {
        "timestamp": "2024-01-15T10:35:00Z",
        "level": "info",
        "message": "MCP server started on port 3000"
      }
    ]
  }
}

Connect to Server

Get connection credentials for an MCP server. The returned credentials are used by NexusIDE and NexusCore CLI to establish a connection.

http
POST /v1/mcp/servers/:id/connect
Authorization: Bearer <jwt>

Response: 200 OK

json
{
  "data": {
    "endpoint_url": "wss://mcp.nexus-suite.dev/mcp_abc123",
    "token": "mcp_conn_token_...",
    "expires_in": 3600
  }
}

The connection token is scoped to the requesting user and expires after 1 hour. RBAC permissions are verified — the user must have access to the server.

Deprovision a Server

Remove a private MCP server instance.

http
DELETE /v1/mcp/servers/:id
Authorization: Bearer <jwt>

Requires Studio tier admin role.

Response: 204 No Content

WARNING

This permanently stops and removes the server container. All server data is deleted. This action cannot be undone.

Released under the MIT License.