> ## Documentation Index
> Fetch the complete documentation index at: https://acm-aa28ebf6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Server

> Update metadata and configuration of an existing MCP server

## Endpoint

<Card>
  <code>PUT [https://api.superbox.ai/api/v1/servers/:name](https://api.superbox.ai/api/v1/servers/:name)</code>
</Card>

## Authentication

<Tabs>
  <Tab title="Required">
    This endpoint requires authentication. You must be the server owner.
    <Warning>Only the server owner can update server metadata</Warning>
  </Tab>
</Tabs>

## Path Parameters

<ParamField path="name" type="string" required>
  Unique server identifier to update. **Example:** `weather-mcp`
</ParamField>

## Request Body

<Info>All fields are optional. Only include fields you want to update.</Info>

<ParamField body="version" type="string">
  New semantic version number. **Format:** `MAJOR.MINOR.PATCH`. Must be greater than the current version.
</ParamField>

<ParamField body="description" type="string">
  Updated description. **Length:** 20-500 characters
</ParamField>

<ParamField body="license" type="string">
  Updated software license. **Examples:** `MIT`, `Apache-2.0`, `GPL-3.0`
</ParamField>

<ParamField body="repository" type="object">
  Updated repository information

  <Expandable title="properties">
    <ParamField body="type" type="string">
      Repository type
    </ParamField>

    <ParamField body="url" type="string">
      New repository URL (must be public)
    </ParamField>
  </Expandable>

  <Warning>Changing the repository URL will trigger a new security scan</Warning>
</ParamField>

<ParamField body="pricing" type="object">
  Updated pricing configuration

  <Expandable title="properties">
    <ParamField body="currency" type="string">
      Currency code (e.g., `INR`)
    </ParamField>

    <ParamField body="amount" type="number">
      New price amount
    </ParamField>
  </Expandable>

  <Note>Pricing changes take effect immediately for new users</Note>
</ParamField>

<ParamField body="metadata" type="object">
  Optional metadata updates

  <Expandable title="properties">
    <ParamField body="homepage" type="string">
      Updated homepage URL
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="status" type="string">
  `"success"` on success, `"error"` on failure
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable confirmation message
</ResponseField>

<ResponseField name="server" type="object">
  The updated server object (same structure as the [Get Server](/api/servers/get) response)
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  # Update version and description
  curl -X PUT "https://api.superbox.ai/api/v1/servers/weather-mcp" \
    -H "Authorization: Bearer $SUPERBOX_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "version": "1.3.0",
      "description": "Enhanced weather server with 10-day forecasts"
    }'

  # Update pricing
  curl -X PUT "https://api.superbox.ai/api/v1/servers/weather-mcp" \
    -H "Authorization: Bearer $SUPERBOX_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "pricing": {
        "currency": "INR",
        "amount": 99
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  // Update description
  const updates = {
    description: "Enhanced weather server with 10-day forecasts and alerts"
  };

  const response = await fetch(
    'https://api.superbox.ai/api/v1/servers/weather-mcp',
    {
      method: 'PUT',
      headers: {
        'Authorization': `Bearer ${process.env.SUPERBOX_API_TOKEN}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify(updates)
    }
  );

  const result = await response.json();

  if (result.status === 'success') {
    console.log('Server updated successfully');
    console.log('Updated server:', result.server.name);
  } else {
    console.error('Failed:', result.detail);
  }
  ```

  ```python Python theme={null}
  import requests
  import os

  server_name = "weather-mcp"
  url = f"https://api.superbox.ai/api/v1/servers/{server_name}"

  updates = {
      "pricing": {
          "currency": "INR",
          "amount": 99
      }
  }

  headers = {
      "Authorization": f"Bearer {os.getenv('SUPERBOX_API_TOKEN')}",
      "Content-Type": "application/json"
  }

  response = requests.put(url, headers=headers, json=updates)
  result = response.json()

  if result['status'] == 'success':
      print(f"Server updated: {result['message']}")
  else:
      print(f"Failed: {result['detail']}")
  ```

  ```go Go theme={null}
  package main

  import (
  "bytes"
  "encoding/json"
  "fmt"
  "net/http"
  "os"
  )

  type ServerUpdate struct {
  Version     string   `json:"version,omitempty"`
  Description string   `json:"description,omitempty"`
  Pricing     *Pricing `json:"pricing,omitempty"`
  }

  type Pricing struct {
  Currency string  `json:"currency"`
  Amount   float64 `json:"amount"`
  }

  func updateServer(name string, updates ServerUpdate) error {
  url := fmt.Sprintf("https://api.superbox.ai/api/v1/servers/%s", name)

  jsonData, _ := json.Marshal(updates)

  req, _ := http.NewRequest("PUT", url, bytes.NewBuffer(jsonData))
  req.Header.Set("Authorization", "Bearer "+os.Getenv("SUPERBOX_API_TOKEN"))
  req.Header.Set("Content-Type", "application/json")

  client := &http.Client{}
  resp, err := client.Do(req)
  if err != nil {
  return err
  }
  defer resp.Body.Close()

  var result map[string]interface{}
  json.NewDecoder(resp.Body).Decode(&result)

  if result["status"] == "success" {
  fmt.Println("Server updated successfully")
  }

  return nil
  }

  func main() {
  updates := ServerUpdate{
  Version:     "1.3.0",
  Description: "Enhanced weather server",
  }

  updateServer("weather-mcp", updates)
  }
  ```
</CodeGroup>

## Response Examples

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "status": "success",
    "message": "Server 'weather-mcp' updated successfully",
    "server": {
      "name": "weather-mcp",
      "version": "1.3.0",
      "description": "Enhanced weather server with 10-day forecasts and alerts",
      "author": "areeb",
      "lang": "python",
      "license": "MIT",
      "entrypoint": "main.py",
      "repository": {
        "type": "git",
        "url": "https://github.com/areeb/weather-mcp"
      },
      "pricing": {
        "currency": "INR",
        "amount": 0
      }
    }
  }
  ```

  ```json 400 Validation Error theme={null}
  {
    "status": "error",
    "detail": "New version must be greater than current version"
  }
  ```

  ```json 403 Forbidden theme={null}
  {
    "status": "error",
    "detail": "Only the server owner can update it"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "status": "error",
    "detail": "Server not found"
  }
  ```
</ResponseExample>

## Update Scenarios

<AccordionGroup>
  <Accordion title="Version Bump" icon="arrow-up">
    **When to bump versions:**

    * **Patch (1.0.0 to 1.0.1)**: Bug fixes, minor changes
    * **Minor (1.0.0 to 1.1.0)**: New features, backward compatible
    * **Major (1.0.0 to 2.0.0)**: Breaking changes

    ```javascript theme={null}
    await fetch(url, {
      method: 'PUT',
      headers,
      body: JSON.stringify({ version: '1.0.1' })
    });
    ```
  </Accordion>

  <Accordion title="Pricing Changes" icon="indian-rupee-sign">
    ```javascript theme={null}
    // Make server free
    await fetch(url, {
      method: 'PUT',
      headers,
      body: JSON.stringify({
        pricing: { currency: 'INR', amount: 0 }
      })
    });
    ```

    <Note>
      Existing users keep their current pricing until the next billing cycle
    </Note>
  </Accordion>

  <Accordion title="Description Updates" icon="pen-to-square">
    ```python theme={null}
    requests.put(url, headers=headers, json={
        'description': 'Now with 10-day forecasts and weather alerts!'
    })
    ```
  </Accordion>

  <Accordion title="Repository Migration" icon="code-branch">
    <Warning>Repository changes trigger a new security scan</Warning>

    ```javascript theme={null}
    await fetch(url, {
      method: 'PUT',
      headers,
      body: JSON.stringify({
        repository: {
          type: 'git',
          url: 'https://github.com/new-org/weather-mcp'
        }
      })
    });
    ```
  </Accordion>
</AccordionGroup>

## Best Practices

<CardGroup cols={2}>
  <Card title="Semantic Versioning" icon="tags">
    Follow semver strictly to communicate changes clearly to users
  </Card>

  <Card title="Document Changes" icon="file-lines">
    Update your README and changelog when making updates
  </Card>

  <Card title="Test Before Update" icon="vial">
    Test changes in your repository before updating the server
  </Card>

  <Card title="Notify Users" icon="bell">
    For breaking changes, notify users through your communication channels
  </Card>
</CardGroup>
