Skip to content

Document X credits endpoint in the MCP guide - #254

Open
vaulpannx wants to merge 1 commit into
cursor:mainfrom
vaulpannx:pvann/adding-credits-endpoint-documentation
Open

Document X credits endpoint in the MCP guide#254
vaulpannx wants to merge 1 commit into
cursor:mainfrom
vaulpannx:pvann/adding-credits-endpoint-documentation

Conversation

@vaulpannx

@vaulpannx vaulpannx commented Aug 24, 2026

Copy link
Copy Markdown

Summary

  • Teach the X MCP guide to fetch get_usage_credits (GET /2/usage/credits) on connect, at session start when X calls are needed, and when the user asks what they can do.
  • Include the dollar balance and 2–3 fitting ideas in the on-connect capabilities message; suggest work from budget tiers ($0 through $1,000+).
  • If a job would exceed the remaining balance, offer a cheaper alternative and send the user to https://console.x.com.

Test plan

  • Connect the X plugin and confirm the agent fetches credits before the capabilities message, quotes total_balance in dollars, and suggests 2–3 ideas from the matching budget row.
  • Ask “what can I do?” mid-session and confirm it re-fetches the balance before suggesting.
  • With a low balance, ask for a large search/pagination job and confirm it does not run it, offers a cheaper alternative, and points to https://console.x.com.

Made with Cursor

Agents now fetch GET /2/usage/credits on connect and suggest work that fits the user's dollar balance.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant