Metadata-Version: 2.5
Name: nordbastion-mcp
Version: 0.2.0
Summary: MCP server for NordBastion — provision KYC-free, crypto-paid Nordic VPS & dedicated servers from any AI agent (Claude, Cursor, …).
Project-URL: Homepage, https://nordbastion.com
Project-URL: API reference, https://nordbastion.com/api/
Project-URL: Repository, https://github.com/CryptoServers/nordbastion-mcp
Project-URL: Issues, https://github.com/CryptoServers/nordbastion-mcp/issues
Author: NordBastion
License: MIT
License-File: LICENSE
Keywords: ai-agents,anonymous-hosting,bitcoin-vps,claude,crypto-vps,devops,hosting,kyc-free,mcp,model-context-protocol,monero-vps,no-kyc,nordbastion,vps
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Requires-Dist: httpx<1,>=0.28.1
Requires-Dist: jsonschema<5,>=4.20
Requires-Dist: mcp<3,>=2.2.0
Description-Content-Type: text/markdown

# NordBastion MCP 0.2.0

MCP tools for the NordBastion REST API. Python 3.10+, MIT license.

## Connect

The hosted endpoint at **https://nordbastion.com/mcp** requires no installation.
It supports protocol **2026-07-28**, plus 2025-11-25, 2025-06-18 and 2025-03-26.
Its standard discovery method is `server/discover`; the server-card is supplemental metadata.

For stdio, install the 0.2.0 release from the first-party download page:
https://nordbastion.com/agents/#downloads
Then run `nordbastion-mcp`, or configure your MCP host to launch that command.
This release uses `mcp>=2.2.0,<3`. The 0.1.0 release on PyPI/GitHub predates this update;
use the hosted endpoint or the versioned download until those registries are updated.

## Create a key without paying

1. Call `register_account` with an email and a strong password (or `login`).
2. Read `tokens.access_token` from the response.
3. Call `create_api_key` with `name`, `scope: "read"`, and `access_token` from step 2.
4. Save `plaintext` in a secret store. Call `get_balance` with it as `access_token`.
5. Revoke keys with `revoke_api_key` using a full-scope account credential.

No top-up, manual activation or dashboard is required. Keys are shown once and stored
as hashes. At most 10 active keys per account. A read-only key cannot create other keys.

Credentials are explicit per request. `NORDBASTION_API_KEY` is optional host configuration
for an existing `nb_live_*` key or `nb_at_*` access token. The server does not silently
switch the identity of later calls after signup/login. Public tools need no credential.
For 2FA, call `login` with email, password and `totp_code` in the same request.

`NORDBASTION_BASE_URL` optionally overrides https://nordbastion.com/v1 for testing.
Only configure an endpoint you control: it receives the credentials you supply.

## SSH keys and payments

Generate SSH key pairs locally with your normal SSH tools. Send only the `.pub` file
to `add_ssh_key`. The private key stays with the agent or its host.

Creating an API key or browsing the catalog is free. Invoice creation does not transfer
funds. Crypto top-ups use `amount_usd` and `crypto`; wait for confirmed balance before ordering.
The signed x402 top-up endpoint uses USDC on Base. Receipt strings cannot pay for server orders.
Use only the spending budget authorized by the account owner.

## Verification

Install development tools with `python -m pip install pytest pytest-asyncio` and run
`python -m pytest`. Tests cover credentials, error reporting and MCP 2026 discovery.
The hosted API has separate HTTP tests for signup, free key issuance, scopes and revocation.
