Enables mutual zero-knowledge proof authentication between humans and AI agents using TypeScript.
Also known as bolyra/bolyra, @bolyra/sdk
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- 598
- Latest version
- 0.5.2
- Last commit
- Nov 11, 2026
- License
- Apache-2.0
What is Bolyra MCP?
Bolyra enables mutual zero-knowledge proof authentication between humans and AI agents using TypeScript.
Summary generated from the project's README
About Bolyra MCP server
This TypeScript SDK provides developers with the tools to implement mutual zero-knowledge proof authentication between human users and AI agents. It allows for the creation of distinct identities and credentials, enabling a secure handshake process that can be verified locally or submitted to a blockchain via ethers.js. The system uses a handshake mechanism that generates proofs and nonces to confirm identity without exposing sensitive data.
Developers can manage granular access through a cumulative bit encoding permission system. This includes specific tiers such as READ_DATA, WRITE_DATA, and various financial limits ranging from small amounts under $100 to unlimited access. The library also exposes low-level cryptographic primitives like Poseidon hashes and BabyJubjub EdDSA functions for advanced use cases like building external verifiers or recomputing scope commitments. It is designed for integration into TypeScript environments via npm.
What you can do with it
- 1Perform mutual authenticationGenerate zero-knowledge proofs to facilitate a handshake between a human and an agent.
- 2Verify identity locallyCheck the validity of handshake proofs within a local environment to confirm a successful connection.
- 3Implement granular access controlAssign specific data access or financial transaction limits to an agent using bitmask encoding.
Written from the project's README. Every use case is checked against a quote from it.
How to install Bolyra MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Bolyra MCP in Claude Code
$ claude mcp add sdk -- npx -y @bolyra/sdkInstall Bolyra MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"sdk": {
"command": "npx",
"args": [
"-y",
"@bolyra/sdk"
]
}
}
}Install Bolyra MCP in VS Code
.vscode/mcp.json
{
"servers": {
"sdk": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@bolyra/sdk"
]
}
}
}Install Bolyra MCP in VS Code CLI
$ code --add-mcp '{"name":"sdk","type":"stdio","command":"npx","args":["-y","@bolyra/sdk"]}'Install Bolyra MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"sdk": {
"command": "npx",
"args": [
"-y",
"@bolyra/sdk"
]
}
}
}Install Bolyra MCP in Codex
$ codex mcp add sdk -- npx -y @bolyra/sdkInstall Bolyra MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.sdk] command = "npx" args = ["-y", "@bolyra/sdk"]
Install Bolyra MCP in Gemini CLI
$ gemini mcp add -s user sdk npx -- -y @bolyra/sdkInstall Bolyra MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"sdk": {
"command": "npx",
"args": [
"-y",
"@bolyra/sdk"
]
}
}
}Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablebolyra/bolyra is public and reachablegithub.com/bolyra/bolyra ↗Pass
- Package names this repository as its source@bolyra/sdk names bolyra/bolyra as sourcenpmjs.com/package/@bolyra/sdk ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for @bolyra/sdknpmjs.com/package/@bolyra/sdk/v/0.5.2#provenance ↗Pass
- Open source license (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-11github.com/bolyra/bolyra ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @bolyra/sdkPass
- No critical advisory in the package or its dependencies62 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHub@bolyra/sdk
TypeScript SDK for Bolyra — mutual ZKP authentication for humans and AI agents.
New here? Start with the 5-minute Quickstart — from
npm installto on-chain verification.
Install
npm install @bolyra/sdk
Quick Start
import {
createHumanIdentity,
createAgentCredential,
Permission,
proveHandshake,
verifyHandshake,
} from '@bolyra/sdk';
// 1. Create identities
const human = await createHumanIdentity(123456789n);
const agent = await createAgentCredential(
12345n,
operatorPrivateKey,
[Permission.READ_DATA, Permission.WRITE_DATA],
BigInt(Math.floor(Date.now() / 1000) + 86400),
);
// 2. Generate mutual handshake proofs (parallel, ~16s)
const { humanProof, agentProof, nonce } = await proveHandshake(human, agent);
// 3. Verify locally
const result = await verifyHandshake(humanProof, agentProof, nonce);
console.log('Verified:', result.verified); // true
console.log('Human nullifier:', result.humanNullifier);
console.log('Agent scope commitment:', result.scopeCommitment);
// 4. Submit to chain (via ethers.js)
// await registry.verifyHandshake(humanProof, agentProof, nonce);
Low-level primitives (v0.6.0+)
For advanced use — e.g. building an external verifier or recomputing credential/scope commitments — the SDK exports its Poseidon hashes and BabyJubjub EdDSA primitives:
import { poseidon5, eddsaSign, eddsaVerify, derivePublicKey } from '@bolyra/sdk';
const pub = await derivePublicKey(operatorPrivateKey); // { x, y }
const sig = await eddsaSign(operatorPrivateKey, message); // { R8: { x, y }, S }
const ok = await eddsaVerify(pub, message, sig); // boolean
const h = await poseidon5(a, b, c, d, e); // bigint
eddsaVerify returns false (never throws) on malformed input. See
@bolyra/cli's bolyra verify for a full external-verifier reference.
Permissions
Permissions use cumulative bit encoding — higher tiers imply lower ones:
| Bit | Permission | Notes |
|---|---|---|
| 0 | READ_DATA |
|
| 1 | WRITE_DATA |
|
| 2 | FINANCIAL_SMALL |
< $100 |
| 3 | FINANCIAL_MEDIUM |
< $10,000 (implies bit 2) |
| 4 | FINANCIAL_UNLIMITED |
Unlimited (implies 2+3) |
| 5 | SIGN_ON_BEHALF |
|
| 6 | SUB_DELEGATE |
|
| 7 | ACCESS_PII |
API Status
| Function | Status |
|---|---|
createHumanIdentity() |
v0.1 |
createAgentCredential() |
v0.1 |
permissionsToBitmask() |
v0.1 |
validateCumulativeBitEncoding() |
v0.1 |
proveHandshake() |
v0.2 |
verifyHandshake() |
v0.2 |
delegate() |
v0.3 |
verifyDelegation() |
v0.3 |
License
Apache-2.0 — see LICENSE.
Bolyra MCP questions
How do I add Bolyra MCP to Claude Code?
Run claude mcp add sdk -- npx -y @bolyra/sdk in your terminal. Add --scope user to make it available in every project.
How do I add Bolyra MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
How long does it take to generate mutual handshake proofs?
Generating mutual handshake proofs typically takes approximately 16 seconds when performed in parallel.
What happens if eddsaVerify receives malformed input?
The eddsaVerify function will return false instead of throwing an error when it encounters malformed input.
How are permissions structured in the SDK?
Permissions use a cumulative bit encoding system where higher tiers automatically imply the permissions of lower tiers.