Skip to main content
Glama
@writerslogic/ai-agents-mcp

@writerslogic/ai-agents-mcp

Official

@writerslogic/ai-agents-mcp

An MCP server that exposes the WritersLogic x402 agent hub as tools. By default it lists a focused set of 14 web, document and code-security tools (web search, page and PDF to markdown, page capture, transcription, PII redaction, company and lead research, pre-merge and dependency review, EU CRA checks). Set AGENTS_PROFILE to list more. Calls are priced in USDC and paid over x402 on Base, with no gas needed from the buyer.

The server is a thin client: it fetches the hub catalog, registers a tool per agent, forwards calls over HTTPS, and signs a payment authorization when the hub asks for one and your spending cap allows it.

Install

Requires Node.js 20 or later. No global install is needed; MCP clients run it with npx, which builds it from this repository on first run.

{
  "mcpServers": {
    "writerslogic-ai-agents": {
      "command": "npx",
      "args": ["-y", "@writerslogic/ai-agents-mcp"],
      "env": {
        "AGENT_PRIVATE_KEY": "0x...",
        "MAX_USDC_PER_CALL": "1.00"
      }
    }
  }
}

Put that block in your client's MCP configuration:

Client

Config file

Claude Desktop

claude_desktop_config.json (Settings, Developer, Edit Config)

Cursor

~/.cursor/mcp.json (or .cursor/mcp.json in a project)

Windsurf

~/.codeium/windsurf/mcp_config.json

Cline

cline_mcp_settings.json (MCP Servers, Configure MCP Servers)

Claude Code

claude mcp add writerslogic-ai-agents -e AGENT_PRIVATE_KEY=0x... -- npx -y @writerslogic/ai-agents-mcp

Omit AGENT_PRIVATE_KEY to browse and to see prices: paid tools then return the payment instructions instead of paying.

Related MCP server: x402-gateway-mcp

Configuration

Variable

Default

Purpose

AGENT_PRIVATE_KEY

unset

Private key of the wallet that pays. Needs USDC on Base, no ETH. Use a dedicated low-balance wallet.

MAX_USDC_PER_CALL

1.00

Per-call spending cap. A call whose price is above it is refused before anything is signed.

AGENTS_API_KEY

unset

Sent as X-API-KEY. Bypasses payment.

AGENTS_BASE_URL

https://agents.writerslogic.com

Hub URL. Must be https; plain http is accepted for localhost only.

AGENTS_TIMEOUT_MS

120000

Timeout for tool calls (1000 to 600000). The catalog fetch uses at most 15 s.

AGENTS_PROFILE

core

Which hub agents become tools: core (the default set above), all (the whole hub, 80+ tools), or a comma-separated list of agent or package ids.

AGENTS_PACKAGES

unset

all, or a comma-separated list of package ids, to list those packages' checks as individual tools instead of one tool per package.

Tools

Tools are discovered from the hub catalog (GET /api/v1/catalog?view=tools) and package index (GET /api/v1/packages) when the server starts, and refreshed on tools/list after ten minutes, so the live list is authoritative. Tool names are the agent or package id with every character outside A-Za-z0-9_ replaced by _. Each agent tool takes the agent's own input schema.

Small single-purpose checks ($0.005 each) are grouped into one tool per package, such as money_math_kit, so the tool list stays short. A package tool takes one of:

  • {"describe": true, "check": "<id>"}: free. Returns the check's input schema and an example input, from GET /api/v1/packages/<id>. Without check it lists the package's checks.

  • {"check": "<id>", "input": {...}}: runs one check at its own price.

  • {"calls": [{"check": "<id>", "input": {...}}, ...]}: runs up to 20 checks from the package under one $0.02 payment through /api/v1/micro-batch. Stateful and network checks are rejected before payment.

Arguments are validated locally first, so a check outside the package or a malformed call never reaches the hub. A hub without a package index gets one tool per agent. Agents at the time of writing:

Tool

Price (USDC)

Description

abandoned_compound_miner

2.00

Abandoned Compound & Uncommercialized Trial Miner

accessibility_patcher

0.75

