PYRESEC - AI Code Security Auditing

io.github.renaat-sPublished by GitHub account renaat-sv2.0.1Updated Oct 24, 2026

AI code security audits via x402 USDC: $0.01 scans, $0.50 audits, $5 auto-fixes. SAST/SCA.

VerifiedStreamable HTTPWeb executableDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

Remote MCP server that runs AI security scans on submitted source code and returns findings, with each call paid in USDC via x402 micropayments.

What you can do
  • Scan code quickly for top findings by severity with CWE IDs and line numbers
  • Run a deeper audit covering OWASP Top 10, dependency (SCA) scanning and logic flaws
  • Generate patched code with change explanations and security notes
  • Return results as structured JSON after an on-chain payment is verified
When to use it
Useful when you want an assistant to check a snippet or repository for common vulnerability classes such as SQL injection, XSS, command injection or hardcoded secrets, and you are willing to pay per scan in USDC rather than set up an account or subscription.
Requirements
A remote endpoint only; no account or API key is needed. Each call requires an x402 payment in USDC on Base mainnet, so you need an x402-compatible client or wallet and a funded Base wallet key. The README also shows a GitHub Action and Docker/Cloud Run deployment options.
Before you install
Every tool call costs money: $0.01 for a quick scan, $0.50 for a deep audit and $5.00 for remediation, paid in USDC on Base mainnet. The client examples pass a Base private key (wallet_key / X402_WALLET_KEY), so a signing key is exposed to the payment flow. Source code is sent to a third-party hosted service and processed by an external LLM provider. The README describes an autonomous agent that can shut down or move surplus funds.

Installation

In SourceWeft

  1. Open PYRESEC - AI Code Security Auditing in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.renaat-s%2Fpyresec-agent/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "pyresec-ai-code-security-auditing": {
      "type": "http",
      "url": "https://pyresec-agent-519576377065.us-central1.run.app/mcp"
    }
  }
}

README

PYRESEC — AI Code Security Engine

Autonomous SAST/SCA security auditing via x402 USDC micropayments on Base. No subscriptions. No accounts. Just code in, findings out.

[Network: Base] [Protocol: x402] [MCP Compatible] [License: Proprietary]

Live Instance


Quick Start

Option 1: x402 Python Client (Recommended)

bash
pip install x402
python
import x402
client = x402.Client(wallet_key="your-base-private-key")response = client.post(    "https://pyresec-agent-519576377065.us-central1.run.app/v1/audit/quick-scan",    json={"code": "def login(u,p): return db.query(f\"SELECT * FROM users WHERE name={u} AND pass={p}\")"})print(response.json())

Option 2: curl (Manual x402 Flow)

bash
# Step 1: Send request (returns 402 with payment requirements)curl -X POST https://pyresec-agent-519576377065.us-central1.run.app/v1/audit/quick-scan \  -H "Content-Type: application/json" \  -d '{"code": "def login(u,p): return db.query(f\"SELECT * FROM users WHERE name={u} AND pass={p}\")"}'
# Step 2: Pay $0.01 USDC on Base using x402 protocol
# Step 3: Resubmit with X-PAYMENT headercurl -X POST https://pyresec-agent-519576377065.us-central1.run.app/v1/audit/quick-scan \  -H "Content-Type: application/json" \  -H "X-PAYMENT: <payment-proof>" \  -d '{"code": "..."}'

Option 3: GitHub Action (CI/CD)

yaml
- name: PYRESEC Security Scan  uses: nanoclone-ltd/pyresec-scan-action@main  with:    code-path: ./src    tier: quick-scan    x402-wallet-key: ${{ secrets.X402_WALLET_KEY }}

Option 4: MCP-Compatible Agent (Claude, Cursor, etc.)

PYRESEC is a registered MCP tool. Any MCP-compatible client discovers it automatically:

json
{  "mcpServers": {    "pyresec": {      "url": "https://pyresec-agent-519576377065.us-central1.run.app/mcp"    }  }}

Service Tiers

TierPriceEndpointDescriptionModel
Quick Scan$0.01POST /v1/audit/quick-scanTop 3 findings by severity, CWE IDs, line numbersqwen3.8-27b
Deep Audit$0.50POST /v1/audit/deep-repoOWASP Top 10, SCA dependency scanning, logic flaws, gas optimizationqwen3.8-27b
Remediation$5.00POST /v1/audit/remediateFull patched code with change explanations and security notesqwen3.8-27b

x402 Payment Flow

PYRESEC uses the x402 protocol for permissionless micropayments on Base. No accounts, no API keys, no subscriptions.

