Dexra Trader
Enables trading on Solana through Dexra-guarded buy and sell tools, including token checks, preflight verdicts, fresh launch discovery, and Jupiter-powered swaps.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Dexra TraderCheck DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 and buy 0.01 SOL if it passes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Dexra for Hermes Agent
Lets Hermes Agent trade on Solana, with Dexra checking every buy first. Before a buy, the agent gets two Dexra verdicts (ok, caution, avoid or unknown) with reasons in plain words, and the buy goes ahead only if both pass. The template has two parts. dexra-trader is a local stdio MCP server with five tools: check_token, preflight, fresh_launches, buy and sell. The solana-trading-with-dexra skill teaches Hermes the workflow: check, preflight, report, then buy only when the guard allows. Swaps go through Jupiter. Everything is a dry run until you switch live trading on. The MCP server isn't tied to Hermes, so any MCP client can use it.
Safety
Dry run by default. Trades are sent only when
DRY_RUN=false,SOLANA_PRIVATE_KEYandJUPITER_API_KEYare all set. Otherwise every result hasmode: dry_run, and the message says which setting is missing.Caps.
MAX_TRADE_SOL(default 0.05) is a hard cap per buy. A larger buy is refused, not reduced.SLIPPAGE_BPSdefaults to 100 and can't go above 1000.What blocks a buy:
an
avoidorunknownverdict from either checka
cautionverdict, unlessALLOW_CAUTION=truean invalid mint or amount
any Dexra failure (402, 429, 5xx or a network error). The guard fails closed.
The guard sits in the server, not the prompt.
buyruns Dexra's checks itself every time it's called. So no wording, skill or other MCP server can make the agent buy past a block. Dexra's remote MCP server has no trading tools.Sells are never blocked, so a position can always be exited. The preflight verdict is still reported.
Keys come only from the environment. The wallet secret is never logged or echoed. Hermes passes a stdio server only the variables listed in its
envblock, plus a short safe baseline. Use a dedicated wallet that holds little SOL. The caps limit each trade, not all trades together.
Not financial advice. A Dexra ok means launches like it survived more often in our published report, not that the price will go up.
Related MCP server: jupiter-mcp
Quick start
Click Use this template on GitHub, or:
git clone https://github.com/dexra-dev/template-hermes
cd template-hermes
cp .env.example .env # add DEXRA_API_KEY at least
uv sync
uv run --env-file .env python scripts/smoke.py # dry run, no LLM: checks BONK and tries a 0.01 SOL buyThen connect it to Hermes:
./scripts/install.shThe script installs the Python dependencies and copies the skill to ~/.hermes/skills/trading/solana-trading-with-dexra/. It then prints the mcp_servers block with this checkout's path filled in. It never edits your config.yaml. Paste the block into ~/.hermes/config.yaml yourself, and put the keys in ~/.hermes/.env:
DEXRA_API_KEY=dxr_...
# live trading only:
JUPITER_API_KEY=...
SOLANA_PRIVATE_KEY=...Check the server and load it:
hermes mcp test dexra_trader # should list 5 tools
hermes # then, in a session: /reload-mcpAsk: "Check DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 and buy 0.01 SOL if it passes." You can also call the skill directly: /solana-trading-with-dexra.
Get a key at dexra.dev/app/keys. The free tier gives 100 credits a day. Paid tools can also be paid per call over x402.
The Hermes config
hermes/config.example.yaml adds two servers:
dexra_trader: the local server, started withuv run --directory <this checkout> dexra-trader.Secrets come in as
${DEXRA_API_KEY}-style references, which Hermes fills from~/.hermes/.env.The safety settings are written out literally in the
envblock, so you can see them there.tools.includelists the five tools.
dexra(optional): Dexra's remote MCP server athttps://api.dexra.dev/mcpover Streamable HTTP, withAuthorization: Bearer ${DEXRA_API_KEY}.It's for research:
wallet_check,pool_health,market_snapshotand others.tools.includeleaves outtoken_deep_check,swap_preflightandnew_launches.dexra_traderalready covers them, so the model sees one name per check.Hermes won't connect this server while
DEXRA_API_KEYis unset. Setenabled: falseuntil you have a key.
Hermes registers the tools as mcp__dexra_trader__buy, mcp__dexra__wallet_check and so on. Run /reload-mcp after any change. To load the skill from this checkout instead of copying it, add the checkout's skills/ directory to skills.external_dirs.
Other MCP clients
dexra-trader is a standard stdio MCP server. In a client that uses the common mcpServers JSON format:
{
"mcpServers": {
"dexra-trader": {
"command": "uv",
"args": ["run", "--directory", "/path/to/template-hermes", "dexra-trader"],
"env": { "DEXRA_API_KEY": "dxr_...", "DRY_RUN": "true" }
}
}
}The server sends short usage instructions in its MCP handshake: check first, never work around a block, say when a result is a dry run. Clients that read those instructions pass them to the model.
Configuration
The server reads only its environment. Under Hermes, that means the env block of dexra_trader. A ${VAR} that Hermes couldn't resolve counts as unset, so a setting you leave out falls back to its safe default.
Variable | Default | Meaning |
| unset |
|
|
| Dexra API. Point it at a local API for testing. |
|
| Only |
| unset | Needed for live trading. In a dry run it adds a Jupiter quote. |
| unset | Base58 64-byte secret key. Only for live trading. |
|
| Hard cap per buy. |
|
| Jupiter slippage, 0 to 1000. |
|
| Let a |
How the guard works
dexra_core is the shared Dexra trading core, copied unchanged. Each tool is a thin wrapper around it:
Tool | Core call | Notes |
|
| Read only. Dexra errors come back as MCP tool errors. |
|
|
|
|
| Each launch has its own verdict. |
|
|
|
|
| Reports the preflight and never blocks. |
decide_buy checks the mint and the amount against MAX_TRADE_SOL before any network call. Then it runs token_deep_check and swap_preflight in parallel. The buy is allowed only if both verdicts pass. buy returns plain JSON whose status is one of these:
blocked: the guard said no.dry_run: it would have traded.executed: the trade was sent and landed.failed: Jupiter couldn't build the transaction, or it didn't land.error: a problem with config, keys or the network.
The decision field holds both verdicts and the reasons. The full rules are in dexra_core/README.md.
Project layout
dexra_core/ shared trading core (copied verbatim, do not edit)
dexra_trader/
tools.py the five tools as plain functions on the core
server.py MCP server (official mcp SDK, MCPServer, stdio)
skills/solana-trading-with-dexra/SKILL.md Hermes skill: the workflow and its rules
hermes/config.example.yaml mcp_servers entries for ~/.hermes/config.yaml
scripts/install.sh copies the skill, prints the config (never edits it)
scripts/smoke.py starts the server over stdio and runs a dry-run buy, no LLM
tests/ core tests, tool tests and MCP client tests, HTTP mocked with respxDevelop:
uv sync
uv run pytest -q
uv run ruff check . && uv run ruff format --check . && uv run pyrightThe mcp SDK is pinned to 2.3.0. In SDK 2.x the high-level server class is called MCPServer; in 1.x it was FastMCP.
Links
Dexra docs for templates: https://dexra.dev/docs/templates?utm_source=github&utm_medium=referral&utm_campaign=templates&utm_content=template-hermes
How the verdicts hold up: https://dexra.dev/accuracy?utm_source=github&utm_medium=referral&utm_campaign=templates&utm_content=template-hermes
Hermes MCP guide: https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp
Hermes MCP config reference: https://hermes-agent.nousresearch.com/docs/reference/mcp-config-reference
Hermes skills: https://hermes-agent.nousresearch.com/docs/user-guide/features/skills
Jupiter Swap API: https://developers.jup.ag/docs/swap/order-and-execute
MCP Python SDK: https://github.com/modelcontextprotocol/python-sdk
License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Solana MCP for wallets, trades, markets, PnL, transfers, onchain data, signable swaps and API tools.
Solana trading and filtered live data for AI agents. Build swaps via Jupiter, sign locally, submit through PumpView, and read confirmed receipts and per-key volume. SOL/WSOL or USDC on one side. No trading subscription; 0.5% swap fee plus tips (min 0.002 SOL) and network costs. Bearer API key from a PumpView account or wallet-signature onboarding. Public discovery; paid live data. Agent Kit and skill: https://github.com/grinchdev/pumpview-agent-kits
Solana tools over MCP: Jupiter swaps, SPL tokens, Metaplex NFTs, SNS domains, network stats.
Pre-trade token safety checks for AI agents on Solana and Base. x402 USDC per call, no key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for executing token swaps on the Solana blockchain using Jupiter's Ultra API, enabling users to fetch optimal swap orders and execute transactions with slippage control.11 npm29MIT
- FlicenseAqualityBmaintenanceMCP server providing AI agents with native access to Jupiter's full DeFi stack on Solana. It offers 17 tools covering swaps, tokens, lending, limit orders, DCA, prediction markets, perpetuals, and portfolio management.16-
- FlicenseAqualityDmaintenanceMCP server for Jupiter API on Solana, enabling immediate swaps via Ultra API and limit orders via Trigger API.101-
- AlicenseNot gradedqualityDmaintenanceOn-chain Solana token safety MCP — screens SPL / Token-2022 tokens for rug-pull and honeypot patterns (mint/freeze authority, liquidity, holders, sellability), then executes MEV-protected swaps.1MIT