MetorialDocs

Custom Providers

Custom providers allow you to deploy your own MCP servers. Create providers from container images, remote URLs, or serverless functions.

The Custom Provider object

custom_provider.json
{
  "object": "custom_provider",
  "id": "cpr_1aBcDeFgHjKlMnPq",
  "status": "active",
  "type": "function",
  "name": "My Custom Provider",
  "description": "A custom provider for my application",
  "metadata": {},
  "draft": {
    "object": "custom_provider.draft#function",
    "container_image": {
      "object": "custom_provider.draft.container",
      "container_registry": "https://index.docker.io/v1/",
      "container_image_tag": "v1.0.0",
      "container_image": "my-app-image"
    },
    "remote_mcp_server": {
      "object": "custom_provider.draft.remote",
      "url": "https://mcp.example.com",
      "transport": "sse"
    },
    "config": {
      "object": "custom_provider.draft.config",
      "schema": {
        "type": "json_schema",
        "schema": {}
      },
      "transformer": "example_transformer"
    }
  },
  "scm_repo": {
    "object": "scm.repository",
    "id": "example_id",
    "provider": {
      "object": "scm.provider",
      "type": "github",
      "id": "example_id",
      "name": "example_name",
      "owner": "example_owner"
    },
    "url": "example_url",
    "is_private": false,
    "default_branch": "example_default_branch",
    "created_at": "2026-09-11T20:30:32.771Z"
  },
  "provider": {
    "object": "provider",
    "id": "pro_5gHjKlMnPqRsTuVw",
    "access": "public",
    "status": "active",
    "publisher": {
      "object": "provider.publisher",
      "id": "pub_9hJkLmNpQrStUvWx",
      "name": "Acme Corp",
      "description": "A leading provider of developer tools",
      "image_url": "https://cdn.metorial.com/images/acme.png",
      "created_at": "2025-09-15T10:30:00.000Z",
      "updated_at": "2026-01-10T14:45:00.000Z"
    },
    "current_version": {
      "object": "provider.version",
      "id": "prv_4dEfGhJkLmNpQrSt",
      "version": "1.0.0",
      "provider_id": "pro_5gHjKlMnPqRsTuVw",
      "is_current": false,
      "name": "Version 1.0.0",
      "description": "example_description",
      "metadata": {},
      "specification_id": "psp_9gHjKlMnPqRsTuVw",
      "created_at": "2025-09-15T10:30:00.000Z",
      "updated_at": "2026-01-10T14:45:00.000Z"
    },
    "oauth": {
      "status": "enabled",
      "callback_url": "example_callback_url",
      "auto_registration": {
        "status": "supported"
      }
    },
    "identifier": "example_identifier",
    "name": "example_name",
    "description": "example_description",
    "slug": "example_slug",
    "metadata": {},
    "created_at": "2025-09-15T10:30:00.000Z",
    "updated_at": "2026-01-10T14:45:00.000Z"
  },
  "created_at": "2025-09-15T10:30:00.000Z",
  "updated_at": "2026-01-10T14:45:00.000Z"
}
object"custom_provider"required
idstringrequired
status"active" | "archived" | "deleted"required
type"function" | "container" | "remote"required
namestringrequired
descriptionstringrequirednullable
metadataRecord<string, any>requirednullable
created_atdaterequired
updated_atdaterequired

Endpoints

List custom providers

GET/custom-providers

Returns a paginated list of custom providers.

Query parameters

status"active" | "archived" or "active" | "archived"[]optional

Filter by status (active, archived)

type"container" | "function" | "remote" or "container" | "function" | "remote"[]optional

Filter by type (container, function, remote)

idstring or string[]optional

Filter by custom provider IDs

provider_idstring or string[]optional

Filter by provider IDs (matches providers connected to sessions)

searchstringoptional

Search by name or description

Example request

curl -X GET "https://api.metorial.com/custom-providers" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Get custom provider

GET/custom-providers/:custom_provider_id

Retrieves a specific custom provider by ID.

Path parameters

custom_provider_idstringrequired

The unique identifier for the custom_provider

Example request

curl -X GET "https://api.metorial.com/custom-providers/cus_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Get custom provider environment

GET/custom-providers/:custom_provider_id/env

Retrieves the environment variables for a specific custom provider by ID.

Path parameters

custom_provider_idstringrequired

The unique identifier for the custom_provider

Example request

curl -X GET "https://api.metorial.com/custom-providers/cus_Rm4Mnheq2bfEPhBhP7SY/env" \
  -H "Authorization: Bearer metorial_sk_io2h4..."

Create custom provider

POST/custom-providers

Creates a new custom provider.

Request body

namestringrequired
descriptionstringoptional
metadataRecord<string, any>optional

Custom key-value pairs for storing additional information

Example request

curl -X POST "https://api.metorial.com/custom-providers" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "name": "My Custom Provider",
  "description": "A custom MCP server for my application",
  "metadata": {},
  "from": {
    "type": "container",
    "image_ref": "example_image_ref",
    "username": "example_username",
    "password": "example_password"
  },
  "config": {
    "schema": {},
    "transformer": "example_transformer"
  }
}'

Update custom provider

PATCH/custom-providers/:custom_provider_id

Updates a specific custom provider.

Path parameters

custom_provider_idstringrequired

The unique identifier for the custom_provider

Request body

namestringoptional
descriptionstringoptional
metadataRecord<string, any>optional

Custom key-value pairs for storing additional information

readmestringoptional

README content in markdown format

Example request

curl -X PATCH "https://api.metorial.com/custom-providers/cus_Rm4Mnheq2bfEPhBhP7SY" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer metorial_sk_io2h4..." \
  -d '{
  "name": "Updated Provider Name",
  "description": "Updated description",
  "metadata": {},
  "readme": "example_readme"
}'

Archive custom provider

POST/custom-providers/:custom_provider_id/archive

Archives a specific custom provider and disables new connections to it.

Path parameters

custom_provider_idstringrequired

The unique identifier for the custom_provider

Example request

curl -X POST "https://api.metorial.com/custom-providers/cus_Rm4Mnheq2bfEPhBhP7SY/archive" \
  -H "Authorization: Bearer metorial_sk_io2h4..."