Skip to content

BSP MCP Server

Connect any MCP-compatible AI (Claude, GPT, etc.) to BSP biological data with active consent enforcement.

Setup

Add to your Claude Desktop claude_desktop_config.json:

json
{
  "mcpServers": {
    "bsp": {
      "command": "npx",
      "args": ["-y", "bsp-mcp"],
      "env": {
        "BSP_BEO_DOMAIN": "yourname.bsp",
        "BSP_CONSENT_TOKEN_ID": "tok_...",
        "BSP_NETWORK": "mainnet"
      }
    }
  }
}

Then ask Claude: "What do my blood test results say about my cardiovascular health?"


Environment Variables

VariableRequiredDescription
BSP_BEO_DOMAINYesYour .bsp domain
BSP_CONSENT_TOKEN_IDFor data accessConsentToken with READ_RECORDS intent
BSP_NETWORKNomainnet (default), testnet, local
BSP_PRIVATE_KEYFor write opsEd25519 private key (hex)
BSP_REGISTRY_URLNoCustom registry API URL

Tools — Read (no private key needed)

bsp_list_categories

List all 25 BSP taxonomy categories. Public data.

bsp_resolve_biomarker

Look up a BSP biomarker code (e.g., BSP-GL-001). Public data.

Check current consent configuration — BEO, token, network.

bsp_get_biorecords

Read BioRecords from the user's BEO. Requires ConsentToken with READ_RECORDS intent.

ParameterTypeDescription
categoriesstring[]Filter by BSP categories
biomarkersstring[]Filter by biomarker codes
from / toISO8601Date range
limitnumberMax records (default 50)

bsp_get_beo_summary

Structured overview of the user's biological profile. Requires consent.


Tools — Write (requires BSP_PRIVATE_KEY)

bsp_lock_beo

Emergency lock — freezes the BEO immediately.

ParameterTypeRequired
beoIdstringYes

bsp_unlock_beo

Unlock a previously locked BEO.

bsp_destroy_beo

IRREVERSIBLE — Permanent erasure (LGPD/GDPR). Requires confirm: true.

ParameterTypeRequired
beoIdstringYes
confirmbooleanYes (must be true)

bsp_revoke_all_tokens

Emergency revoke ALL active ConsentTokens for a BEO.


Security

  • Read tools require a valid ConsentToken (configured via env)
  • Write tools require the BEO holder's private key
  • The MCP server signs payloads locally — keys never leave the process
  • Consent is verified on-chain by the AccessControl smart contract

CLI Reference · SDK Reference · API Reference