Skip to main content

Fayda MCP Python Library (fayda-mcp)

PyPI version License

An importable, headless Python library providing Model Context Protocol (MCP) tools and verification services for Ethiopian National ID (Fayda eSignet).

Key Capabilities

  • Explicit FastMCP Tools: start_verification, get_verification_status, get_verification_result, cancel_verification.
  • Zero Raw Demographic / Biometric Leaks: Outputs minimal boolean predicates (identity_verified, age_over_18), strictly forbidding citizen biometrics, OTPs, or demographic dumps from entering LLM contexts.
  • Cryptographic Security: OIDC PKCE S256, RFC 7523 private_key_jwt client assertions, and strict JWT signature/nonce validation.
  • Pluggable Architecture: Zero mandatory database or web framework runtime dependencies in core; optional extras for FastAPI, Redis, and Neon/PostgreSQL.
  • Multi-Tenant Caller Isolation: Built-in tenant and principal boundaries ensuring Caller A cannot access Caller B verification records.

Installation

# Core library (headless FastMCP + Fayda OIDC verification engine)
pip install fayda-mcp

# With optional FastAPI integration
pip install "fayda-mcp[fastapi]"

# Full bundle with Redis and Neon/Postgres adapters
pip install "fayda-mcp[fastapi,redis,postgres]"

Quick Start (Sandbox)

from fayda_mcp import FaydaConfig, FaydaVerificationService
from fayda_mcp.storage.memory import MemorySessionStore, MemoryResultRepository
from fayda_mcp.mcp.factory import create_mcp_server

# 1. Configure with official Fayda sandbox preset
config = FaydaConfig.sandbox(
    client_id="your_registered_client_id",
    redirect_uri="http://localhost:8000/auth/fayda/callback",
)

# 2. Initialize verification service
service = FaydaVerificationService(
    config=config,
    sessions=MemorySessionStore(),
    results=MemoryResultRepository(),
)

# 3. Create FastMCP server
server = create_mcp_server(service=service)

# 4. Run over stdio (e.g. for Claude Desktop or Cursor)
server.run(transport="stdio")

Running the Complete Sandbox Flow

Run the included standalone sandbox walkthrough:

python examples/sandbox_flow.py

This runs the entire end-to-end lifecycle (starts verification -> builds authorization link -> simulates citizen callback -> queries status -> retrieves privacy-preserving boolean result -> verifies caller isolation) without editing library internals.


Examples


Documentation


License

MIT License. See LICENSE for details.

Metadata

Release files for fayda-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fayda-mcp 0.1.1
File Size Uploaded Provenance Actions
fayda_mcp-0.1.1.tar.gz 150.0 kB Without provenance Details for fayda_mcp-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fayda-mcp 0.1.1
File Interpreter ABI Platform Actions
fayda_mcp-0.1.1-py3-none-any.whl Python 3 none any Details for fayda_mcp-0.1.1-py3-none-any.whl

Total release size: 234.3 kB

Release files / fayda_mcp-0.1.1.tar.gz

Download URL fayda_mcp-0.1.1.tar.gz
Size 150.0 kB
Tags Source
SHA-256 checksum
How to use checksums
96e5f96270c36575bd80a855dcb91760ba107bf1adb31c37a2773929e2c782a2
BLAKE2b-256 checksum
How to use checksums
75287a29a220e35331be118a13bd216107748f2c13905c996d46d33f869a258a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / fayda_mcp-0.1.1-py3-none-any.whl

Download URL fayda_mcp-0.1.1-py3-none-any.whl
Size 84.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30fb2c8e0d3cc2acc066424d53030e91a8105e7b96daf519403b41fee1546d80
BLAKE2b-256 checksum
How to use checksums
efb7d0be11e169b30753bccdd046cc5bb36c0a0471eac648d42830f4be6d3adf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for fayda-mcp 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page