@getplexa/mcp

@getplexa/mcp

A Model Context Protocol server that gives any MCP client two economic-safety tools: realizable quote and pretrade check, paid per call in USDC with no accounts.

Category
访问服务器

README

@getplexa/mcp — Plexa MCP server

license: MIT chains: Base · Polygon · Arbitrum x402 MCP

A Model Context Protocol server that gives any MCP client (Claude Desktop, Cursor, your own agent) two economic-safety tools from Plexa — the x402-native economic-safety layer for trading agents — paid per call in USDC, no accounts:

Tool Wraps Price Returns
plexa_quote POST /v1/quote $0.02 Executable fill price under size (not mid/spot), price impact (bps), realizable depth, per-leg route, worst-case slippage, confidence — from canonical on-chain quoters on Base, Polygon & Arbitrum.
plexa_pretrade_check POST /v1/pretrade/check $0.05 Economic-safety verdict ok / caution / avoid + reasons + confidence, plus an executable quote. (Base-only today.)

It is a thin client of the public API (https://api.getplexa.com) — it pays a 402 automatically, signs the USDC authorization locally with your wallet, and never sees your key. The liquidity engine stays behind the API.


Why

A generic wallet guard answers "can I sign this transaction?". It can't answer the economic question an automated trader actually needs: what price will this swap really fill at under my size, and is this token a trap (rug / honeypot / thin liquidity)? Plexa answers both. This package puts those answers one tool-call away inside any MCP-speaking agent.


Install

Nothing to install — point your MCP client at the package via npx. It is fetched and run on demand.

Claude Desktop

Add to claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "plexa": {
      "command": "npx",
      "args": ["-y", "@getplexa/mcp"],
      "env": {
        "PLEXA_BASE_URL": "https://api.getplexa.com",
        "AGENT_WALLET_KEY": "0x<your funded wallet private key>",
        "CHAIN": "base"
      }
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json (or Settings → MCP → Add) — the same mcpServers block as above.

Restart the client. You should see the plexa_quote and plexa_pretrade_check tools available.


Configuration

All configuration is via environment variables (set in the env block of your MCP config):

Variable Default Notes
PLEXA_BASE_URL https://api.getplexa.com The public API. The real URL — not a secret.
AGENT_WALLET_KEY (none) Required to pay. Funded wallet private key — pays per call and signs locally. Plexa never receives it. Without it, tools return a clear 402.
CHAIN base base | polygon | arbitrum. The chain your wallet is funded on; quotes and payment default to it. plexa_pretrade_check is Base-only today.

Funding. Use a dedicated, low-balance wallet with a little USDC on CHAIN to pay per call (quotes $0.02, checks $0.05). The wallet signs an EIP-3009 USDC authorization per request; Plexa returns the result only after the payment settles on-chain (settle-before-serve).

Your key is a secret. Prefer your MCP client's secret storage if it has one. Never commit it.


How payment works (x402 in MCP)

MCP has no native payment. This server acts as an x402 client: it wraps fetch, so when Plexa replies 402 Payment Required it reads the payment requirements, signs a USDC authorization with your wallet (locally), and retries. The signed authorization is the only thing that leaves your machine — never the key. Payment is made on CHAIN, so you fund one wallet on one chain.

If no AGENT_WALLET_KEY is set, the tools return an honest 402 error explaining a funded wallet is needed — they never fabricate a result.


Example

Once configured, just ask your agent naturally — it will call the tools:

"Before I buy this token 0x… on Base, check it with Plexa and get me an executable quote for $500."

The agent calls plexa_pretrade_check (verdict + reasons) and plexa_quote (executable price under $500), pays $0.05 + $0.02 in USDC automatically, and answers with real on-chain economics.


Notes

  • Client-only. Talks to the public Plexa API over HTTPS. No service internals ship in this package.
  • Honest failures. A non-2xx response or a network error becomes a loud tool error — never a clean-looking empty result. An agent can always tell a failure from a pass.
  • Built on the official @modelcontextprotocol/sdk + x402.

License

MIT — see LICENSE.

Questions: support@getplexa.com · getplexa.com

Informational on-chain data and heuristic economic signals, not financial advice. Absence of flags is not a guarantee of safety. Verify independently before trading.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选