Overview
Solva MCP is a Model Context Protocol server that gives AI agents the ability to discover services, evaluate them against policies, and pay with real USDC micropayments on Stellar — all from a single natural language command.
Built for: Stellar Hacks: Agents Hackathon 2026
Protocol: x402 — HTTP 402 micropayments on Stellar
Network: Stellar Testnet (real on-chain transactions)
How It Works
- User types a task in natural language (e.g. "find latest news about AI")
- Solva detects the service category from keywords
- Queries the registry and filters by the agent's spending policy
- Sends a USDC micropayment on Stellar testnet
- Returns the service response + verifiable transaction proof
Prerequisites
- Node.js 20+ — Required runtime
- Stellar testnet wallet — Funded with XLM and USDC
- Claude Code (or any MCP-compatible client)
Installation
git clone https://github.com/raunet234/solva-mcp.git
cd solva-mcp
npm install
cp .env.example .env
Wallet Setup
1. Get Testnet XLM
Visit Stellar Friendbot to fund your wallet with testnet XLM.
2. Get Testnet USDC
Visit Circle Faucet, select Stellar Testnet, and paste your public key.
3. Setup USDC Trustline
npx tsx scripts/setup-trustline.ts
Note: You must establish a USDC trustline before receiving USDC on Stellar. Run the setup script once.
MCP Configuration
Claude Code
claude mcp add solva npx tsx /absolute/path/to/solva-mcp/src/index.ts -e STELLAR_SECRET_KEY=your_key
Cursor / VS Code / Windsurf
{
"mcpServers": {
"solva": {
"command": "npx",
"args": ["tsx", "/path/to/solva-mcp/src/index.ts"],
"env": { "STELLAR_SECRET_KEY": "S..." }
}
}
}
Policy Engine
The policy engine controls how your agent spends money. Edit policy.json:
{
"maxPriceUSDC": 0.005,
"minUptimePct": 97.0,
"minTotalPayments": 100,
"dailyBudgetUSDC": 2.0,
"allowExplorer": false
}
Service Registry
The registry contains all available services in the Solva marketplace.
| Service | Category | Price | Uptime | Payments | Status |
| XLM News Wire | 📰 news | $0.002 | 99.2% | 1,400 | ✓ Pass |
| DeepQuery Search | 🔎 search | $0.003 | 98.5% | 750 | ✓ Pass |
| Brevity Summarizer | 📝 summarize | $0.001 | 97.8% | 180 | ✓ Pass |
| SkyVault Weather | 🌤️ weather | $0.004 | 95.5% | 45 | ✗ Fail |
Why does SkyVault fail? Uptime 95.5% is below the 97% minimum, and 45 payments is below the 100 minimum. This demonstrates policy-based agent protection.
Using Solva
Simply type a task in natural language. Solva handles the rest.
> Call solva tool: find latest news about AI
> Call solva tool: summarize blockchain payment trends
> Call solva tool: research x402 protocol
Supported Categories
| Category | Keywords |
| 📰 news | news, article, latest, headline |
| 🔎 search | search, find, research, look up |
| 📝 summarize | summarize, summary, tldr, brief |
| 🌤️ weather | weather, temperature, forecast, rain |
Tasks that don't match any keyword default to search.
Output Format
Every response includes full payment transparency:
✓ Task: find latest news about AI
✓ Category: news
✓ Service: XLM News Wire
✓ Price: $0.002 USDC
✓ Transaction: 7c2ef38eff2ac7...
✓ Explorer: https://stellar.expert/...
Top stories:
1. "Stellar Network Hits 10M Daily Transactions"
2. "x402 Protocol Sees 300% Growth"
3. "Soroban Smart Contracts Power 40% of DeFi"
x402 Protocol
The x402 protocol enables machine-to-machine micropayments using HTTP 402:
- Agent sends
GET /api/data to a service
- Service responds
402 Payment Required with price and address
- Agent signs and submits a USDC payment on Stellar
- Agent retries the request with payment proof in headers
- Service responds
200 OK with data
Key benefits: No API keys needed (payment IS auth), no subscriptions (pay per request), instant settlement (3-5s on Stellar), on-chain proof for every transaction.
Roadmap
Phase 1: Discovery & Payment ✅
- Natural language category detection
- Policy-based service filtering
- Real USDC micropayments on Stellar testnet
Phase 2: Service Listing
solva_list_service tool for providers
- Automated endpoint validation
- Dynamic registry updates
Phase 3: Platform Economics
- Smart contract for payment splitting
- Daily budget tracking
- Mainnet deployment
Phase 4: Open Marketplace
- Decentralized registry on Soroban
- Provider dashboard & analytics
- Cross-chain support