Skip to main content
Glama
floGPT MCP server

floGPT MCP server

Official
README.md
# floGPT MCP server

**floGPT** is a product of [Pulse Real LLC](https://flogpt.com).

[![npm](https://img.shields.io/npm/v/@flogpt/mcp)](https://www.npmjs.com/package/@flogpt/mcp)

An [MCP](https://modelcontextprotocol.io) server and CLI for the
[floGPT](https://flogpt.com) public API. Connect an AI assistant to your floGPT
workspace to manage voice agents, read call transcripts, work CRM contacts and
tickets, update knowledge bases and run outbound calling.

36 tools, 6 skills served as MCP prompts, and three read-only resources.
Version 1.1.2.

- **`flogpt-mcp`** is the stdio server, for clients that start a local process:
  Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Codex, Zed.
- **`flogpt-mcp-http`** is the Streamable HTTP server. floGPT hosts it at
  `https://api.flogpt.com/mcp` for clients that cannot start a process, such as
  ChatGPT and Claude on the web.
- **`flogpt`** is a CLI that exposes the same tools as terminal commands.

## Get an API key

In floGPT, open **Settings → API Keys** and create an organization key. Grant
only the scopes the assistant needs. Keys start with `fg_live_` or `fg_test_`.

| Variable | Required | Purpose |
| --- | --- | --- |
| `FLOGPT_API_KEY` | yes | Organization API key. |
| `FLOGPT_API_URL` | no | API base URL. Defaults to `https://api.flogpt.com`; set it only for self-hosted or staging deployments. |

## Install

Requires Node.js 22 or later. Every client below runs the published npm
package with `npx`, so there is nothing to install first.

### Claude Desktop

Add this to `claude_desktop_config.json` (macOS:
`~/Library/Application Support/Claude/claude_desktop_config.json`, Windows:
`%APPDATA%\Claude\claude_desktop_config.json`), then restart Claude Desktop:

```json
{
  "mcpServers": {
    "flogpt": {
      "command": "npx",
      "args": ["-y", "@flogpt/mcp"],
      "env": { "FLOGPT_API_KEY": "fg_live_your_key_here" }
    }
  }
}
```

### Cursor

Add the same `mcpServers` block to `~/.cursor/mcp.json` (all projects) or
`.cursor/mcp.json` (one project).

### Claude Code

```bash
claude mcp add flogpt --env FLOGPT_API_KEY=fg_live_your_key_here -- npx -y @flogpt/mcp
```

### VS Code (Copilot)

Add to `.vscode/mcp.json`:

```json
{
  "servers": {
    "flogpt": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@flogpt/mcp"],
      "env": { "FLOGPT_API_KEY": "fg_live_your_key_here" }
    }
  }
}
```

### Windsurf, Zed, Cline and other `mcpServers` clients

Use the Claude Desktop JSON block above in that client's MCP config file
(Windsurf: `~/.codeium/windsurf/mcp_config.json`).

### Codex

Add to `~/.codex/config.toml`:

```toml
[mcp_servers.flogpt]
command = "npx"
args = ["-y", "@flogpt/mcp"]
env = { FLOGPT_API_KEY = "fg_live_your_key_here" }
```

### Remote (hosted) server

Clients that take a URL connect to `https://api.flogpt.com/mcp`. Authenticate
with the API key as a bearer token (`Authorization: Bearer fg_live_...`) or
through OAuth, which the server advertises at
`https://api.flogpt.com/.well-known/oauth-protected-resource/mcp`.

The two transports have different threat models. With stdio, the client starts
the process and talks over pipes, so the key never leaves your machine. With
the hosted server, the key goes to floGPT's server, which stores nothing and
acts only under that key. Give remote keys narrower scopes.

### Docker

The image runs the Streamable HTTP server on port 8787 and holds no credential
of its own. Each request carries the caller's key.

```bash
docker build -t flogpt-mcp .
docker run --rm -p 8787:8787 flogpt-mcp
curl http://localhost:8787/healthz
```

To run the stdio server from the same image instead:

```bash
docker run --rm -i -e FLOGPT_API_KEY=fg_live_your_key_here flogpt-mcp node src/mcpServer.js
```

## Tools

This table is generated from the tool catalogue in `src/tools.js`.
**Access** shows what a call can do: *read* only reads. *write* changes data
in your workspace, and *destructive* overwrites configuration, removes records
or places a real phone call.

| Tool | What it does | Scope | Access |
| --- | --- | --- | --- |
| `flogpt_whoami` | Show which organization this API key belongs to and what it can do. | none — /me is deliberately scope-free | read |
| `flogpt_get_organization` | Read the organization's configuration. | `org_settings:read` | read |
| `flogpt_list_chat_widgets` | List the chat widgets in this workspace. | `widgets:read` | read |
| `flogpt_list_call_widgets` | List the voice agents in this workspace. | `call_widgets:read` | read |
| `flogpt_get_call_widget` | Read one voice agent's full configuration. | `call_widgets:read` | read |
| `flogpt_update_call_widget` | Change a voice agent's configuration. | `call_widgets:write` | destructive |
| `flogpt_test_call_widget` | Place a test call from a voice agent. | `call_widgets:write` | destructive |
| `flogpt_list_call_logs` | List recent calls, with filters. | `calls:read` | read |
| `flogpt_get_call_log` | Read one call in full, including its transcript. | `calls:read` | read |
| `flogpt_reinitiate_call` | Retry a campaign call that did not connect. | `calls:write` | destructive |
| `flogpt_list_conversations` | List chat conversations. | `conversations:read` | read |
| `flogpt_get_conversation_messages` | Read the full message history of one chat conversation. | `conversations:read` | read |
| `flogpt_list_knowledge_bases` | List knowledge bases. | `knowledge:read` | read |
| `flogpt_add_knowledge_document` | Add a document to a knowledge base. | `knowledge:write` | write |
| `flogpt_sync_knowledge_base` | Re-embed a knowledge base. | `knowledge:write` | write |
| `flogpt_find_contact` | Find a CRM contact by phone, email or name. | `crm:read` | read |
| `flogpt_get_contact_activity` | Read one contact's full interaction history. | `crm:read` | read |
| `flogpt_upsert_contact` | Create or update a CRM contact. | `crm:write` | write |
| `flogpt_list_tickets` | List CRM tickets. | `crm:read` | read |
| `flogpt_get_ticket` | Read one ticket in full. | `crm:read` | read |
| `flogpt_create_ticket` | Open a CRM ticket. | `crm:write` | write |
| `flogpt_transition_ticket` | Move a ticket through its lifecycle. | `crm:write` | destructive |
| `flogpt_add_ticket_note` | Add an internal note to a ticket. | `crm:write` | write |
| `flogpt_list_outbound_triggers` | List outbound call triggers. | `outbound_triggers:read` | read |
| `flogpt_list_outbound_trigger_templates` | List the available outbound trigger templates. | `outbound_triggers:read` | read |
| `flogpt_fire_outbound_trigger` | Fire an outbound trigger at one number. | `outbound_triggers:write` | destructive |
| `flogpt_set_outbound_trigger_enabled` | Enable or disable an outbound trigger. | `outbound_triggers:write` | write |
| `flogpt_list_phone_numbers` | List phone numbers and what answers them. | `call_widgets:read` | read |
| `flogpt_link_phone_number` | Point a phone number at a voice agent. | `call_widgets:write` | destructive |
| `flogpt_list_data_collections` | List data collections. | `data_collections:read` | read |
| `flogpt_list_data_collection_leads` | Read the rows of a data collection. | `data_collections:read` | read |
| `flogpt_add_data_collection_leads` | Add rows to a data collection. | `data_collections:write` | write |
| `flogpt_get_analytics` | Read workspace analytics for a period. | `analytics:read` | read |
| `flogpt_get_crm_analytics` | Read CRM analytics for a period. | `analytics:read` | read |
| `flogpt_list_webhook_subscriptions` | List event webhook subscriptions. | `webhooks:read` | read |
| `flogpt_request` | Call any floGPT API endpoint directly. | varies by endpoint | destructive |

Three tools make a real phone call: `flogpt_test_call_widget`,
`flogpt_fire_outbound_trigger` and `flogpt_reinitiate_call`. Firing a trigger
supports `dryRun`. `flogpt_update_call_widget` edits the agent's draft, so if
the agent has a pinned production version, callers keep hearing that version
until it is published.

Endpoints without a dedicated tool stay reachable through `flogpt_request`. The
full endpoint list is in the `flogpt://openapi` resource and at
`https://api.flogpt.com/api/v1/openapi.json`.

### Errors

- **403** means the key is missing a scope. The error names the scope; add it in
  Settings → API Keys.
- **429** means that key's rate limit is used up. Limits are per key.

## Resources

| URI | Contents |
| --- | --- |
| `flogpt://openapi` | The OpenAPI document for `/api/v1`. |
| `flogpt://me` | The organization and scopes of the current key. |
| `flogpt://organization` | Workspace settings. Requires `org_settings:read`. |

## Skills (prompts)

Playbooks for common jobs, served as MCP prompts and as `SKILL.md` files in
`skills/`.

| Prompt | Use it when |
| --- | --- |
| `flogpt-call-triage` | Diagnose why floGPT voice calls are failing or going badly — find the affected calls, read their transcripts, and classify the failure into a cause that has a fix. |
| `flogpt-knowledge-gaps` | Find what floGPT agents could not answer and close the gap — mine call transcripts and chat conversations for unanswered questions, then add knowledge documents and confirm they become searchable. |
| `flogpt-outbound-campaign` | Set up, dry-run and launch floGPT outbound calling — load a lead list into a data collection, wire an outbound trigger, and fire it safely. |
| `flogpt-ticket-triage` | Work a floGPT CRM ticket queue — find what needs attention, pull the customer's history, and move tickets through their real lifecycle states. |
| `flogpt-voice-agent-tuning` | Improve a floGPT voice agent's behaviour by mining its real transcripts and revising its prompt, welcome message or script. |
| `flogpt-workspace-audit` | Health-check a floGPT workspace end to end — agents, numbers, knowledge, triggers, webhooks and the API key's own scopes — and report what is misconfigured or unreachable. |

## CLI

```bash
export FLOGPT_API_KEY=fg_live_...
npx -y -p @flogpt/mcp flogpt help          # every command
npx -y -p @flogpt/mcp flogpt whoami        # which organization, which scopes
npx -y -p @flogpt/mcp flogpt call-logs --status failed --limit 20 --table
```

## Development

```bash
npm ci
npm test
npm run mcp        # stdio server
npm run mcp:http   # HTTP server on :8787
```

This repository is a read-only mirror, exported automatically from floGPT's
main repository on each release. Report problems in
[Issues](../../issues) or to support@flogpt.com.

## Links

- Documentation: https://flogpt.com/docs/manual/setup#connecting-an-ai-assistant-mcp
- MCP Registry: `io.github.VistaDigit/flogpt`
- Privacy policy: https://flogpt.com/privacy
- Terms: https://flogpt.com/terms

## License

MIT. See [LICENSE](LICENSE).