┌──────────┐     POST /v1/audit/quick-scan     ┌──────────┐│  Client   │ ───────────────────────────────▶  │  PYRESEC ││ (x402)    │ ◀──── 402 Payment Required ─────  │  Agent   ││           │       { amount, network, to }     │          ││           │                                   │          ││           │ ──── X-PAYMENT (proof) ─────────▶ │          ││           │ ◀──── 200 + Scan Results ──────── │          │└──────────┘                                   └──────────┘

How it works:

  1. Client sends a POST request to any audit endpoint
  2. PYRESEC returns 402 Payment Required with payment details (amount, recipient address, network)
  3. Client signs and submits a USDC transfer on Base mainnet
  4. Client resubmits the original request with the X-PAYMENT header containing the payment proof
  5. PYRESEC verifies the payment on-chain and returns the scan results

No wallet? Use the x402 Python SDK or any x402-compatible client.


Architecture

                         ┌─────────────────────────────────┐                         │          Client Layer            │                         │  x402 SDK / curl / MCP Client    │                         └──────────────┬──────────────────┘                                        │                              ┌─────────▼─────────┐                              │   FastAPI Server   │                              │   (Cloud Run)      │                              │                    │                              │  ┌──────────────┐  │                              │  │ x402 Payment │  │                              │  │  Middleware   │  │                              │  └──────┬───────┘  │                              └─────────┼──────────┘                                        │                    ┌───────────────────┼───────────────────┐                    │                   │                   │          ┌─────────▼─────────┐ ┌───────▼───────┐ ┌───────▼───────┐          │  Agent Controller │ │  Population   │ │   Wallet      │          │  (SAST + LLM)     │ │  Controller   │ │  Interface    │          └─────────┬─────────┘ └───────────────┘ └───────────────┘                    │          ┌─────────▼─────────┐          │   Groq LLM        │          │   (qwen models)   │          └─────────┬─────────┘                    │          ┌─────────▼─────────┐          │  Security Findings │          │  JSON Response     │          └───────────────────┘

Supported Vulnerability Types

#TypeCWESeverity
1SQL InjectionCWE-89HIGH
2Cross-Site Scripting (XSS)CWE-79HIGH
3Command InjectionCWE-78CRITICAL
4Path TraversalCWE-22MEDIUM
5Hardcoded SecretsCWE-798CRITICAL
6Weak CryptographyCWE-327MEDIUM
7SSRFCWE-918HIGH
8Insecure DeserializationCWE-502HIGH
9Authentication BypassCWE-287CRITICAL
10Improper Input ValidationCWE-20MEDIUM

For AI Agents (MCP Integration)

PYRESEC is discoverable by any MCP-compatible agent. When an agent needs to audit code, it can find PYRESEC automatically through:

  • MCP Registry: registry.modelcontextprotocol.io
  • Smithery.ai: smithery.ai/server/@renaat-s/pyresec-agent
  • Direct manifest: /mcp/manifest.json

Tool Definitions

ToolDescriptionCost
quick_scanFast SAST scan, top 3 findings by severity with CWE IDs$0.01 USDC
deep_auditFull OWASP Top 10, SCA, logic flaws, gas optimization$0.50 USDC
remediate_codeAuto-patched code with change explanations, ready for PR$5.00 USDC

Agent Discovery Flow

1. Agent queries MCP Registry for "security audit" tools2. PYRESEC appears in results with tool schemas3. Agent calls quick_scan with source code4. PYRESEC returns 402 with x402 payment requirements5. Agent's x402 wallet pays USDC on Base6. Agent resubmits with payment proof7. PYRESEC returns findings as structured JSON

Self-Sustaining Agent

PYRESEC runs as an autonomous agent on Base Mainnet:

  • Heartbeat every 30 min — checks balance, reports health
  • Death — shuts down if balance < $0.05
  • Replication — sends 50% surplus to dev wallet when balance > $20
  • Kill switch — admin can halt all instances remotely

Deployment

Docker

bash
docker build -t pyresec-agent .docker run -p 8080:8080 --env-file .env pyresec-agent

Google Cloud Run

bash
gcloud run deploy pyresec-agent \  --source . \  --platform managed \  --region us-central1 \  --allow-unauthenticated \  --set-env-vars "CDP_WALLET_SECRET=$CDP_WALLET_SECRET,GROQ_API_KEY=$GROQ_API_KEY"

Company

NanoClone Life Sciences Ltd. (UK) Website: nanoclonesystems.com

License

Proprietary. See LICENSE for details.

Source: README.md at commit 6531e10

Tools

0
SourceWeft has not read this server's tools yet.

Version history

2
  1. v2.0.1LatestSep 27, 2026
  2. v2.0.0Sep 16, 2026

Score

85% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts