MCP for agents
Connect ChatGPT, Claude or Cursor and map tools to jobs.
MCP lets an AI host call the same engine without writing HTTP code. The endpoint is:
https://dejabars.com/api/v1/mcp
The manifest at https://dejabars.com/.well-known/mcp.json lists the tools, the scopes
and the authorization servers. A host that supports OAuth discovers everything from it.
Two ways to connect
A registered app (hosted chats)
- Register the client with
POST /api/v1/oauth/register. - Send the human through
GET /api/v1/oauth/authorizewith PKCE. - They approve the scopes on
/agents/approve. - Exchange the code at
POST /api/v1/oauth/token. - Call
POST /api/v1/mcpwith the bearer token and keep theMcp-Session-Id.
A device flow (local tools)
curl -s -X POST https://dejabars.com/api/v1/oauth/device_authorization \
-H 'Content-Type: application/json' \
-d '{"client_name":"My CLI","scopes":["search:run","analytics:read"]}'
Show the user_code and verification_uri, then poll POST /oauth/token with
grant_type=urn:ietf:params:oauth:grant-type:device_code until it returns a token.
Tools by job
| Job | Tools |
|---|---|
| Search | search_submit, search_status, search_result |
| Market | list_coins, market_klines |
| Account | quota_status, agent_capabilities |
| Patterns | catalog_list, catalog_save |
| Analytics | analytics_schema, analytics_report, analytics_quote, analytics_run, analytics_config_* |
Market data is available to an MCP session only. The direct API refuses an API key on
/coins, /klines, /series, /segment and /data-status; the handbook's REST surface
does not sell a candle feed.
Every tool returns the same envelope: status, data, cost, quota_remaining,
errors[], request_id, next_cursor. search_status and search_result also return a
report_url for a human to open.
Scopes
search:run submit and read searches
catalog:read list saved patterns
catalog:write save patterns (opt-in)
analytics:read read the schema and defaults
analytics:write save configs and run paid analyses (opt-in)
Approve the narrowest set. A tool outside the session's scopes returns
insufficient_scope. Revoke a session on /agents and approve a new one when the scope
must change.
Spend
Each agent session has its own ceiling. quota_status reports the account balance;
spend_cap_exceeded means the session reached its limit. Revoke and re-approve to continue.
Hosts
- ChatGPT: Settings → Connectors → create with the MCP URL.
- Claude: Settings → Connectors → Add custom connector.
- Cursor:
.cursor/mcp.jsonwith{"mcpServers":{"dejabars":{"url":"…/v1/mcp"}}}.
The full setup, including the consent screens, is on the MCP page.
Open the interactive reference and run the operation with your key.
