Skip to main content
Glama

Self Protocol MCP Server

MCP server that provides AI assistants with comprehensive knowledge of the Self Protocol ecosystem — identity verification SDK, smart contracts, ZK circuits, and integration guidance.

What This Does

When connected to an AI assistant (Claude, Cursor, Windsurf, etc.), this MCP server gives it deep context about Self Protocol so it can help developers:

  • Integrate the Self SDK into React Native, web, and Kotlin apps

  • Build custom on-chain verifier contracts using SelfVerificationRoot

  • Set up server-side proof verification with @selfxyz/core

  • Understand the contract architecture, supported documents, and ZK circuits

  • Query on-chain registry state

Related MCP server: ~Alter

Installation

Claude Code / Cursor / Windsurf

Add to your .mcp.json:

{
  "self-protocol": {
    "command": "npx",
    "args": ["@selfxyz/self-mcp"]
  }
}

Manual

npm install -g @selfxyz/self-mcp
self-mcp

Resources

URI

Description

self://overview

Protocol architecture, verification flow, key components

self://contracts

Deployed contract addresses (mainnet + testnet), interface signatures

self://contracts/verifier-guide

How to build custom verifiers with SelfVerificationRoot

self://sdk/core

@selfxyz/core — server-side proof verification API

self://sdk/react-native

@selfxyz/rn-sdk — React Native integration

self://sdk/mobile-alpha

@selfxyz/mobile-sdk-alpha — cross-platform SDK core

self://sdk/webview-bridge

@selfxyz/webview-bridge — bridge protocol (10 domains)

self://sdk/kmp

@selfxyz/kmp-sdk — Kotlin Multiplatform SDK

self://sdk/common

@selfxyz/common — shared utilities, types, SelfAppBuilder

self://documents

Supported document types, countries, disclosure attributes

self://circuits

ZK circuit types, signature algorithms, proof structure

self://cross-reference

When to use the Self Agent ID MCP vs this one; Agent ID quick reference

Tools

Tool

Description

self_get_contract_addresses

Get deployed contract addresses for mainnet or testnet

self_check_verification

Check if a merkle root is valid in an identity registry

self_get_registry_info

Query registry state (merkle root, OFAC roots)

Prompts

Prompt

Description

self_integrate_sdk

Step-by-step SDK integration guide (React Native, web, Kotlin, server)

self_deploy_verifier

Guide to building and deploying a custom verifier contract

self_verify_proof_backend

Server-side proof verification setup (Express, Hono, Next.js)

Environment Variables

Variable

Default

Description

SELF_NETWORK

mainnet

Network: mainnet or testnet

SELF_RPC_URL

(per network)

Custom Celo RPC URL

  • Self Agent ID MCP: MCP server for AI agent identity (ERC-8004 proof-of-human registration, signed requests, verification). Hosted at https://agent-api.self.xyz/api/mcp, or run the npm stdio package @selfxyz/mcp-server

  • Self Protocol — Identity verification using passport NFC + zero-knowledge proofs

  • Self on Celo — IdentityVerificationHub on mainnet

License

MIT

Available Tools

15 tools
check_self_statusCheck Self protocol network status and contractsB
Read-only

Check Self protocol deployment status and contract addresses

Inputs: network. Returns: result

debug_verification_errorDebug Self verification errors with solutionsB
Read-only

Diagnose Self verification errors and provide solutions.

Args: error_message: The error message you're encountering context: Optional hint about the error type

Returns: Detailed explanation of the problem and how to fix it

Inputs: error_message (required), context. Returns: result

explain_sdk_setupExplain Self SDK setup requirements (IConfigStorage, UserIdType, etc.)B
Read-only

Explain Self SDK backend setup requirements and configuration.

Args: topic: What to explain - 'config-storage', 'user-id-type', 'attestation-ids', or 'full-setup' ctx: FastMCP context for logging

Returns: Detailed explanation with code examples

Inputs: topic (required). Returns: result

explain_self_integrationUse this first to understand Self protocol integrationA
Read-only

Explain how to integrate Self for a specific use case with step-by-step guidance.

Args: use_case: The integration scenario - 'airdrop', 'age-verification', or 'humanity-check'

Returns: Detailed explanation with steps and code examples

Inputs: use_case (required). Returns: result

fetch_self_docsFetch latest Self protocol documentation from GitHubA
Read-only

Fetch latest Self protocol documentation from GitHub.

This tool retrieves up-to-date documentation directly from the Self protocol documentation repository, ensuring you always have the latest information.