ADA / WCAG Lawsuit Shield & DOM Auto-Patcher

arxiv_to_code

1.00

arXiv-to-Production Code & Hyperparameter Compiler

token_trap_detector

0.25

On-Chain Bytecode & Unverified Token Trap Detector

chargeback_fighter

2.50

E-Commerce Chargeback Representment Builder

clarification_impact

0.50

Prediction-Market Clarification Impact Pricer

competitor_battlecard

1.50

SaaS Pricing & Competitor Battlecard Spy

contract_auditor

1.00

Smart Contract Auditor

contract_terminator

1.00

Dark Pattern Contract & Subscription Exit Lawyer

cover_claim

5.00

DeFi Cover Claim Adjudicator

diff_gatekeeper

0.50

PR / Dependency Breaking-Change & Exploit Gatekeeper

dispute_ev

0.50

UMA Dispute EV Desk

foreignResearchScout

1.50

Cross-Lingual Dark Science Arbitrage Scout

lead_enrichment

0.50

Autonomous Lead Enrichment

market_predictor

0.10

Prediction Market Analyzer

medical_bill_auditor

3.00

Medical Bill Upcoding & Overcharge Slasher

milestone_verifier

2.00

Grant Milestone Verifier with Signed Release Attestation

patent_design_around

2.00

Patent Design-Around & Freedom-to-Operate Architect

prior_art_invalidator

2.50

Global Prior-Art Patent Invalidator

replication_auditor

0.75

Scientific Consensus & Replication Failure Auditor

arbitrage_lawyer

0.75

Cross-Platform Arbitrage & Resolution Rules Lawyer

heal_scraper

0.40

Self-Healing Scraper & DOM-to-JSON Compiler

tariff_engineer

1.50

Global Customs & Tariff Engineering Optimizer

vault_exit_lawyer

0.25

Vault Exit Lawyer

Also always available, and free:

Tool

Description

verify_provenance

POSTs to /api/v1/verify-provenance to check the _provenance record on a paid result.

A paid result is the hub's JSON response, returned unchanged as text content.

How payment works

  1. The tool POSTs your arguments to the agent endpoint.

  2. If the hub answers 402, it sends a base64 PAYMENT-REQUIRED header (x402 v2) listing an exact scheme requirement: network eip155:8453, USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, an atomic amount (6 decimals), payTo, and the token's EIP-712 name and version.

  3. If AGENT_PRIVATE_KEY is set and amount is at most MAX_USDC_PER_CALL, the client signs an EIP-3009 TransferWithAuthorization (EIP-712, USDC domain on chain 8453) for exactly that amount to payTo, valid for the requirement's timeout, with a random nonce.

  4. It retries the same request once with the base64 PAYMENT-SIGNATURE header. The hub's facilitator submits the transfer and pays the gas.

  5. The result is returned. If the retry is not accepted, the error is returned and nothing further is sent.

If no key is configured, or the price is over the cap, the tool returns an error that states the price, network, asset and payTo, and no signature is produced.

Provenance

Paid results carry a _provenance record next to data. Pass the whole {data, _provenance} object to verify_provenance to check it against the hub. The request body is forwarded as given.

Security

  • The key stays local. AGENT_PRIVATE_KEY is read once from the environment, used only to sign typed data, and never logged or sent anywhere. Authorizations are signatures; the client never broadcasts a transaction.

  • The cap is per call, not per session. An agent that calls tools in a loop can spend MAX_USDC_PER_CALL each time. Fund the wallet with only what you are willing to lose, and lower the cap to the most expensive tool you actually want to allow.

  • Only USDC on Base is signed for. Challenges naming another network, asset, or transfer method are refused, so a malicious or compromised hub cannot ask for a different token. Base Sepolia (eip155:84532) USDC is also accepted for testing.

  • Catalog entries are untrusted. Endpoints must resolve to the hub's own origin, ids and prices are validated, and redirects are never followed, so credentials and signatures are not sent to other hosts.

  • Bounds. Requests are limited to 1 MiB, responses to 2 MiB, and every request has a timeout.

  • Stdout is the MCP stream. Logs go to stderr only; they include the paying address and each payment amount, never the key.

  • Anyone who holds a signed authorization before it expires could submit it, up to the signed amount and to payTo only.

