MCP Server
DeepNexus runs a remote Model Context Protocol server. Connect it to Claude Code, Cursor, Codex, OpenClaw or any MCP client and your agent can call every DeepNexus model as a tool, and check its own balance and spend.
| Item | Value |
|---|---|
| Endpoint | http://localhost:3000/mcp |
| Transport | Streamable HTTP (JSON responses) |
| Auth | Authorization: Bearer sk-dn-... — a normal API key |
| Billing | chat calls are billed like API requests; other tools are free |
Connect
Claude Code
claude mcp add --transport http deepnexus http://localhost:3000/mcp --header "Authorization: Bearer sk-dn-..."
Cursor
~/.cursor/mcp.json:
{
"mcpServers": {
"deepnexus": {
"url": "http://localhost:3000/mcp",
"headers": { "Authorization": "Bearer sk-dn-..." }
}
}
}
Codex
~/.codex/config.toml:
[mcp_servers.deepnexus]
url = "http://localhost:3000/mcp"
bearer_token_env_var = "DEEPNEXUS_API_KEY"
Clients without remote MCP support
Bridge it to stdio with mcp-remote:
{
"mcpServers": {
"deepnexus": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3000/mcp", "--header", "Authorization: Bearer ${DEEPNEXUS_API_KEY}"],
"env": { "DEEPNEXUS_API_KEY": "sk-dn-..." }
}
}
}
Tools
| Tool | Arguments | Returns |
|---|---|---|
chat | prompt (string), model (default auto), system, max_tokens, temperature | The model's reply, the model used, tokens and cost |
list_models | provider (optional filter) | Model IDs, providers, context windows and prices |
get_balance | — | Balance in USD and current plan |
get_usage | days (1 – 90, default 7) | Spend and tokens per model for the period |
Test with curl
curl http://localhost:3000/mcp \
-H "Authorization: Bearer $DEEPNEXUS_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_balance","arguments":{}}}'