For developers

Use the Vestream API in Cursor: Docs, MCP and a Project Rule

Set up Cursor to write correct Vestream API code: add our docs with @Docs, connect the MCP server, and add a project rule that keeps your key server-side.

·5 min read·By Non Fungible Howard

Cursor writes better code when it knows the API it's calling. Three short steps teach it the Vestream API: its docs, live data through the MCP server, and a rule for the parts AI tools often get wrong. Each takes a minute.

1. Add the docs with @Docs

  1. 1In Cursor's chat, type @Docs and choose Add new doc.
  2. 2Enter https://www.vestream.io/developers/docs as the entry URL. It links to every endpoint page, which is what Cursor crawls from.
  3. 3Name it Vestream. When indexing finishes, check that it appears in the @Docs list; you manage it under Cursor Settings → Docs.

Now start a request with @Vestream and Cursor reads the docs before writing code. If indexing ever struggles, our whole developer documentation is also published as one text file at vestream.io/llms-full.txt; adding the docs page above is the more reliable route in Cursor.

2. Connect the MCP server

The MCP server lets Cursor's agent query live data while it works: "what does this endpoint return for a real token?" gets a real answer. Add the hosted server to .cursor/mcp.json in your project (or your global Cursor MCP settings):

json
{
  "mcpServers": {
    "vestream": {
      "url": "https://www.vestream.io/mcp",
      "headers": { "Authorization": "Bearer vstr_live_YOUR_KEY" }
    }
  }
}

Get a free key at vestream.io/build. Keep .cursor/mcp.json out of git if it holds your key, or use the npm package instead, which reads the key from an environment variable (setup in our MCP guide). Each tool call counts as one API call.

3. Add a project rule

AI tools make the same few mistakes with crypto APIs: calling them from the browser, showing raw amounts with 18 extra zeros, treating a missing price as zero. A project rule fixes that once. Save this as .cursor/rules/vestream.mdc:

markdown
---
description: How to call the Vestream token vesting API
alwaysApply: true
---

- Base URL: https://www.vestream.io/api/v1. Docs: @Vestream.
- Call the API only from server-side code (API routes, server functions, scripts).
  Never from browser code: the key would be public, and the API refuses
  cross-site browser calls.
- Read the key from the VESTREAM_API_KEY environment variable or secret.
  Send it as the header "Authorization: Bearer <key>". Never hard-code it.
- Amounts are strings in raw units: divide by 10 ** token_decimals (use BigInt
  or a decimal library for large values) before showing them.
- usd_value, supply_share and pressure ratios can be null: show "unknown" or
  a dash, never 0.
- A wallet response with coverage.complete = false has sources we couldn't
  check: show coverage.note, and don't treat an empty list as "no vestings".
- Cache responses (10 minutes is fine): the free plan is 50 calls a day.
- On 429, read the error message: it names the limit (per minute, day or month).

Try it

With all three in place, ask Cursor something like:

text
@Vestream Build a Next.js page that shows a token's locked supply, what the team can cancel and its next unlock, from GET /token/{chainId}/{address}/summary. Put the call in a Route Handler.

More starting points are in the prompt gallery.

Frequently Asked Questions

Do I need all three?

No. @Docs alone makes the code correct; MCP adds live data while Cursor works; the rule stops the common mistakes. Together they mean you rarely have to fix anything by hand.

Does MCP use my API calls?

Yes, each tool call is one API call, the same as calling the endpoint. The free plan is 250 calls a month and 50 a day.

Does this work in other editors?

The MCP server works in any MCP client, including Claude Code, Windsurf and VS Code. The rule's content works as a system prompt or instructions file anywhere.

Track your own token vesting

Paste any wallet, see every unlock across 13 protocols and 13 chains. Free, no sign-up.

Build with the same data

A free API key and MCP server for token vesting, lock and unlock data across every protocol we index.

Get a free API key →

Read the developer docs

More from Vestream Resources