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.
inferhive-mcp --version and --help print and exit without starting the server.
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) |
Ends a running reservation early (not an instance: use stop_instance); 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, always inside ~/.kube/); never returns its content. Needs the rent scope |
llm_chat(prompt, model, max_tokens) |
Calls the LLM gateway; returns the text, token usage and PC cost. Needs an LLM key pck_ (see below) |
list_llm_keys |
Your LLM keys (prefix only) |
list_gpus shows nodes you can reserve for a time slot (reserve_gpu); list_offers shows
what you can rent right now (rent_instance). Reservations and instances are different
things: cancel_reservation / release_gpu act on reservations, stop_instance on instances.
The portal caps both reservations and rentals at 4 hours.
Credentials
Resolved like the SDK, in this order:
- Platform key
pak_...:INFERHIVE_API_KEY, or~/.config/pcoin/platform_keyfrominferhive login. Its scope is set at login:readonly looks;rentcan reserve, rent and spend PC. The key saved byinferhive loginalready has therentscope; one created with--scope readmakes every write tool fail with 403, and alsoget_kubeconfig: the portal requiresrentfor it even though it is a GET, because it hands out a credential. If the key expired or was revoked, runinferhive loginagain. PCOIN_TOKEN: a Cloudflare Access session token (legacy browser session).PCOIN_API_KEYor~/.config/pcoin/api_key: an LLM keypck_..., used only byllm_chat. It is a different key from the platform key, andinferhive logindoes not create it. Before the firstllm_chat: create it in the portal (https://inferhive.impulsate.lat/llm, LLM API) and save it withinferhive llm keys save. Without it the tool fails and tells you exactly that.
Create and revoke LLM keys in the portal (LLM API): no platform key can manage keys, so the
server only lists them.
PCOIN_CONFIG_DIR changes the configuration folder.
Safety
- Reserving and renting require
confirm=true: the assistant should show you the cost and ask before passing it. Without it, nothing is written. cancel_reservation,release_gpuandstop_instanceare marked as destructive; configure your client to ask for approval on them.rent_instancerefuses community nodes unlessaccept_community=true: the owner of such a node is root on it and can see what runs there.- Secrets are never logged or returned. Rental responses never include the app token (Jupyter, vLLM).
get_kubeconfigonly writes inside~/.kube/(even withoverwrite=true); any other path is refused before contacting the portal.- On HTTP 429 the server waits at most 10 s inside a tool call; longer
Retry-Aftervalues are returned to the assistant ("El portal pide esperar N s") instead of blocking for minutes. - For automation, use a
pak_key with the smallest scope (readif it only looks) and an expiry, and revoke it from the portal when done.
Changes
- 0.2.1: the server identifies itself as
inferhivewith its package version;--versionand--help;get_kubeconfigonly writes inside~/.kube/and explains therentscope on 403;llm_chatdocuments thepck_key and says how to get one when it is missing; 429 responses report the portal'sRetry-Afterinstead of sleeping for minutes;reserve_gpucapshoursat 4 like the portal; clearer descriptions forlist_gpus/list_offers/release_gpu. - 0.2.0: removes
create_llm_keyandrevoke_llm_key, which a platform key can never use; manage LLM keys in the portal. 14 tools. - 0.1.0: first release, with 16 tools.
License
MIT. See LICENSE.
Metadata
Release files for inferhive-mcp 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| inferhive_mcp-0.2.1.tar.gz | 54.7 kB | With provenance | Details for inferhive_mcp-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| inferhive_mcp-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for inferhive_mcp-0.2.1-py3-none-any.whl |
Total release size: 65.8 kB
Release files / inferhive_mcp-0.2.1.tar.gz
| Download URL | inferhive_mcp-0.2.1.tar.gz |
|---|---|
| Size | 54.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c43356bd5ae4483ac2598a54e16fc0632094ab8f5aa8a6082a210a4794de505a
|
|
BLAKE2b-256 checksum How to use checksums |
0d7d7f48da9f857b7b233120f50664ae8b02f8ddb09aa2b9772a0b41f8c0c6fe
|
| 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 logRelease files / inferhive_mcp-0.2.1-py3-none-any.whl
| Download URL | inferhive_mcp-0.2.1-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5f1710f5a32debce02666d7ee54e469efb05e6ad1f58e6eee0049d5a0b5c6a2
|
|
BLAKE2b-256 checksum How to use checksums |
47df30207f5259169845f0e74dc748b300b074659a77f1d37bf52885d55187a3
|
| 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 logSecurity for inferhive-mcp 0.2.1
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.
Attestation for inferhive_mcp-0.2.1.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 logA 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.