Skip to main content

matrix-compute-mcp: Official MCP Server & High-Level Verifiable AI Primitives

PyPI version Open In Colab

matrix-compute-mcp is an official Model Context Protocol (MCP) server and high-level AI primitives package built on top of matrix-compute-sdk that provides:

  1. High-Level Verifiable AI Primitives (matrix_compute_mcp.ai): Drop-in PyTorch layers (DistributedLinear, DistributedLoRALinear), massive exact cosine similarity search (distributed_cosine_similarity), and distributed spectral PCA/SVD (distributed_pca_svd) — all verified in $O(n^2)$ via Freivalds' algorithm.
  2. Official Model Context Protocol Server (matrix-compute-mcp): Exposes decentralized GPU TFLOPS to autonomous AI agents (Claude Desktop, Cursor, Windsurf, Antigravity, LangChain, OpenClaw) over stdio (uvx matrix-compute-mcp) or remote Streamable HTTP (https://mcp.matrix-compute.net/mcp) with L402 Macaroon, NWC (nostr+walletconnect://), or zero-drain trial sandbox support.

Quick Start

1A. Local stdio MCP Client Configuration (Claude Desktop / Cursor / Antigravity)

{
  "mcpServers": {
    "matrix-compute": {
      "command": "uvx",
      "args": ["matrix-compute-mcp"],
      "env": {
        "MATRIX_NOSTR_RELAYS": "wss://relay.matrix-compute.net",
        "MATRIX_SETTLEMENT_API_URL": "https://settlement.matrix-compute.net"
      }
    }
  }
}

1B. Hosted Remote MCP Endpoint (Zero Install)

Point any Streamable HTTP MCP client directly to:

https://mcp.matrix-compute.net/mcp

2. Exposed MCP Tools

Tool Name Description
get_network_status Queries the discovery relay for live GPU worker count, total VRAM, TEE enclaves, and sats_per_gflop pricing.
estimate_job_cost Computes exact upload/download bandwidth (MB), task count, GFLOPs, and satoshi cost estimates via BandwidthProfiler.
execute_distributed_matmul Executes verified distributed matrix multiplication $C = A \times B$ from .npy, .npz, .safetensors, or inline tensors.
batch_similarity_search Runs massive exact $K$-NN cosine similarity search using OUTPUT_GRID_2D zero-reduction tiling.
compute_pca_svd Runs verified top-$k$ randomized SVD or stateful remote-VRAM power-iteration PCA/SVD.

3. High-Level Verifiable AI Primitives (matrix_compute_mcp.ai)

import numpy as np
from matrix_compute_mcp.ai import (
    DistributedLinear,
    DistributedLoRALinear,
    distributed_cosine_similarity,
    distributed_pca_svd,
)

# 1. Exact K-NN Cosine Similarity with OUTPUT_GRID_2D zero download redundancy
scores, indices = distributed_cosine_similarity(queries, corpus_embeddings, top_k=10)

# 2. Drop-in PyTorch Linear & LoRA Linear layers with verified forward & backward passes
layer = DistributedLinear(in_features=4096, out_features=4096)
lora_layer = DistributedLoRALinear(in_features=4096, out_features=4096, r=16, lora_alpha=32.0)

# 3. Distributed Randomized SVD / Stateful Power-Iteration PCA
U, S, Vt = distributed_pca_svd(embeddings, k=32, method="randomized")

Metadata

Release files for matrix-compute-mcp 0.1.2

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

Source distribution (sdist)

Source distribution for matrix-compute-mcp 0.1.2
File Size Uploaded Provenance Actions
matrix_compute_mcp-0.1.2.tar.gz 34.7 kB Without provenance Details for matrix_compute_mcp-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for matrix-compute-mcp 0.1.2
File Interpreter ABI Platform Actions
matrix_compute_mcp-0.1.2-py3-none-any.whl Python 3 none any Details for matrix_compute_mcp-0.1.2-py3-none-any.whl

Total release size: 71.3 kB

Release files / matrix_compute_mcp-0.1.2.tar.gz

Download URL matrix_compute_mcp-0.1.2.tar.gz
Size 34.7 kB
Tags Source
SHA-256 checksum
How to use checksums
dd6d293fac539234f9857e62c7ecd1069d117f80a6dcecc454b2c0a295909d0a
BLAKE2b-256 checksum
How to use checksums
23ef3ce886b2cb76affe673184214c24b5dafbd22f5570c0871ad8cea0581d08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Release files / matrix_compute_mcp-0.1.2-py3-none-any.whl

Download URL matrix_compute_mcp-0.1.2-py3-none-any.whl
Size 36.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d83231a8f15e2006f0970bf0494d43b8df7c1af938e99e3f66126299e12d345
BLAKE2b-256 checksum
How to use checksums
7e37d083d4108f0b5287ee967c0375c739b92da35be1f64998134965ce4ceae6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.10

Security for matrix-compute-mcp 0.1.2

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