# EnforcedFlow — how to use (mcp.ai)

Connect your EnforcedFlow account and use 5 tools for sales and CRM straight from your AI agent. Connect with your own API key. EnforcedFlow routes work across teams with configurable advanced round-robin groups, agent criteria, availability, and email assignments.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_enforcedflow?ms=1787295900000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `enforcedflow_get_group_fields`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/enforcedflow`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/enforcedflow/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/enforcedflow/get/group/fields` — Get detailed routing-field configuration and metadata field names for one round-robin group.
  - body: { group_id: integer }
- `POST https://api.mcp.ai/api/enforcedflow/list/group/agents` — List agents in a round-robin group, optionally filtering by active status, with metadata and configured field values.
  - body: { active?: boolean, group_id: integer }
- `POST https://api.mcp.ai/api/enforcedflow/list/groups` — List round-robin groups accessible to the connected account, including group IDs and summary routing-field requirements.
- `POST https://api.mcp.ai/api/enforcedflow/select/next/agent` — Select the next available agent for a round-robin group using optional configured criteria. This advances the group's round-robin routing state and may consume one routing request from the account's m
  - body: { criteria?: object, group_id: integer }
- `POST https://api.mcp.ai/api/enforcedflow/upsert/group/agent` — Update the first agent matching a filter, or create an agent when the filter matches none. A missing or empty filter always creates an agent. Use a precise, stable filter because any filter miss takes
  - body: { data: object, filter?: object, group_id: integer }

## Example prompts
- "What can I do in EnforcedFlow?"
- "Show me a summary of my EnforcedFlow account"

## More
- Page: https://mcp.ai/enforcedflow
- Agent spec (llms.txt): https://mcp.ai/enforcedflow/llms.txt
- Postman collection: https://mcp.ai/enforcedflow/postman.json
