xStocker
v0.2.0Build buy/sell orders for tokenized US stocks (xStocks) on Solana.
MCP server for the xStocker Agent API: let an AI assistant discover tokenized U.S. stocks (xStocks) on Solana and prepare buy/sell orders. Claude Desktop / Cursor / any stdio MCP client: For a sell, amount is in the units the wallet shows (up to 8 decimals). Pass "max" to sell the entire balance: the API reads the exact on-chain balance itself.
Summary extracted from the README.
@xstocker/mcp
MCP server for the xStocker Agent API: let an AI assistant discover tokenized U.S. stocks (xStocks) on Solana and prepare buy/sell orders.
Non-custodial. The server never sees a private key and never executes a trade. build_order
returns a quote plus a Solana Pay link (solanaPayUrl, shown as a link or QR code); the user opens it
in their own wallet and approves there. The wallet requests a fresh transaction at that moment, so
nothing expires.
xStocks are issued by Backed Finance AG and are not available to U.S. citizens or residents. Trading tokenized equities involves risk, including loss of principal. Not investment advice.
Use
Claude Desktop / Cursor / any stdio MCP client:
{
"mcpServers": {
"xstocker": { "command": "npx", "args": ["-y", "@xstocker/mcp"] }
}
}
Tools
| Tool | What it does |
|---|---|
list_assets |
Tradable xStocks and accepted pay tokens |
build_order |
Quote + solanaPayUrl for a buy/sell (nothing is executed). Sells accept an amount in wallet units or "max" for the whole balance |
get_order_status |
On-chain status of a signed transaction |
check_partner |
Check that a wallet can receive referral fees |
Selling
For a sell, amount is in the units the wallet shows (up to 8 decimals). Pass "max" to sell the
entire balance: the API reads the exact on-chain balance itself.
Referral partners (optional)
No registration. A partner is just a Solana wallet address. Set it on the server and every
build_order carries it; the partner's fee (0.25% by default, paid by the trader on top of the
standard fee) is sent to that wallet on-chain, in the same transaction as the trade.
details.partnerFee shows what was applied, or why not.
{
"mcpServers": {
"xstocker": {
"command": "npx",
"args": ["-y", "@xstocker/mcp"],
"env": { "XSTOCKER_PARTNER_WALLET": "YOUR_WALLET_ADDRESS" }
}
}
}
USDC fees go to the partner's USDC token account (it must exist: receive any USDC once), SOL fees
to the wallet itself. Use check_partner to verify a wallet.
Env (optional)
XSTOCKER_PARTNER_WALLET— your referral partner wallet address, added to everybuild_order(XSTOCKER_PARTNER_IDis accepted as an alias, but must now be a wallet address)XSTOCKER_API_URL— override API base URL
mcp-name: com.xstocker/agent-mcp
License
MIT