Run your own Vultr MCP Server locally over STDIO or HTTP, in Docker, or on Kubernetes, and connect Claude Code, Cursor, and VS Code clients to your server.
The Vultr Model Context Protocol (MCP) Server is a server that gives MCP clients read-only access to Vultr infrastructure. The server is in public preview. Vultr hosts a copy at https://mcp.vultr.com/mcp, and you can run your own copy when you need the server inside your own environment.
This guide explains how to run your own copy of the Vultr MCP Server locally over standard input and output (STDIO), locally over HTTP, in a Docker container, and on Kubernetes, and how to connect a client to your server. A self-hosted server is read-only like the hosted server, and no setting turns on tools that change state.
A server that you modify is no longer the official Vultr MCP Server.
Before you begin, you need to:
kubectl access to a Kubernetes cluster and Helm installed to run the server on Kubernetes.The server runs from the project repository. Clone the repository so that every later step has a working directory.
Clone the repository.
Change to the repository directory.
List the directory contents.
Your output should be similar to the one below:
With STDIO, an MCP client launches the server as a child process and exchanges messages with it through standard input and output. A web request does not carry a login in this mode, so the server uses a Vultr API key that you provide as an environment variable.
Install the dependencies.
Set your Vultr API key. Replace VULTR_API_KEY with your key.
Send an initialize request to the server to verify that it starts.
The command writes one MCP request to the standard input of the server. The server prints a startup banner, answers the request, and exits when the input closes. Your output includes a response similar to the one below:
To use the server with a client, configure the client to launch uv run python -m vultr_mcp from the repository directory with VULTR_API_KEY set in the environment of the client.
Over HTTP, the server listens for Streamable HTTP requests and provides a health check. Each request carries its own credential, exactly like the hosted server, so the server does not use an API key from its own environment.
Start the server.
The server listens on port 8080, and the command does not return.
In a second terminal, send a request to the health check.
Your output should be similar to the one below:
Call a tool with your Vultr API key as the bearer credential. Replace VULTR_API_KEY with your key.
The response contains the details of your Vultr account.
Send the same request without the Authorization header.
The response contains the error Vultr API returned 401: Invalid API token. The server does not fall back to the API key in its environment.
The server also serves each product area on its own path, such as /mcp/compute, which serves only the compute tools. For the list of paths, see Tools.
The repository includes a Dockerfile that builds the server as a container image. The image starts the server over HTTP as a non-root user, so a container exposes the same health check and tool paths as a local HTTP server.
Build the image from the repository directory.
Start a container.
The command prints the container ID.
Send a request to the health check.
Verify that the output contains "status":"ok".
Stop the container. Docker removes the container because the --rm option is set.
The repository includes the Kubernetes manifests that the hosted server runs from. They deploy the server with a shared Redis instance for login state and publish it through a Traefik ingress. The manifests contain the domain and the OAuth application settings of the hosted server, so adapt them to your own environment before you apply them.
Install Traefik with the values file from the repository.
Copy the secret example.
Open the k8s/secret.yaml file in a text editor.
Add the following values to the stringData section, and then save and close the file:
VULTR_OAUTH_CLIENT_SECRET: The secret of your approved Vultr OAuth application.VULTR_API_KEY: An optional fallback credential. Leave the value empty when OAuth is enabled.Open the k8s/configmap.yaml file in a text editor.
Replace the MCP_RESOURCE_URL, VULTR_OIDC_PROVIDER_ID, and VULTR_OAUTH_CLIENT_ID values with the values for your own domain and OAuth application, and then save and close the file. To run without OAuth, set VULTR_OIDC_ENABLED to "false". Clients then send a Vultr API key as the bearer credential.
Open the k8s/ingress.yaml file in a text editor.
Replace both occurrences of mcp.vultr.com with your own domain name, and then save and close the file.
Apply the manifests.
Wait for the deployment to finish rolling out.
Verify that the output shows deployment "vultr-mcp" successfully rolled out.
The deployment runs two replicas behind the ingress. The server uses stateless HTTP, so the ingress does not need session affinity.
A client reaches your own server in one of two ways. Over STDIO, the client launches the server itself and passes it your Vultr API key. Over HTTP, the client connects to a server that is already running and sends your Vultr API key with every request. Choose the way that matches how you run the server.
The client starts and stops the server, so you do not need a running server. Each client needs the path to the repository that you cloned and your Vultr API key.
Add the server to Claude Code. Replace REPOSITORY-PATH with the full path to the cloned repository, and replace VULTR_API_KEY with your key.
List the configured servers.
Verify that the vultr-selfhosted entry shows Connected.
For Cursor, add the following entry to mcp.json. For VS Code, add the same entry to the servers object in .vscode/mcp.json with "type": "stdio". Replace REPOSITORY-PATH and VULTR_API_KEY as before.
The client connects to a server that you started in the previous sections, so keep that server running. The client sends your Vultr API key as the bearer credential with every request.
Add the server to Claude Code. Replace VULTR_API_KEY with your key.
List the configured servers.
Verify that the vultr-selfhosted-http entry shows Connected.
For Cursor, add the following entry to mcp.json. For VS Code, add the same entry to the servers object in .vscode/mcp.json with "type": "http". Replace VULTR_API_KEY as before.
If you run the server on Kubernetes with OAuth enabled, clients log in the same way as with the hosted server. Use the address of your own domain followed by /mcp in place of https://mcp.vultr.com/mcp. For more information, see Client Setup.
To verify any connection, ask the client What Vultr account am I connected as? The response shows the account that your Vultr API key belongs to.
The server reads its settings from environment variables. Set the following variables to change the behavior of the server:
VULTR_MCP_TRANSPORT: Sets the transport to stdio (default) or http.VULTR_API_KEY: Provides the credential for STDIO. The server ignores it over HTTP.VULTR_API_BASE_URL: Sets the Vultr API address. The default is https://api.vultr.com/v2.SERVER_HOST and SERVER_PORT: Set the HTTP bind address. The default is 0.0.0.0:8080.SSL_VERIFY: Controls whether the server verifies upstream TLS. The default is true.VULTR_MCP_EXCLUDED_CATEGORIES: Lists the categories to leave out. The default is the identity set. An empty value keeps everything.VULTR_MCP_CATEGORY_ENDPOINTS: Lists the endpoints to serve by name, such as compute,network. The default is all nine endpoints.VULTR_MCP_INTERFACE: Set to off to serve only the tools generated from the API specification. The default is on.VULTR_MCP_INTERFACE_DIR: Sets the directory of reviewed tool definitions. The default is interface/.VULTR_MCP_INTERFACE_MAX_PAGES: Sets the number of pages that one filtered search can scan. The default is 10.VULTR_MCP_OUTPUT_SCHEMAS: Controls whether the server advertises generated output schemas. The default is false.MCP_RESOURCE_URL: Sets the public URL of the server, which the server uses for OAuth and the allowed host list. The default is https://mcp.vultr.com.MCP_ALLOWED_HOSTS: Adds extra hosts to accept.MCP_ALLOWED_ORIGINS: Adds extra Origin values for the OAuth consent page.VULTR_OIDC_ENABLED: Turns on OAuth. The default is false.VULTR_OIDC_PROVIDER_ID, VULTR_OAUTH_CLIENT_ID, and VULTR_OAUTH_CLIENT_SECRET: Provide the credentials of the approved OAuth application.REDIS_HOST and REDIS_PORT: Set the shared OAuth state. Required when you run more than one replica.VULTR_MCP_AUDIT_DIR: Also writes audit records to files in this directory, for a log shipper.The server records each tool call so that you can see which identity ran which tool and whether it succeeded. Audit records capture the identity, tool, request ID, and outcome, and never include argument values or result contents.
The server writes each audit record as a JSON line. Over HTTP, the records go to standard output. Over STDIO, they go to standard error, because standard output carries the protocol messages. Set VULTR_MCP_AUDIT_DIR to also write the records to files in that directory, one file per event type, for a log shipper to read.
You have run your own copy of the Vultr MCP Server and connected a client to it. For the list of tools that your server provides, see Tools. For more information, visit the Vultr MCP Server repository.
0 Comments
Be the first to comment and share your perspective with the community.