Nosana MCP Server
The Nosana API is available as an MCP (Model Context Protocol) server. Connect it to an AI assistant such as Codex, Claude, Cursor or VS Code and you can manage your deployments, check GPU markets and track your credits in plain language.
https://api.nosana.com/mcpWhat you can do
Once connected, you can ask things like:
- "List my Nosana deployments"
- "What GPU markets are available, and what do they cost per hour?"
- "Stop my Ollama deployment"
- "Scale my vLLM deployment to 3 replicas"
- "How many credits do I have left, and what did I spend this week?"
- "Show me the events for my last failed deployment"
The assistant picks the right tools, calls the Nosana API on your behalf, and summarises the result.
How it works
The MCP server is generated from the same OpenAPI document as the Nosana API. Each supported API endpoint is one tool. When endpoints are added to the API, they become tools automatically. Your client shows the current list of tools (for example, /mcp in Claude Code).
The server uses the Streamable HTTP transport. Your client sends JSON-RPC requests with POST /mcp. Server-to-client streaming is not supported, so endpoints that stream events are not available as tools.
Authentication
The MCP server uses OAuth. You don't need an API key.
- When your client first connects, the server responds with
401 Unauthorizedand points the client to its OAuth metadata at/.well-known/oauth-protected-resource. - Your client opens a browser window where you sign in with your Nosana account and approve access.
- The client stores the resulting access token and sends it with every request.
Every tool call runs as you, with your credit balance on Nosana Deploy, but only with the permissions you approved when you signed in. The consent screen lists them: reading your credits, reading and managing your jobs and deployments, and signing with your wallet. Permissions that are for API keys only, such as LLM inference and managing your API keys, aren't available through MCP. The MCP server never stores credentials of its own.
WARNING
Tools can create, start, stop and delete deployments, and running deployments spend your credits. Review what your assistant is about to do before you approve a tool call that changes your deployments, especially if your client auto-approves tool calls.
Connect your client
The Nosana MCP server works with any MCP client that supports remote (Streamable HTTP) servers with OAuth.
With the Codex CLI installed, add the server from your terminal:
codex mcp add nosana --url https://api.nosana.com/mcpSign in with your Nosana account and approve access when prompted. If sign-in doesn't start automatically, run:
codex mcp login nosanaRun codex mcp list to check that nosana is configured.
Alternatively, add the server to ~/.codex/config.toml (all projects) or .codex/config.toml (one trusted project), then run codex mcp login nosana:
[mcp_servers.nosana]
url = "https://api.nosana.com/mcp"See the Codex MCP documentation for more configuration options.
Check the connection
Ask your assistant:
List my Nosana deployments
If the assistant returns your deployments, you're connected. If you haven't created any yet, see My First Deployment.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
401 Unauthorized | The client isn't signed in, or its token has expired | Re-authenticate from your client's MCP settings (for example, /mcp in Claude Code) |
403 with INSUFFICIENT_SCOPE | The token doesn't include the permission this tool needs | Re-authenticate and approve the permissions on the consent screen |
503 with Retry-After | The server couldn't verify your token right now | Wait a few seconds and retry. You don't need to sign in again |
405 Method Not Allowed on GET /mcp | The client is trying to open a server-to-client event stream | This is expected. Clients fall back to POST. If yours doesn't, use mcp-remote |
| A tool is missing | Not every API endpoint is exposed as a tool | Call the API directly |