@bsvkey/inference-mcp
The server lets agents buy metered Claude/Grok inference settled in BSV, mostly through a prepaid channel.
list_models: list available models with live satoshis-per-1,000-token prices; no key needed.infer: run a metered inference from your prepaid channel, returning the completion, satoshis charged, model used, and remaining balance.channel_balance: check a prepaid channel's remaining BSV balance, spend, and request count.open_channel: explains how to open and fund a prepaid channel and obtainchannelId:channelSecret.x402_infer(from README): pay per request in BSV with your own key instead of a prepaid channel.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@bsvkey/inference-mcpUse Claude to summarize this article and show the BSV cost."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@bsvkey/inference-mcp
An MCP server that lets any agent buy Claude & Grok inference metered per token,
settled in BSV, through the hosted gateway at inference.bsvkey.com. Zero
dependencies (Node ≥ 18, uses global fetch). It's a thin HTTP client — it never
holds your keys or runs models; every call is billed through the gateway.
Tools: list_models, infer, channel_balance, open_channel, x402_infer.
Two ways to pay: a prepaid channel (infer, fund once, draw down per token) or
per call via x402 (x402_infer — no channel; the agent pays each request in BSV
with its own key). x402_infer needs a funded WIF (wif arg or BSVKEY_WIF) and the
optional @bsvkey/x402-bsv-client + @bsv/sdk packages (installed with this one).
Quick start
Fund a channel once at https://inference.bsvkey.com (BRC-100 wallet, or load a key in-page). Copy the key it returns:
channelId:channelSecret.Add the MCP server to your agent host (below), with that key in
BSVKEY_API_KEY.Ask your agent to run inference — it calls
inferand pays per token.
list_models and open_channel work with no key; infer and channel_balance
need a funded channel key.
Related MCP server: x402-gateway-mcp
Install
Published on npm as @bsvkey/inference-mcp.
Claude Code
claude mcp add bsvkey-inference \
--env BSVKEY_API_KEY=channelId:channelSecret \
-- npx -y @bsvkey/inference-mcpClaude Desktop / Codex / any MCP host (JSON config)
{
"mcpServers": {
"bsvkey-inference": {
"command": "npx",
"args": ["-y", "@bsvkey/inference-mcp"],
"env": { "BSVKEY_API_KEY": "channelId:channelSecret" }
}
}
}No npm? Grab the single-file server directly (https://inference.bsvkey.com/mcp/server.js) and use "command": "node", "args": ["server.js"].
Configuration (env)
Var | Default | Meaning |
|
| Gateway base URL (set to a self-hosted deployment if you run your own). |
| — |
|
Verify it's wired (no key needed)
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_models","arguments":{}}}' \
| node server.jsMarketplace listing blurb
BSV Inference — Pay-per-token Claude & Grok, settled in BSV. Prepay a channel once, then meter every token with no subscription, account, or card. OpenAI- compatible, optional live web search, on-chain settlement. MCP + portable SKILL.md.
Publishing (operator)
Live on npm under the
@bsvkeyorg (owner:interence). First publish: v1.0.0.To ship an update: bump
versioninpackage.json, thennpm publish --access public(2FA/security-key prompt applies).Canonical source: https://github.com/BSVKey/inference-mcp
To list on a skills marketplace (e.g. bopen.ai), submit
SKILL.md+ this README.
Available Tools
4 toolschannel_balanceA
Check a prepaid channel’s remaining BSV balance, spend, and request count.
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | No | channelId:channelSecret. Omit to use BSVKEY_API_KEY. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must convey the operation's nature. 'Check' clearly implies a read-only query and the enumeration of balance, spend, and request count explains what state is being inspected. It does not fully detail error behavior or auth failure cases, but the core behavioral character is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single concise sentence with no filler. It front-loads the action and resource, then lists the key outputs. Every word contributes meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional param, no output schema, and no annotations, the description adequately defines what the tool does and what it reports. It would benefit from a brief note on when to use it relative to open_channel, but nothing critical is missing for direct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the single optional apiKey parameter is already documented in the schema with format 'channelId:channelSecret' and fallback to BSVKEY_API_KEY. The description adds no additional parameter meaning beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Check') with a clear resource ('a prepaid channel') and enumerates the exact data returned (remaining BSV balance, spend, and request count). This is easily distinguished from sibling tools like open_channel or infer.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this should be used when you need a channel's balance/usage stats, but it does not explicitly state when to use it versus alternatives, nor does it mention any exclusions or preconditions such as the channel needing to be already open.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
inferA
Run one metered inference (OpenAI-compatible), paid per token in BSV from your prepaid channel. Returns the completion plus a receipt: satoshis charged, model routed to, and remaining balance. Requires a funded channel key (apiKey or BSVKEY_API_KEY).
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model id or policy: auto|cheapest|best, claude-*, grok-*. | auto |
| apiKey | No | channelId:channelSecret for a funded channel. Omit to use BSVKEY_API_KEY. | |
| prompt | Yes | The user prompt. | |
| system | No | Optional system prompt. | |
| maxTokens | No | Max output tokens. | |
| webSearch | No | Let the model search the live web (adds a per-search fee). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure and does a solid job: it reveals that every call is metered and paid per token, that a funded channel key is required, and that the response includes both the completion and a receipt with charges, routed model, and remaining balance. It could add failure behavior for insufficient balance or invalid model, but the key traits are transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three dense sentences with no filler: the first sentence identifies the action, the second summarizes the return payload, and the third states the prerequisite. Everything essential is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a paid inference call with complete parameter schema, the description covers the payment model, auth requirement, and return envelope. Even without an output schema, an agent knows what to expect and what it needs to call the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all six parameters. The description adds useful context about auth via apiKey or BSVKEY_API_KEY and the receipt contents, but it does not need to compensate for schema gaps, hence the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a concrete action, 'Run one metered inference', with a clear resource ('OpenAI-compatible' completion) and payment mechanism (per token in BSV from prepaid channel). This clearly distinguishes it from siblings like list_models, channel_balance, and open_channel, which serve different functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly establishes the context: use this when you want to perform an inference that will consume prepaid BSV credits, and it names the prerequisite of a funded channel key. It does not explicitly name alternatives or when-not-to-use cases, but the sibling names make the decision boundary reasonably clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_modelsA
List the models this BSV inference gateway sells, with LIVE retail price (satoshis per 1,000 tokens) at the current BSV/USD rate. No key needed. Call first to choose a model.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does well: it discloses the live pricing behavior tied to the current BSV/USD rate, states the auth requirement explicitly ('No key needed'), and signals the proper call order. It does not describe the exact response shape, but for a simple catalog tool this is a minor gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, information-dense sentences. The main action is front-loaded, followed by the key pricing detail and a practical usage instruction. No filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with no output schema and no annotations, the description provides the essentials: what is listed, in what unit, with what freshness, auth requirements, and when to call it. An exact return format would be beneficial, but the description is otherwise complete enough to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so parameter ambiguity is not a concern. The description additionally notes that no API key is needed, which covers the only setup detail an agent might otherwise wonder about.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'List the models this BSV inference gateway sells.' It clearly identifies what the tool returns and adds a distinguishing detail (live retail price in satoshis per 1,000 tokens) that sets it apart from the sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The instruction 'Call first to choose a model' gives clear sequential context, and 'No key needed' removes a likely prerequisite concern. It does not explicitly name alternatives such as infer, but the intended role as a preliminary discovery step is clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
open_channelA
Explains how to open + fund a prepaid channel. Funding is a real BSV payment signed by a wallet, so it is done once at the website; you then paste the returned channel key here (or set BSVKEY_API_KEY).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It explains that the actual payment happens externally at the website and that the tool expects a channel key or environment variable, preventing the agent from assuming the tool initiates the payment. It does not cover errors or return behavior, but for an instructional tool this is a minor gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no filler: the first states the purpose, the second explains the workflow and prerequisite. Every sentence contributes useful information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter instructional tool, the description covers the essential prerequisite (wallet funding at the website), the input mechanism (channel key or BSVKEY_API_KEY), and the tool's scope. It does not discuss follow-up actions like checking balance, but that is outside this tool's stated job.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so there is little to explain; the description still adds the relevant configuration detail about setting BSVKEY_API_KEY or pasting the returned channel key. This gives the agent practical context beyond the empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the exact function: it explains how to open and fund a prepaid channel. The verb 'explains' plus the resource 'prepaid channel' makes the purpose concrete, and the open/fund scope clearly separates it from the sibling channel_balance tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides a clear workflow: funding is a real wallet-signed BSV payment done at the website first, then the returned key is pasted or supplied via BSVKEY_API_KEY. It does not name alternatives or exclusions, but the usage context is explicit enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.1- First observed
channel_balance - First observed
infer - First observed
list_models - First observed
open_channel
TDQS
Each tool has a clearly distinct purpose: listing models, running inference, checking balance, and explaining channel setup. There is no meaningful overlap or ambiguity between them.
list_models and open_channel follow a verb_noun pattern, but infer is a bare verb and channel_balance is a noun phrase without an action verb. The names are readable and predictable in context, but the conventions are mixed.
Four tools is well-scoped for a paid inference gateway: discovery, usage, balance checking, and onboarding. Each tool serves a distinct and necessary step in the core workflow.
The core loop of choosing a model, running inference, checking balance, and funding/opening a channel is covered. Minor gaps like detailed transaction history or channel closure are absent, but agents can accomplish the primary purpose without dead ends.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Prepaid inference for agents over hosted MCP. Chat, image, and video.
Procure governed AI capabilities: machine-readable price, scope, trust, gateway-delegation terms.
Pay-per-call x402 gateway: agent tools, OpenAI-compatible LLM, market data, RPC, security audits.
Pay-per-action access to APIs and MCP tools over Lightning L402 and Base USDC x402.
Related MCP Servers
- AlicenseAqualityBmaintenanceDescription: Pay-per-request access to Claude and GPT models via Bitcoin Lightning using prepaid spend tokens. No accounts, no API keys — just sats.5212MIT
- AlicenseAqualityFmaintenanceEnables MCP clients to access all endpoints of an x402 gateway by paying real-time microtransactions (USDC on Base) per API call, with automatic tool discovery and spend guardrails.23248MIT
- AlicenseNot gradedqualityCmaintenanceEnables pay-per-call access control for AI agents using HTTP 402 and on-chain settlement, allowing microtransactions for API usage.MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to discover, pay for, and retrieve receipts for external APIs via USDC micropayments through the SynapseNetwork Gateway, supporting stdio and Remote MCP.50MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BSVKey/inference-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server