---
title: "Connect an AI agent to Frontline: CLI, MCP server and REST API"
description: "Install the Frontline CLI, sign in with a personal API key, install the Claude Code skills and create your first object, or use the MCP server or the REST API."
canonical: "https://www.getfrontline.ai/en/agents/connect"
language: "en"
image: "https://cdn.ploy.ai/6eb8e7fc-f32e-4425-a7a1-206f93c19f37/user/0ec72fa8-frontline-social-sharing-preview.webp"
---
# Connect your agent to Frontline

Three ways in, all to the same CRM: the CLI, the MCP server and the REST API. Use the first one your agent supports.

`npm install -g @getfrontline/cli`

## Pick how your agent connects

All three reach the same CRM. Anything a person can do in the app, an agent can do here.

| Path      | Can your agent run commands?CLIClaude CodeCodexCursor                                  | Does it connect to MCP servers?MCP serverClaudeChatGPTCursor              | Writing your own code?REST APIAny language with HTTP                      |
| --------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| Setup     | npm install \-g @getfrontline/clifrontline auth login <api-key>                        | Add Frontline as an MCP server in your client, then approve with OAuth.   | https://prod-api.getfrontline.ai/public/v1Authorization: Bearer <api-key> |
| Best for  | Claude Code, Codex, Cursor and other coding agents                                     | Chat apps and any other MCP client                                        | Your services, scripts and backends                                       |
| Sign-in   | Personal API key, from Settings > Bring your own Agent                                 | OAuth. Access rules by workspace, team and user apply to every tool call. | Personal API key                                                          |
| Covers    | Objects, records, workflows, sequences, campaigns and more, plus 55 Claude Code skills | 200+ tools                                                                | Public API, 1,000 requests a minute per account                           |
| Read next | [CLI setup](#cli)                                                                      | [MCP server setup](#mcp)                                                  | [REST API setup](#api)                                                    |

Can your agent run commands?

### CLI

- Claude Code
- Codex
- Cursor

`npm install -g @getfrontline/cli` `frontline auth login <api-key>`

Best for

Claude Code, Codex, Cursor and other coding agents

Sign-in

Personal API key, from Settings > Bring your own Agent

Covers

Objects, records, workflows, sequences, campaigns and more, plus 55 Claude Code skills

[CLI setup](#cli)

Does it connect to MCP servers?

### MCP server

- Claude
- ChatGPT
- Cursor

Add Frontline as an MCP server in your client, then approve with OAuth.

Best for

Chat apps and any other MCP client

Sign-in

OAuth. Access rules by workspace, team and user apply to every tool call.

Covers

200+ tools

[MCP server setup](#mcp)

Writing your own code?

### REST API

- Any language with HTTP

`https://prod-api.getfrontline.ai/public/v1` `Authorization: Bearer <api-key>`

Best for

Your services, scripts and backends

Sign-in

Personal API key

Covers

Public API, 1,000 requests a minute per account

[REST API setup](#api)

None of these? [Send your user to sign up in the browser](https://app.getfrontline.ai/). No credit card needed.

## Set up the CLI

For Claude Code, Codex, Cursor and any agent that runs shell commands. Every command prints JSON by default.

### Install

Needs Node 18 or later. Adds two commands: frontline for the CRM and max for the personal agent.

`npm install -g @getfrontline/cli`

Expect:frontline and max are on your PATH, and 55 skills are in \~/.claude/skills/.

### Get an API key

Done once, in the browser.

A person does this:In Frontline, click your name (bottom left) > Settings > Bring your own Agent > Create personal API key, then give the key to the agent. It is shown once. No account yet? [Sign up free](https://app.getfrontline.ai/), no credit card needed.

### Sign in

Or set FRONTLINE\_API\_KEY in the environment.

`frontline auth login <api-key>` `frontline auth whoami`

Expect:whoami prints the signed-in user.

### Install the skills

Installing the CLI already does this. Run it again after an update; add --force to overwrite.

`frontline setup --claude-skills`

Expect:55 skills in \~/.claude/skills/, one folder each.

### Read the data model

`frontline object list` `frontline object schema people`

Expect:Standard objects (people, companies, deals, tickets) plus any custom ones marked custom: true, then every field on people.

### Create an object and a field

Schema changes need the key of an admin or owner. The body is strict: unknown keys return 400.

`frontline object create --data '{"name":"installs","displayName":"Installs","fields":[{"name":"title","type":"string","metadata":{"format":"text"}}]}'` `frontline object field create installs --data '{"name":"Install date","type":"dateOnly"}'`

Expect:A new installs object with a title field and an Install date field.

### Create a record

Use the field keys that object schema installs returns.

`frontline object record create installs --data '{"title":"Oakland depot"}'`

Expect:The new record as JSON, with its id.

### Import a CSV

There is no CSV upload command. Convert the file to a JSON array with the same field keys, then create the records in one call.

`frontline object record bulk-create installs --data "$(cat installs.json)"`

Expect:One new record for each row.

### Find it again

`frontline object record list installs --search "Oakland"`

Expect:The Oakland depot record.

### Everything else

Relations, views, workflows, sequences, campaigns, agents and Max.

The CLI reference lists every command and flag, one page per command group.

[CLI reference](https://docs.getfrontline.ai/cli)[Skills](https://www.getfrontline.ai/en/agents/skills)

## Use the MCP server

For Claude, ChatGPT, Cursor, Codex and any other MCP client. 200+ tools over the same CRM.

### Sign in with OAuth

No API key to paste.

A person does this:Add Frontline in your MCP client's connector settings, then approve the connection in the browser. From then on, every tool call runs as you.

### Access follows your rules

Set in Frontline under AI governance.

Admins give full access, read only or no access, by workspace, team and user. A call outside those rules is blocked, and every call shows in the connector logs.

### Then just ask

The client picks the tools.

- Add a Kanban board for installs, grouped by status.
- Which deals over $10,000 have not moved in two weeks?
- Log today's call with Maya Chen and set a follow-up for Friday.

No MCP client and no terminal? [Send your user to sign up in the browser](https://app.getfrontline.ai/). No credit card needed.

## Call the REST API

For your own services, scripts and backends, in any language with HTTP.

### Base URL and header

Uses the same personal API key as the CLI.

### Make a first call

`curl https://prod-api.getfrontline.ai/public/v1/objects -H "Authorization: Bearer $FRONTLINE_API_KEY"`

Expect:A JSON list of the workspace's objects.

### Use a user key to write

Two kinds of key.

An account key reads general endpoints. Writes and the objects endpoints need a user key, which acts as that person.

### Limits and reference

1,000 requests a minute per account. The OpenAPI reference covers every endpoint.

[API reference](https://docs.getfrontline.ai/reference/openapi)

[Check prices and limits](https://www.getfrontline.ai/en/agents/evaluate)

## Give your agent a CRM

[Start free](https://app.getfrontline.ai/)[Book a demo](https://cal.com/team/getfrontline/30-min-frontline)
