> For the complete documentation index, see [llms.txt](https://docs.interactive.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.interactive.ai/cli/iai_mcps_update.md).

# iai mcps update

Update an mcp in a project

## Synopsis

Update an mcp in a specific project.

Only the flags you pass are applied; everything else is left at its current value.

Lists (--env, --secret) replace the entire current list when provided — pass every value you want to keep. --env can't set MCP\_API\_KEY while the mcp has a credential.

Use --clear-env, --clear-secret, or --clear-stack-id to remove those configurations entirely.

The type (self-hosted/remote) and, for remote mcps, the URL/catalog cannot change — delete and recreate instead. Self-hosted workload flags can be updated independently. Self-hosted auth fields can be updated independently; remote credential changes require --auth-type, and so does adding a credential to a self-hosted mcp created without one (e.g. --auth-type bearer). Changing the credential restarts the mcp and every agent attached to it, so a self-hosted mcp's server reads the new value from MCP\_API\_KEY.

```
iai mcps update <mcp_name> [flags]
```

## Examples

```
  iai mcps update my-tool --image-tag v2
  iai mcps update my-tool --image-type platform --image-name gdrive --image-tag 1.0.0
  iai mcps update my-tool --memory 1G --cpu 500m
  iai mcps update my-tool --endpoint
  iai mcps update my-tool --endpoint=false
  iai mcps update my-tool --env ENV=dev --env SILENT_MODE=true --secret platform-dev --secret services-dev
  iai mcps update my-tool --clear-env
  iai mcps update my-tool --clear-stack-id
  iai mcps update my-tool --credential-stdin < token.txt
  iai mcps update acme --auth-type bearer --credential "$NEW_TOKEN"
  iai mcps update acme --auth-type custom --credential "$NEW_TOKEN" --auth-header X-Token --auth-header-prefix "Token "
  iai mcps update gh --auth-type oauth --client-id "$NEW_CLIENT_ID" --client-secret-stdin < secret.txt
  iai mcps update acme --description "notes for the team"
```

## Options

```
      --auth-header string          Header used for custom authentication
      --auth-header-prefix string   Optional credential prefix for custom authentication (e.g. "Token ")
      --auth-type string            Authentication type: "bearer" (Authorization: Bearer), "api_key" (X-API-Key), "custom", "none", "oauth", or "client_credentials"; inferred on create
      --clear-env                   Remove all environment variables from the mcp (self-hosted)
      --clear-secret                Remove all secret references from the mcp (self-hosted)
      --clear-stack-id              Remove the mcp from its stack (self-hosted)
      --client-id string            Client ID of an app you registered at the provider; requires --catalog-id (oauth or client_credentials)
      --client-secret string        Client secret of that app; write-only. Rotatable on oauth via update, delete-and-recreate on client_credentials. Prefer --client-secret-stdin
      --client-secret-stdin         Read the client secret from stdin, keeping it out of shell history and the process list
      --cpu string                  CPU cores or millicores (e.g. 0.5, 1, 2, 500m, 1000m) (self-hosted, default 100m)
      --credential string           Credential the mcp server requires; a self-hosted mcp's server reads it from MCP_API_KEY
      --credential-stdin            Read the credential from stdin instead of --credential
      --description string          Human-readable description of the mcp
      --endpoint                    Expose the mcp publicly at <mcp-name>-<project-hash>.interactive.ai (self-hosted)
      --env stringArray             Replaces the environment variables (NAME=VALUE); repeat for every entry to keep (self-hosted)
  -h, --help                        help for update
      --image-name string           Container image name; a catalog id for --image-type platform (self-hosted)
      --image-tag string            Container image tag (self-hosted)
      --image-type string           Image type: 'internal' (the project's registry, default) or 'platform' (a self-hosted image from 'iai mcps catalog') (self-hosted)
      --memory string               Memory in megabytes (M) or gigabytes (G) (e.g. 128M, 512M, 1G, 1.5G) (self-hosted, default 128M)
      --path string                 Endpoint path the mcp's own server exposes (self-hosted, default "/mcp")
      --port int                    Port the mcp's own server listens on (self-hosted, default 3000)
      --secret stringArray          Replaces the secret references; repeat for every entry to keep (self-hosted)
      --stack-id string             Stack ID to assign the mcp to (self-hosted)
```

## Options inherited from parent commands

```
      --api-key string               API key for authentication
      --cfg-file string              Path to YAML config file with organization, project, and optional service definitions
      --deployment-hostname string   Hostname for the deployment API (default "https://deployment.interactive.ai")
      --hostname string              Hostname for the API (default "https://app.interactive.ai")
  -o, --organization string          Organization name that owns the project
  -p, --project string               Project name that owns the mcps
```

## SEE ALSO

* [iai mcps](/cli/iai_mcps.md) - Deploy and manage MCP servers


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.interactive.ai/cli/iai_mcps_update.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
