Skip to main content

inferhive-mcp

MCP server for InferHive, the collaborative GPU lending and LLM inference platform by Impulsate. It lets an AI assistant (Claude Code, Claude Desktop or any MCP client) check your balance, list and rent GPUs, reserve them, stop instances, write your kubeconfig and call the OpenAI-compatible LLM gateway, all paid in processing coins (PC), the platform's credits.

It is built on the inferhive SDK and uses the same credentials. Requires Python 3.12+. The portal lives at https://inferhive.impulsate.lat.

Install and log in

pip install inferhive        # the SDK and CLI, used to log in
inferhive login --scope rent # approve in the browser; use --scope read to only look

inferhive login stores a platform key (pak_...) in ~/.config/pcoin/platform_key (mode 0600). The MCP server reads it from there; you do not need to install the server yourself if your client runs it with uvx.

Add it to your client

Claude Code:

claude mcp add inferhive -- uvx inferhive-mcp
# without a browser login: a pak_ key created in the portal (API keys)
claude mcp add inferhive -e INFERHIVE_API_KEY=pak_... -- uvx inferhive-mcp

Claude Desktop (claude_desktop_config.json):

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

inferhive-mcp speaks stdio. inferhive-mcp --http [--port N] serves streamable HTTP on 127.0.0.1 instead; it has no authentication of its own, so never expose it to a network.

Tools

Tool What it does
get_balance Available, locked and total PC
get_history(limit) Latest ledger movements
list_gpus Nodes with GPU model, VRAM, PC/hour rate and availability
list_offers(gpu, max_price, min_vram, tier) What you can rent right now (GPU nodes and the cpu pool)
list_reservations Your reservations
reserve_gpu(node, start_iso, hours, confirm) confirm=false (default) only shows the cost; confirm=true reserves and locks PC
cancel_reservation(id) Cancels before it starts; refunds everything
release_gpu(id) Releases a running reservation; refunds the unused hours
rent_instance(offer, template, hours, accept_community, image, model, confirm) confirm=false (default) is a preview; confirm=true rents and starts the instance
list_instances Your instances: state, node, template, time left, PC spent and URL
stop_instance(id) Stops an instance (its /scratch is lost); you pay only the time used
get_kubeconfig(path, overwrite) Writes your kubeconfig (0600, default ~/.kube/pcoin-config); never returns its content
llm_chat(prompt, model, max_tokens) Calls the LLM gateway; returns the text, token usage and PC cost
list_llm_keys Your LLM keys (prefix only)
create_llm_key(name, confirm) Creates an LLM key; needs a browser session (see below)
revoke_llm_key(id) Revokes an LLM key; needs a browser session (see below)

Credentials

Resolved like the SDK, in this order:

  1. Platform key pak_...: INFERHIVE_API_KEY, or ~/.config/pcoin/platform_key from inferhive login. Its scope is set at login: read only looks; rent can reserve, rent and spend PC. If it expired or was revoked, run inferhive login again.
  2. PCOIN_TOKEN: a Cloudflare Access session token (legacy browser session).
  3. PCOIN_API_KEY or ~/.config/pcoin/api_key: an LLM key pck_..., used only by llm_chat. Create it in the portal (LLM API) and save it with inferhive llm keys save.

No key can create or revoke keys: create_llm_key and revoke_llm_key only work with PCOIN_TOKEN. With a pak_ key, manage LLM keys in the portal instead. PCOIN_CONFIG_DIR changes the configuration folder.

Safety

  • Reserving, renting and creating keys require confirm=true: the assistant should show you the cost and ask before passing it. Without it, nothing is written.
  • cancel_reservation, release_gpu, stop_instance and revoke_llm_key are marked as destructive; configure your client to ask for approval on them.
  • rent_instance refuses community nodes unless accept_community=true: the owner of such a node is root on it and can see what runs there.
  • Secrets are never logged or returned, except the new key shown once by create_llm_key. Rental responses never include the app token (Jupyter, vLLM).
  • For automation, use a pak_ key with the smallest scope (read if it only looks) and an expiry, and revoke it from the portal when done.

Changes

  • 0.1.0: first release, with the 16 tools above.

License

MIT. See LICENSE.

Metadata

Release files for inferhive-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inferhive-mcp 0.1.0
File Size Uploaded Provenance Actions
inferhive_mcp-0.1.0.tar.gz 51.2 kB With provenance Details for inferhive_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inferhive-mcp 0.1.0
File Interpreter ABI Platform Actions
inferhive_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for inferhive_mcp-0.1.0-py3-none-any.whl

Total release size: 60.2 kB

Release files / inferhive_mcp-0.1.0.tar.gz

Download URL inferhive_mcp-0.1.0.tar.gz
Size 51.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fe82ecff5cf7bb90749588cf2c08371f3d1af07c44f279c4dbc2fffb85895637
BLAKE2b-256 checksum
How to use checksums
bc26a2217f704e7807487d007031c5e284b5d373cfa3a7f8ee3cdb612ab223db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Release files / inferhive_mcp-0.1.0-py3-none-any.whl

Download URL inferhive_mcp-0.1.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c90f001584df31ee2961026acb020a603dc137c7d448e89078029048bfe421b1
BLAKE2b-256 checksum
How to use checksums
8e9f2584e422edc69d06dd349e438779175e90784e5f5295381373d9ec54cfbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

Security for inferhive-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for inferhive_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page