Development

npm install
npm run build
npm test

Tests run against a local mock hub and verify the EIP-3009 signature by recovering the signer, the cap at limit-1, limit and limit+1, and an end-to-end stdio session against dist/index.js. No network access or funds are involved.

License

Apache-2.0. Copyright 2026 WritersLogic.

Available Tools

15 tools
company_identityA

Company identity: name, domain, LEI, VAT, CIK or ticker to one verified legal entity. Resolves a company name, web domain, LEI, EU VAT number, SEC CIK or stock ticker to one legal entity using official free registries in a single call: GLEIF (legal name, other names, addresses, jurisdiction, registry id, direct and ultimate parent), the SEC ticker table (CIK, ticker), the EU VIES VAT service, and Companies House officers when the operator has configured a key. Deterministic matching with explicit ambiguity: when no single candidate clearly leads, it returns status "ambiguous" with ranked candidates instead of guessing. For KYC, vendor onboarding and CRM de-duplication by agents. It does NOT fetch or scrape the domain, does not cover companies without an LEI, does not return beneficial owners or financials, and uses no model.

Cost: 0.05 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: cik, lei, vat, name, +5 more.

competitor_battlecardA

SaaS Pricing & Competitor Battlecard Spy. Reads up to 3 competitor sites (homepage and pricing page, fetched in parallel) and returns a deal battlecard in under a minute: a verdict headline with confidence, pricing tiers whose amounts are checked against the page text, a scenario cost comparison computed in code, hidden fees and limits, landmine questions, objection handling, wedge features and a talk track. If a site or model step fails you get a signed partial result that names what is missing. Pricing is only as current as the public pages; unverified prices are flagged.

Cost: 1.50 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: competitorUrls (required), ourProductDescription (required), scenario.

cra_exploit_clockA

CRA Exploited-Vulnerability Evidence and Art. 14 Deadline Clock. Takes a CycloneDX or SPDX JSON SBOM (or a purl list), asks OSV.dev for the advisories that affect each exact component version (OSV evaluates the version ranges per ecosystem), then checks each CVE against the CISA Known Exploited Vulnerabilities catalog and the ENISA EUVD exploited-vulnerability index, and adds FIRST EPSS scores. Returns a per-component verdict, the evidence with source URLs and SHA-256 digests, and the Regulation (EU) 2024/2847 Article 14(2) dates computed in UTC from the awareness time and fix time you supply: early warning within 24 h, notification within 72 h, final report 14 days after a corrective or mitigating measure is available. Also drafts Art. 14(2) content from quoted feed text. Reports evidence and arithmetic, not a legal conclusion. Not legal advice: whether a vulnerability is actively exploited, when you became aware, and what to notify are your determination. A separate standalone awareness record is added only when issue_record is true; every response is in any case a hub-signed credential over its output and input digests. Fan-out is capped (1000 components, 120 advisory records); EUVD is checked per CVE up to 20 CVEs and above that by one read of its whole exploited list; partial results name what is missing. Deterministic, no model call.

Cost: 2.00 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: sbom, purls, product, issue_record, +2 more.

cra_readinessA

EU CRA Readiness Check. Repository or manifests in, EU Cyber Resilience Act Art. 14 position out: dependency-advisor resolves every declared package to its locked version (deterministic, no model), those versions go to cra-exploit-clock as package URLs (OSV, CISA KEV, EPSS, EUVD), and each actively exploited component is joined back to the manifest that declares it with the fixed versions and the advisor's findings. Reports the 24 h / 72 h / 14 day reporting deadlines from the awareness time. Charged once, dependency-advisor + cra-exploit-clock at 20% below their combined list price; not charged when a required step fails.

Cost: 2.40 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: ref, repo, files, product, +4 more.

dependency_advisorA