Available topics:

  • quickstart: Getting started guide

  • backend-sdk: Backend SDK reference

  • frontend-sdk: Frontend QR code SDK reference

  • contracts: Smart contract integration

  • configuration: Verification configuration guide

  • testing: Mock passport testing

  • troubleshooting: Common issues and solutions

Inputs: topic (required), section. Returns: result

generate_config_idGenerate a configuration ID for Self protocol verificationB
Read-only

Generate a configuration ID for Self protocol verification.

This replicates the generateConfigId function from the smart contract.

Inputs: minimum_age, excluded_countries, ofac_enabled, network. Returns: object

generate_eu_id_verificationGenerate EU ID card verification code (V2 feature)B
Read-only

Generate code for EU ID card verification (Self V2 feature).

Args: component: Which part to generate - 'frontend', 'backend', or 'smart-contract' language: Programming language - 'typescript', 'javascript', or 'solidity' ctx: FastMCP context for logging

Returns: Complete code example for EU ID card verification

Inputs: component (required), language. Returns: result

generate_scope_hashGenerate scope hash for Self verification (like tools.self.xyz)A
Read-only

Generate a scope hash for Self verification, replicating hashEndpointWithScope.

Args: address_or_url: Either an Ethereum address (0x...) or HTTPS URL scope_seed: Scope identifier (max 20 chars, lowercase ASCII only)

Returns: Dictionary with scope_hash, validation status, and input type

Inputs: address_or_url (required), scope_seed (required). Returns: object

generate_verification_codeGenerate ready-to-use code after understanding the integrationB
Read-only

Generate ready-to-use Self verification code for different components.

Args: component: Which part to generate - 'frontend-qr', 'backend-verify', or 'smart-contract' language: Programming language - 'typescript', 'javascript', or 'solidity'

Returns: Complete, working code example with comments

Inputs: component (required), language. Returns: result

generate_verification_configGenerate complete verification configurationC
Read-only

Generate a complete verification configuration based on requirements

Inputs: requirements (required). Returns: result

guide_to_toolsGuide users to appropriate tools.self.xyz featuresB
Read-only

Guide users to appropriate tools.self.xyz features for write operations.

Inputs: action (required), parameters. Returns: result

list_country_codesList available country codes for Self protocol exclusionsA
Read-only

List available country codes for exclusion in Self protocol.

Returns ISO 3166-1 alpha-3 country codes with their names.

Inputs: search. Returns: result

list_docs_topicsList all available documentation topicsA
Read-only

List all available documentation topics and their descriptions.

This tool shows you all the documentation topics you can fetch with the fetch_self_docs tool.

Inputs: no named parameters. Returns: result

read_hub_configRead configuration from Self protocol Hub contractA
Read-only

Read configuration from Self protocol Hub contract with full decoding.

Inputs: config_id (required), network. Returns: object

search_docsSearch through Self protocol documentationB
Read-only

Search through Self protocol documentation for specific terms.

This tool searches across all documentation files to find relevant information about your query.

Inputs: query (required), max_results. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 15 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is some potential overlap between 'explain_sdk_setup' and 'explain_self_integration' as both provide explanatory guidance, and 'generate_verification_code' and 'generate_eu_id_verification' both generate code examples. However, their specific scopes (general vs. EU ID) and the clear descriptions help differentiate them effectively.

    Naming Consistency4/5

    The naming is mostly consistent with a verb_noun pattern (e.g., 'check_self_status', 'fetch_self_docs', 'generate_scope_hash'), but there are minor deviations like 'guide_to_tools' (noun_verb) and 'read_hub_config' (verb_noun_noun). These inconsistencies are slight and do not significantly hinder readability or predictability.

    Tool Count5/5

    With 15 tools, the count is well-scoped for a server focused on Self protocol integration, documentation, and code generation. Each tool appears to serve a specific, non-redundant purpose within this domain, making the set comprehensive without being overwhelming.

    Completeness4/5

    The toolset covers key aspects of Self protocol integration, including status checks, documentation access, configuration generation, and code examples. Minor gaps exist, such as the lack of tools for direct write operations (e.g., deploying contracts or updating configurations), but the 'guide_to_tools' tool helps redirect users appropriately, mitigating this issue.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Identity infrastructure for the agent economy. Mint an agent ~handle in two free calls with no human account, then verify anyone and read inferred traits under the consent the person set in advance.
      16
      20 npm
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to perform Web3 development operations such as toolchain diagnostics, chain registry queries and live probing, address validation, secret scanning, deployment logging, and standards searches across multiple blockchains.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI coding agents to integrate stablecoin checkout, payment links, payment status checks, webhook verification, and webhook-based access logic into applications.
      MIT