generateText or streamText. Keyless, no custom code.
Install
The AI SDK moves quickly. These snippets were verified against
ai@7.0.40 and @ai-sdk/mcp@2.0.18; pin those versions, or check the current AI SDK MCP docs if the API has shifted.Connect and get the tools
Use them in a generation
mcp.close() when you are done so the connection is released. Swap in any AI SDK model provider you prefer.
Tools and the rationale field
The client returns all 17 DexPaprika tools: networks, pools, tokens, OHLCV, transactions, and cross-chain search. See the MCP tools reference for the full list. Every read tool takes a requiredrationale string. It is part of each tool’s schema, so a capable model fills it automatically. If a smaller model omits it and errors, add a system instruction telling it to include a short rationale.
Resources
FAQs
Do I need an API key for DexPaprika?
Do I need an API key for DexPaprika?
No. The hosted server is keyless for read access. You still need a key for your model provider (Anthropic, OpenAI, and so on). A free registered DexPaprika key or Pro plan raises your rate and monthly quota; see rate limits.
Which transport does the AI SDK use?
Which transport does the AI SDK use?
Streamable HTTP:
https://mcp.dexpaprika.com/streamable-http. The server also serves SSE if you configure the client for it.Do I have to define the tools myself?
Do I have to define the tools myself?
No.
mcp.tools() discovers all 17 tools from the server and returns them in the AI SDK tool shape.