API, CLI and MCP
The same actions are available three ways: the REST API directly, the CLI, and the MCP server for Claude and other agents. This is the map between them.
Why the names differ#
They are not three spellings of one scheme — each surface follows the convention its callers expect. An agent picks a tool by reading its name, so MCP tools are verb-first and self-describing (get_credit_balance). A CLI groups subcommands under a noun so related work sits together (cornect export create, … status, … download). REST addresses resources by path (GET /credits).
Renaming any of them to match the others would break published agent configurations and shipped scripts to buy consistency a table provides for free. So: the table.
The map#
| Action | REST | MCP tool | CLI |
|---|---|---|---|
| Search companies | POST /companies/search | search_companies | cornect search |
| Count matches exactly | POST /companies/counts | count_companies | cornect count |
| Get one company | GET /companies/{company_id} | get_company | cornect company get |
| List a company's job postings REST only for now — a CLI command and an MCP tool are planned. | GET /companies/{company_id}/job-postings | — | — |
| Check credit balance | GET /credits | get_credit_balance | cornect credits |
| Price an export before paying | POST /exports/preview | preview_export | cornect export preview |
| Create an export | POST /exports | create_export | cornect export create |
| Check export status | GET /exports/{export_id} | get_export_status | cornect export status |
| Get a download link | POST /exports/{export_id}/download | download_export | cornect export download |
Not every action exists everywhere. Where a cell is empty the action is reachable through the REST API and the others have not caught up — shown rather than omitted, so a gap is something you can see instead of something you discover.
Which one to use#
REST when you are building software against Cornect. CLI for scripts, CI and one-off work from a terminal — every command speaks JSON and CSV. MCP when you want Claude to do the work for you. All three authenticate with the same cornect_ token and spend credits identically: searching and counting are free, exports charge per new company.