Skip to main content

Local MCP stdio bridge for cnx — GPU rental negotiation agent (proxies to the live cnx /mcp HTTP endpoint, zero local business logic)

Project description

cnx-mcp

A real, installable local MCP stdio server for cnx, the GPU rental negotiation agent. It bridges any MCP-compatible host (Claude Desktop, Claude Code, etc.) to the live cnx backend over stdio, so you can add cnx to a host with one line instead of hand-rolling an HTTP bridge.

This package is a thin protocol bridge, not a reimplementation. On every tools/list and tools/call request it forwards straight through to the live cnx /mcp HTTP endpoint

https://ddlcl1en1j.execute-api.us-east-1.amazonaws.com/production/mcp

and reshapes the JSON-RPC response into the MCP types the SDK's stdio transport expects. There are no hardcoded tool schemas in this package - list_tools() always reflects whatever the live backend currently serves, so this bridge can never drift out of sync with the real tool set.

Install & run

Not yet published to PyPI. Once published, any of these will work:

# No install - run directly
uvx cnx-mcp

# Same idea, via pipx
pipx run cnx-mcp

# Install then run
pip install cnx-mcp
cnx-mcp

Until then, run it from a local checkout of this repo:

# From the repo root
pip install -e ./mcp-server
cnx-mcp

# or, without a persistent install, via uv:
uvx --from ./mcp-server cnx-mcp

Configuring an MCP host

Add cnx to your host's MCP server config. For Claude Desktop (claude_desktop_config.json), once cnx-mcp is published:

{
  "mcpServers": {
    "cnx": {
      "command": "uvx",
      "args": ["cnx-mcp"]
    }
  }
}

Or, if you installed it with pip install cnx-mcp:

{
  "mcpServers": {
    "cnx": {
      "command": "cnx-mcp"
    }
  }
}

Before publish, point a host at a local checkout instead:

{
  "mcpServers": {
    "cnx": {
      "command": "uvx",
      "args": ["--from", "/absolute/path/to/mcp-server", "cnx-mcp"]
    }
  }
}

Claude Code (.mcp.json or claude mcp add) uses the same command/args shape.

Pointing at a different backend

By default cnx-mcp talks to the live production endpoint. Override it with CNX_MCP_BASE_URL - useful for local development or a staging deployment without needing a new release of this package:

{
  "mcpServers": {
    "cnx": {
      "command": "uvx",
      "args": ["cnx-mcp"],
      "env": {
        "CNX_MCP_BASE_URL": "https://your-staging-endpoint.example.com/mcp"
      }
    }
  }
}

Or from the shell:

CNX_MCP_BASE_URL=http://localhost:3000/mcp cnx-mcp

Available tools

The tool list is discovered dynamically from the live backend on every tools/list call - this README is not the source of truth for it. As of this writing the backend serves 5 tools: rent_compute, negotiate_price, submit_payment, check_rental_status, report_unreachable. See the main repo's SKILLS.md for the current, authoritative description of each.

Development

cd mcp-server
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'
.venv/bin/pytest tests/ -v

Publishing

Publishing to PyPI (uv publish / twine upload) is a deliberate manual step, not automated by this package or its build tooling. Verify the PyPI name cnx-mcp is still available and the built package passes review before publishing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cnx_mcp-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cnx_mcp-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file cnx_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: cnx_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cnx_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bf2f9c00bff414d7547e691890e3daa8fe7163afa532f2f52421a393475c23b5
MD5 8c531ede1b030f58d1912948c8ed372a
BLAKE2b-256 b68dd35b2449220860ddd52bdd114ec689e5427180e56f6f8edd866256b9eab1

See more details on using hashes here.

File details

Details for the file cnx_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cnx_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for cnx_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d3773db492f84c85600e7f132f1cafef65420664b1d0131b8ef885334237895
MD5 284442fb7da933aef815665a600d3888
BLAKE2b-256 3f65a3a725de15c27d20b361b0ec7207f4050d0e1371a8f58da8dfbc085923fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page