OperateMCP for agents

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)

  1. Register the client with POST /api/v1/oauth/register.
  2. Send the human through GET /api/v1/oauth/authorize with PKCE.
  3. They approve the scopes on /agents/approve.
  4. Exchange the code at POST /api/v1/oauth/token.
  5. Call POST /api/v1/mcp with the bearer token and keep the Mcp-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

JobTools
Searchsearch_submit, search_status, search_result
Marketlist_coins, market_klines
Accountquota_status, agent_capabilities
Patternscatalog_list, catalog_save
Analyticsanalytics_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.json with {"mcpServers":{"dejabars":{"url":"…/v1/mcp"}}}.

The full setup, including the consent screens, is on the MCP page.

Verify a call

Open the interactive reference and run the operation with your key.

Open the playground →