New to MCP? Start with our 5-Minute Quickstart to build and deploy your first server, then come back here for advanced features.
Overview
Want to earn revenue from your data? Turn the insights people pay $500/year for into $0.10/response revenue you keep. Build an MCP server and register it as an MCP Tool on the Context marketplace.AI-Assisted Builder (TL;DR)
Have an API subscription you want to unbundle? Use Cursor, Claude, or any AI coding agent to build your MCP server automatically.Two-Step Workflow
Build the MCP Server
Use the MCP Builder Template as a system prompt to:
- Fetch API docs via Context7 and discover all endpoints
- Design โgiga-brainedโ intelligence tools (not just API passthroughs)
- Generate complete schemas with
outputSchema - Implement the full MCP server
Generate Submission Details
Once your server is built, use the MCP Server Analysis Prompt to:
- Analyze your MCP server implementation
- Generate the perfect submission details for the marketplace form
- Get suggested name, description, category, and pricing
Example Prompt for Cursor/Claude
Earnings Model: You earn 90% of every response fee. Set your price (e.g., $0.01/response) and get paid in USDC instantly every time an Agent calls your tool.
Step 1: Build a Standard MCP Server
Use the official@modelcontextprotocol/sdk to build your server, plus @ctxprotocol/sdk to secure your endpoint.
Install Dependencies
Implement Structured Output
Secure Your Endpoint
Add Contextโs middleware to verify that requests are legitimate:Returning Images from Tools
If your tool generates charts, heatmaps, screenshots, or other visual content, you are responsible for hosting the images and returning URLs that the AI can reference.Recommended: Return Image URLs
Why You Should Host Images
- No database bloat โ URLs are small strings; base64 images are 100x larger
- Faster responses โ No large payloads to transfer
- Standard web pattern โ This is how Slack, Discord, and every major chat platform works
- You control caching โ Set your own CDN caching policies
- You control availability โ Your images, your infrastructure, your reliability
Image Hosting Options
| Option | Best For |
|---|---|
| Your existing CDN | If you already have infrastructure |
| Cloud storage (S3, GCS, Azure Blob) | Pre-signed URLs for generated content |
| Vercel Blob / Cloudflare R2 | Simple, cheap storage for generated images |
| Imgix / Cloudinary | Image transformation and optimization |
Output Schema for Image Tools
Free vs Paid Security Requirements:
If youโre building a free tool, you can skip the middleware entirely. However, if you ever want to charge for your tool, youโll need to add it.
| Tool Type | Security Middleware | Rationale |
|---|---|---|
| Free Tools ($0.00) | Optional | Great for distribution and adoption โ anyone can call your endpoint |
| Paid Tools ($0.01+) | Mandatory | We cannot route payments to insecure endpoints |
MCP Security Model
| MCP Method | Auth Required | Why |
|---|---|---|
initialize | โ No | Session setup |
tools/list | โ No | Discovery - agents need to see your schemas |
resources/list | โ No | Discovery |
prompts/list | โ No | Discovery |
tools/call | โ Yes | Execution - costs money, runs your code |
This means:
- Anyone can call
/mcpwithinitializeortools/listto discover your tools - Only requests with a valid Context Protocol JWT can call
tools/call - The middleware handles this automatically - you donโt need to implement it yourself
Step 2: Test Your Tool Locally
Before deploying, ensure your server works as expected. You can use the official MCP Inspector orcurl to test your tool locally.
Using Curl
Step 3: Deploy Your Server
Your server needs to be publicly accessible. We support both transport methods:| Transport | URL Format | Recommendation |
|---|---|---|
| HTTP Streaming | https://your-server.com/mcp | โ Recommended |
| SSE (Server-Sent Events) | https://your-server.com/sse | Supported |
Step 3: Register in the App
Step 4: Set a Price
Choose your fee per response:| Price | Use Case |
|---|---|
| $0.00 | Free tools (great for adoption and visibility) |
| $0.01+ | Paid tools (earn revenue per response) |
This fee is paid once per chat turn. The Agent can call your skills up to 100 times within that single paid turn via
callMcpSkill().Step 5: Stake USDC
All tools require a minimum USDC stake, enforced on-chain.| Tool Type | Minimum Stake |
|---|---|
| Free Tools | $10 USDC |
| Paid Tools | $10 USDC or 100ร response price (whichever is higher) |
Stakes are fully refundable with a 7-day withdrawal delay. This creates accountability and enables slashing for fraud.
Step 6: Youโre Live! ๐
Your MCP Tool is now instantly available on the decentralized marketplace. Users can discover it via search, and AI agents can autonomously purchase and use your tool.Updating Your Tool
When you add new endpoints, modify schemas, or change your toolโs functionality:Refresh Skills on Context
- Go to ctxprotocol.com/developer/tools โ Developer Tools (My Tools)
- Find your tool and click โRefresh Skillsโ
- Context re-calls
listTools()to discover changes
Update Description (if needed)
If youโve added significant new tools, update your description:
- Use the MCP Server Analysis Prompt to generate a new description
- Edit your tool in the Developer Tools page
Schema Accuracy & Dispute Resolution
Context uses automated schema validation as part of our crypto-native dispute resolution system:- Users can dispute tool outputs by providing their
transaction_hash(proof of payment) - Robot judge auto-adjudicates by validating your actual output against your declared
outputSchema - If schema mismatches, the dispute is resolved against you automatically
- Repeated violations (5+ flags) lead to tool deactivation
Example: Schema Compliance
Execution Limits & Product Design
Where the Timeout Comes From
The timeout is enforced by the platform infrastructure (and in standard MCP setups like Claude Desktop, by the LLM client itself). When your tool is called, the system waits for a response โ if it doesnโt arrive in ~60 seconds, execution fails.This isnโt an MCP protocol limitation โ SSE connections can stay open indefinitely. The timeout exists at the application layer (LLM clients, API gateways, platform infrastructure) and serves as a quality forcing function.
Why the Timeout Is Actually Good
The timeout isnโt a bug โ itโs a feature that forces data brokers to build actual products instead of raw data access.| Raw Access (โ Bad Product) | Data Broker Product (โ Good Product) |
|---|---|
| โRun any SQL on Dune" | "Smart Money Wallet Tracker" |
| "Query 4 years of NFT data" | "NFT Alpha Signals" |
| "Scan all whale wallets" | "Whale Alert Feedโ |
| Timeout after 60s โ | Instant response โ |
The reframe: The best data businesses donโt sell raw database access. They sell curated, pre-computed insights. This is exactly how Bloomberg, Nansen, Arkham, and Messari work.
The Data Broker Architecture
Product Tiers
Tier 1: Real-time Queries (< 60s)
Tier 1: Real-time Queries (< 60s)
Perfect for MCP โ works great today:
- Current prices, recent trades, portfolio snapshots
- โWhatโs in Vitalikโs wallet right now?โ
- โGet current gas prices on Ethereumโ
Tier 2: Pre-computed Insights (instant)
Tier 2: Pre-computed Insights (instant)
This is the REAL product โ where data brokers add massive value:
- โSmart money walletsโ (pre-computed daily)
- โWhale alertsโ (pre-computed hourly)
- โNFT trending collectionsโ (pre-computed)
What if my analysis takes longer than 60 seconds?
What if my analysis takes longer than 60 seconds?
If your computation canโt complete in 60 seconds, you need to pre-compute it.This is by design. The timeout forces you to build a data product, not raw data access:
The pattern: Run your heavy analysis offline (cron jobs, scheduled tasks), store the results in your own database, and serve them instantly through your MCP tool.This is exactly how Bloomberg, Nansen, and Arkham work โ the value is in the curation and pre-computation, not raw data access.
| Instead ofโฆ | Build thisโฆ |
|---|---|
| โScan all whale walletsโ (10 min) | โPre-computed whale alertsโ (instant) |
| โAnalyze 4 years of NFT dataโ (30 min) | โDaily top-mover rankingsโ (instant) |
| โRun complex ML modelโ (5 min) | โPre-scored predictions updated hourlyโ (instant) |
Example: Good vs Bad Tool Design
Why This Is BETTER for the Marketplace
| Raw SQL Model | Data Broker Product Model |
|---|---|
| Anyone can build (no moat) | Requires expertise (defensible) |
| Competes on price (race to bottom) | Competes on quality (premium pricing) |
| Users frustrated by timeouts | Users delighted by instant results |
| Data broker adds no value | Data broker adds massive value |
Complete Server Example
Hereโs a full working example of an MCP server ready for Context:Advanced: User Actions (Handshakes)
Need your tool to execute transactions or get user signatures? Use the Handshake Architecture:Handshake Architecture Guide
Full guide: signatures, transactions, OAuth flows
Example Servers
Check out these complete working examples:TypeScript (Express + MCP SDK)
Blocknative
Gas price API (3 tools)
Hyperliquid
DeFi analytics (16+ tools, includes handshake example)
Polymarket
Prediction market intelligence