Dependency Underuse & Replacement Advisor. Audits the dependencies of a public GitHub repo, commit or pull request (or uploaded manifests and sources) and returns a pass/warn/fail verdict, a 0-100 risk score, the top findings with manifest file:line and the fix, and a SARIF 2.1.0 log for GitHub code scanning. Parses JS/TS, Python and Rust imports with a tokenizer-level scanner and maps them to declared npm, PyPI and crates.io dependencies. Flags unused, dev-only, undeclared and trivially used packages; checks deps.dev, the npm registry and OSV for deprecation, advisories, staleness and OpenSSF Scorecard; matches a cited table of platform replacements (fetch, crypto.randomUUID, optional chaining) and ranks alternatives in code by Scorecard, recency, dependents, size and license compatibility. Reads repos through GitHub's API and falls back to the source archive when the API is rate limited; when some lookups still fail, it returns a signed partial result that lists what is missing. At most one optional model call maps used symbols to a replacement; deterministic mode makes none. Advisory data comes from OSV and deps.dev and can lag; findings are leads to verify, not a certification.

Cost: 1.00 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: ref, mode, repo, files, +2 more.

doc_to_markdownA

Document to Markdown with per-page hashes and offsets. Converts a PDF (text layer), DOCX, XLSX or PPTX file, or normalizes an HTML, Markdown, text, CSV or JSON file, into Markdown (or plain text) for an agent that must read or cite a document. Give an https URL or up to 4 MB as base64. Returns the content plus one unit per page, sheet or slide with its exact character range in the content and a SHA-256 of that unit's text, so later quote and citation checks can anchor to a page. Headings, lists, tables and links are kept for DOCX; sheets become tables; slides become sections. Set describe to also get a suggested descriptive file name, tags and a one-line summary (a fast model reads the first 6,000 characters; its quotes are checked against the text). It does NOT run OCR: scanned PDF pages are flagged needs_ocr and come back empty. Images, comments, notes, headers and footers are ignored, legacy .doc/.xls/.ppt and password-protected files are refused, and ZIP64 is unsupported.

Cost: 0.02 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: url, pages, format, describe, +3 more.

lead_enrichmentA

Autonomous Lead Enrichment. Scrapes a company homepage, deduces its value proposition and buyer persona, and drafts a targeted B2B cold email.

Cost: 0.50 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: url (required), senderContext.

page_captureA

Page capture: screenshot or PDF of a public URL. Renders one public web page in a real browser (Cloudflare Browser Run, JavaScript enabled) and returns a PNG or JPEG screenshot or a PDF as base64 with its sha256, for agents that need to see or archive a page. Does not log in, click or fill forms, does not capture private or internal hosts, and returns an error rather than a capture larger than 6 MB.

Cost: 0.02 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: url (required), output, viewport, full_page, +2 more.

page_contentsA

Page contents: URL to clean Markdown or text. Fetches one public web page and returns its main content as clean GitHub-flavored Markdown or plain text, with title, canonical URL, language, absolute links and content hashes, for agents that feed pages to a model. Deterministic, no model. Does not run JavaScript (client-rendered pages come back sparse), does not follow links, does not consult robots.txt, and drops navigation, footers, sidebars and forms.

Cost: 0.01 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: url (required), format, max_chars, include_links, +1 more.

pre_merge_reviewA

Pre-merge Review Pack. One unified diff in, one merge decision out: the PR exploit gatekeeper (bug hunter, patch synthesizer, secret/dependency/SAST scans) plus the adversarial Unicode / Trojan Source gate. Runs diff-gatekeeper ($0.50) + unicode-safety-gate ($0.25) in one paid call for 20% less than buying them separately. Charged only when every member succeeds.

Cost: 0.60 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: diff (required), context, packageJsonDiff.

redact_textA

