# solana-x402-compliance [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/msantagiulianab/solana-enterprise-payment-gateway  
**GitHub Stars:** 0  
**npm Downloads (last month):** 560  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/solana-x402-compliance

## Description
RFC 9110 x402 Solana compliance screening and micropayments gateway for AI agents.

## Tools
Capabilities this server exposes over MCP:

- **screen_solana_address** — Screen a Solana wallet address in real time against sanctions and threat intelligence
databases. This is the live, network-bound compliance check: it automatically negotiates
and settles an x402 micro-payment, then returns the gateway's screening verdict, risk
score, and any matching flags.

Use this when you need an authoritative, up-to-date screening decision for an address
before transacting with it. For a deterministic, offline audit record instead, use
generate_compliance_report; to validate a payment itself, use verify_x402_payment.

Returns a JSON object: { address, verdict ('CLEAR_TO_TRANSACT' | 'BLOCKED'), riskScore
(0-100), flags[], sanctionsMatch (boolean), lastEvaluated, evaluationTimestamp }.
On gateway or payment failure it returns isError with the underlying message.
- **get_channel_status** — Retrieve the current operational status, limits, and settlement state of an x402 payment
channel, identified by its channel_id.

Use this as the first step of the channel lifecycle before screening an address or verifying
a payment: confirm the channel is ACTIVE and has capacity so a downstream x402 micro-payment
can settle.

Returns a JSON object: { channelId, status ('ACTIVE'), currency ('USDC'), network
('solana-devnet'), capacity ('10000.00'), lastSettlementBlock }. A blank or malformed
channel_id is rejected with a validation error.
- **generate_compliance_report** — Generate an immutable audit summary report for a Solana wallet address or transaction
signature, checked against sanctions and threat intelligence logs.

Unlike screen_solana_address (a live, paid network screening), this tool is deterministic
and side-effect-free: it performs no network call, settles no payment, and returns a stable
audit record with a reproducible reportId. It references the current session's in-memory
screening ledger: if the identifier has not been live-screened this session, it returns
complianceStatus 'UNSCREENED' with a null riskScore and an empty checkedLists array.

Returns a JSON audit payload: { identifier, complianceStatus ('PASSED' | 'FLAGGED' |
'UNSCREENED'), riskScore (number or null), flags (string[]), sanctionsMatch (boolean),
checkedLists ([] when unscreened, otherwise ['OFAC','EU_SANCTIONS','CHAIN_REPUTATION']),
lastEvaluated, evaluationTimestamp, timestamp (ISO-8601), reportId
('rpt_' + 32 hex chars, SHA-256 derived) }. A blank or malformed identifier is rejected
with a validation error.
- **verify_x402_payment** — Verify cryptographic validity and on-chain settlement state of an x402 payment proof or
transaction signature.

Use this to confirm that a payment proof is well-formed and whether it has been settled
against a channel. Prefer screen_solana_address for sanctions/threat screening of an
address; use this tool for payment proof validation.

Returns a JSON object: { status ('valid' | 'settled' | 'invalid'), payerPublicKey (Base58),
amountAtomicUnits (number), amount ('0.005000'), currency ('USDC'), timestamp (ISO-8601) }.
status semantics: 'valid' = proof well-formed but not yet settled (no channelId);
'settled' = proof valid and settled on the supplied channelId; 'invalid' = proof is not a
valid Base58 Solana address or transaction signature.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "solana-x402-compliance": {
    "command": "npx",
    "args": ["-y","@msantagiulianab/x402-mcp-server"],
    "env": {
      "X402_GATEWAY_URL": "",
      "X402_CHANNEL_ID": ""
    }
  }
}
```

**Requires environment variables:** `X402_GATEWAY_URL`, `X402_CHANNEL_ID` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What solana-x402-compliance does

The solana-x402-compliance MCP server exposes Solana compliance screening and x402 payment handling to MCP-compatible AI agents. It connects to a configured gateway URL and channel ID, allowing agents to submit addresses for screening and negotiate payment for gateway calls.

The documented screening outcomes are deterministic categories: a clear counterparty receives risk score `0` and the `CLEAR_TO_TRANSACT` verdict, while a malicious or sanctioned counterparty receives risk score `100` and the `BLOCKED` verdict. Blocking flags can include `OFAC_SANCTIONED` or `EXPLOIT_DRAINER`.

## How it works

The MCP implementation is written in TypeScript and distributed as `@msantagiulianab/x402-mcp-server`. It runs over standard input and output when launched with `npx -y @msantagiulianab/x402-mcp-server`.

For payment-gated requests, the gateway uses the x402 protocol and RFC 9110 `402 Payment Required` semantics. An unauthenticated request receives a payment challenge; a retry can include an Ed25519-signed payment voucher. The gateway verifies vouchers in memory and returns a payment response after successful handling. Settlement is negotiated through the configured channel rather than requiring a direct blockchain transaction for every request.

The underlying gateway records verification activity in an append-only PostgreSQL audit ledger and settles cumulative channel balances in batched on-chain transactions. The request path does not make a synchronous Solana RPC call, according to the project documentation.

## Setup and configuration

Run the published package with Node.js and `npx`:

```bash
npx -y @msantagiulianab/x402-mcp-server
```

Two environment variables are required by the documented configuration:

- `X402_GATEWAY_URL`: the root URL of the x402 gateway.
- `X402_CHANNEL_ID`: the payment channel identifier used for requests.

The README includes configurations for Claude Desktop on macOS, Linux, and Windows, as well as VS Code with Cline. Each configuration starts the package with `npx` and passes both variables in the server environment.

## Tools and capabilities

The solana-x402-compliance MCP server provides:

- `screen_solana_address` for verified Solana counterparty screening.
- Risk scores and verdicts for clear, sanctioned, or drainer-related addresses.
- x402 challenge-and-response payment handling through the configured gateway.
- Ed25519 voucher signing and payment negotiation without a Web3 SDK.
- Support for cumulative payment channels and batched settlement in the gateway implementation.

## Limitations and notes

Screening results are limited to the outcomes and flags specified in the project material; other risk categories should not be assumed.

The package is an MCP client-facing component for the gateway, while the broader repository contains the Java 21 and Spring Boot gateway implementation. Its documented runtime path uses the published npm package, not a Node.js sidecar attached to the Java gateway. A payment channel ID and reachable gateway URL must therefore be available before agent requests can use the payment flow.

_Full upstream README: https://allmcps.com/mcp/solana-x402-compliance/readme_