Selective PII redaction with a self-check. Redacts personal data from text at the level you choose and proves the output is clean by scanning it again. Pick a level: 1 government identifiers (SSN, ITIN, EIN, UK NINO, Canadian SIN, driver's license, passport), 2 adds dates of birth, 3 adds street addresses and phone numbers, 4 adds person names and email addresses. Then switch single categories on or off with include and exclude, or name the exact set with categories; extras are credit cards, IBANs, routing and account numbers, IP addresses, URLs, every date, and organizations. minDigitRun redacts any run of that many digits, terms redacts words you list (business names, project names), and keep protects strings such as your own email address. Detectors use checksums and structure rules (Luhn, ABA, mod-97, SSN and EIN rules) so ordinary numbers are not swallowed, and every later mention of a redacted value is redacted too. Replacements are labels like [REDACTED:SSN], one generic marker, numbered tokens like [PERSON_2] that stay consistent, or labels that keep the last four characters. The response lists category, position and confidence for each redaction and never repeats the original values. The engine rescans its own output and returns an error (payment released) rather than a result that still contains a detected value. Names and organizations are heuristic; set useModel to add a model pass for names, organizations and addresses, which sends the text to the configured language-model provider. Text only, up to 1,000,000 characters (the request body may be up to 4 MB of UTF-8); nothing is stored and no digest of the input is returned.

Cost: 0.05 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: text (required), keep, level, style, +6 more.

transcribe_urlA

Transcribe an audio or video file URL (Whisper, timestamps, SRT, VTT). Transcribes a public audio or video FILE URL (podcast enclosure, meeting recording, voice memo; mp3, wav, mp4/m4a, ogg, webm, flac; up to 25 MB and 30 minutes) with Whisper large-v3-turbo on Cloudflare Workers AI. Returns timestamped segments plus SRT and VTT subtitles and the plain text, bound to the media's SHA-256. Does NOT accept YouTube, Spotify or any streaming page (the URL must be the media file itself), does not identify speakers, and does not translate.

Cost: 0.25 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: url (required), formats, language, max_minutes.

unicode_safety_gateA

Adversarial Unicode & Trojan Source gatekeeper. Scans a public GitHub repo, a pull request, a unified diff or a list of files for adversarial Unicode with the 19 rules (USC001-USC019) of dcondrey/unicode-safety-check: bidi controls (Trojan Source), invisible and default-ignorable characters, variation-selector and tag-character payloads (Glassworm), private-use code points, homoglyph and mixed-script identifiers, confusable collisions, misplaced BOM and control characters. Leads with a block/warn/pass verdict, a 0-100 risk score, the top locations (file:line:column) grouped so one trick reads as one finding, and the fix; also returns every finding, a SARIF 2.1.0 log for GitHub code scanning, and model-written exploit explanations that are checked against the findings. Findings and verdict come from deterministic rules; only the explanations use a model. Repo scans read up to 1,000,000 characters, shallowest files first, and list what they skipped.

Cost: 0.25 USDC per call, paid automatically over x402 on Base when AGENT_PRIVATE_KEY is configured and the price is within MAX_USDC_PER_CALL.

Inputs: ref, diff, repo, files, +4 more.

verify_provenanceA
Read-onlyIdempotent

Free. Verify the provenance record (_provenance) the WritersLogic agent hub attaches to every paid result. Pass the {data, _provenance} object a paid tool returned, unchanged.

Inputs: data, _provenance.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 15 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes across security scanning, web retrieval, document/media conversion, and company intelligence. The main overlap is intentional bundling: pre_merge_review includes unicode_safety_gate, and cra_readiness includes dependency_advisor plus cra_exploit_clock, so agents must choose between granular and composite calls, but descriptions make the relationship explicit.

    Naming Consistency3/5

    All names use snake_case, which is consistent at the character level. However, there is no single predictable pattern: verb-first names such as redact_text, transcribe_url, and verify_provenance are mixed with noun-first names such as page_contents, company_identity, and lead_enrichment, making the convention mixed but still readable.

    Tool Count4/5

    Fifteen tools is at the upper end of the typical 3-15 range, but this is a broad general-purpose paid-utility server, and each tool maps to a distinct capability. The count is reasonable, though some bundling reduces the need for separate entries.

    Completeness4/5

    The surface covers the apparent domains well: security/compliance (Unicode, dependencies, CRA), web search/fetch/capture, document and media conversion, and company intelligence, plus free provenance verification. Minor gaps remain, such as no standalone diff-gatekeeper or secret-scanning tool, no OCR, no speaker identification, and no translation, but most are documented and some are workable through bundled tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers