> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nixflex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Codex to Nixflex with MCP

> Configure the Nixflex MCP server in Codex without saving a key in TOML. Verify a read and try five prompts for agents, knowledge, calls, booking and usage.

**FIXED · platform** Raw HTTP base URL: `https://api.nixflex.com/v1`. Node and Python SDK base URL: `https://api.nixflex.com`. The SDK adds `/v1`. Keep the credential on your server.

**NOT OFFERED → do this instead · platform** There is one public API: `https://api.nixflex.com/v1`. There is no sandbox. Test with your own number on production. Use local fixtures when you do not need a real call or text.

**YOU CAN CHANGE · account** Rotate the credential and update its callers together.

**SCOPE · account** A platform uses one Nixflex account for all its businesses, with one agent per business or a shared agent. Separate accounts only when businesses sign up themselves. No platform account-creation loop. Sub-accounts are not offered. Authorise each tenant on your server.

In Help choose New request for a capacity review, complaint or problem, abuse report, or other issue. Follow Your open chats. Owners and Admins see organisation tickets. Members see their own while authorised. Close chat removes it from the open list. A staff-closed chat can surface until its final reply is read. `POST /v1/support/tickets/chat-summary` is a read. Use watch\_ticket to check a displayed ticket outside the current page.

Use /v1/support/tickets. A personal session sends X-Nixflex-Expected-Account with the original workspace’s public key\_id for list, detail, chat-summary, writes and receipt lookup. Organisation keys select their own account. On 409 account\_changed, discard the stale draft and refresh Help in the intended workspace.

Create, reply and solve each need an Idempotency-Key. Reply uses X-Expected-Revision. Solve sends version in JSON. Lost response? The original person can `GET /v1/support/tickets/requests/{request_key}` with the original account header. A 200 returns the current ticket and original receipt. 404 means missing or inaccessible. Never resend in a different workspace. Organisation keys can replay only the identical write with its key, body and revision.

[Read the compact AI rules](https://docs.nixflex.com/ai-rules.md#account-access)

Connect Codex to a local Nixflex MCP process using a privately supplied organisation key.

Building an app? [Developer version](https://docs.nixflex.com/sdks/mcp.md).

Connection: **Local Node process** · Configuration: **Your MCP settings** · Tools: **97** · Secrets: **Private environment**

**The important part**

* Use MCP 0.5.0 or later. It exposes 97 tools.
* Keep the organisation key private. It gives account authority and does not inherit a Member’s dashboard restrictions.
* Approve the exact recipients and changes before actions that call, text, change settings or spend credit.
* Check an uncertain write before repeating it. Keep a saved call request ID and its exact inputs together.

## See how it works

Illustrative conversation between colleagues.

**Owner**\
Draft a new reception agent and show its settings first.**Codex**\
I will read the existing agent list, then prepare the proposed instructions.**Owner**\
Wait for approval before create\_agent, and do not attach a number or make a call.

## Connect

1. [Set up the MCP server](https://docs.nixflex.com/ai-tools/overview.md#install-the-mcp-server) with Node 22 or later.
2. Provide `NIXFLEX_API_KEY` privately in the environment used to launch Codex. Never ask Codex to read the key or put its value in a chat, command argument or TOML file.
3. Add this server to `~/.codex/config.toml`, preserving existing settings. The example below uses npx; on Windows, use the command and arguments shown after it.
4. Restart Codex from the prepared environment. Use `codex mcp list` or `/mcp` to inspect the connection and tools.
5. Run the read-only prompt below and approve only that action.

```toml theme={"dark"}
[mcp_servers.nixflex]
command = "npx"
args = ["-y", "nixflex-mcp"]
startup_timeout_sec = 30
env_vars = ["NIXFLEX_API_KEY", "NIXFLEX_BASE_URL"]

[mcp_servers.nixflex.env]
NIXFLEX_BASE_URL = "https://api.nixflex.com"
NIXFLEX_CREDENTIAL_SOURCE = "environment"
```

On Windows, replace `command` with `"cmd.exe"` and `args` with `["/c", "npx", "-y", "nixflex-mcp"]`.

The API address is fixed in the `env` table. The `env_vars` names forward available values from the launching environment; they are not the values themselves. Ensure npx is available to the client process; use its full executable path if required. See the current [Codex MCP configuration guide](https://learn.chatgpt.com/docs/extend/mcp) for local server options. Hosted chats do not automatically read your local configuration.

### Optional private number-credential updates

For `update_phone_number_credentials`, privately provide the pair for the number's current carrier to the environment that launches Codex. Replace the existing `env_vars` line inside `[mcp_servers.nixflex]`, before `[mcp_servers.nixflex.env]`, with **one** of these choices. These are variable names only; never write their values in TOML or ask Codex to read them.

```toml Twilio theme={"dark"}
env_vars = ["NIXFLEX_API_KEY", "NIXFLEX_BASE_URL", "NIXFLEX_TWILIO_SID", "NIXFLEX_TWILIO_TOKEN"]
```

```toml Telnyx theme={"dark"}
env_vars = ["NIXFLEX_API_KEY", "NIXFLEX_BASE_URL", "NIXFLEX_TELNYX_API_KEY", "NIXFLEX_TELNYX_CONNECTION_ID"]
```

Restart from that prepared environment. The tool accepts only `phone_number`, `provider` and `confirm`, then reads the selected pair privately after confirmation. Missing configuration sends nothing. Keep the original two-name list if you do not need credential updates. See [the credential and uncertain-outcome limits](https://docs.nixflex.com/ai-tools/overview.md#google-calendar-and-number-credentials).

## Verify with a read

> Use Nixflex get\_usage only. Explain the usage returned without changing anything or printing credentials. Do not use shell commands to inspect my secret environment.

Expect **97 tools** for the server. Keep approvals enabled, including when a tool does not expose a `confirm` argument. The four calendar and credential writes—calendar connect, settings, disconnect and number-credential update—require `confirm: true`; missing confirmation sends no request. Never automatically retry an uncertain write; reconcile it first.

## Five prompts to try

### 1. Create an agent

> Read my Nixflex agent list. Draft a Willow Reception agent for answering service questions, and show its exact instructions and settings before creating it. Wait for my approval before create\_agent. Do not attach numbers, modify repository files or place a call.

### 2. Prepare new knowledge

> Read Willow Reception's current knowledge. Help me turn the business facts I provide into one clear topic, identify conflicts and show dashboard steps to add, review and publish it. This MCP has no knowledge write tool. Do not use shell or direct API calls to bypass that limit or say the topic is live.

### 3. Check recent calls

> Use Nixflex list\_calls for Willow Reception's latest five completed calls. Summarise confirmed outcomes, missing results and follow-up needs. Keep personal details out of the answer. Do not change records, call people or send messages.

### 4. Prepare booking via a calendar

> List my Nixflex numbers and let me choose one for booking. With my approval, check get\_google\_calendar. If new consent is needed, show the number and return URL for approval before connect\_google\_calendar with confirm: true; I will open the ten-minute link. Check status after consent. Show settings changes before asking approval for update\_google\_calendar\_settings with confirm: true. Give me a manual test-call script with full-name spelling, email-local-part spelling, a domain spoken as words, and one combined read-back followed by one clear yes. MCP cannot book directly; do not call the booking API or claim an appointment or invitation delivery.

### 5. Read usage

> Use Nixflex get\_usage to make a small usage and balance table with the actual returned period. Say when a value is unavailable. Do not change billing, rotate credentials, inspect local secret files or invent an invoice.

## Check a call without repeating it

The server’s `get_outbound_call_request` reads the original saved request ID without dialling. `get_call_bookings` reads the retained booking result for a known call ID. Keep `ready`, `none`, `processing`, `deleted` and `unavailable` distinct. Follow [the saved-request workflow](https://docs.nixflex.com/ai-tools/overview.md#check-bookings-and-uncertain-call-requests) before any new approved outbound call; never prepare a replacement ID for an uncertain launch.

## Limits and documentation

Use the dashboard for knowledge publication and personal ownership actions. The server supports human calendar consent, status, settings and confirmed disconnection. Status can refresh an existing connection internally; `needs_reconnect: true` still needs consent. Disconnect cannot recall dispatched work or guarantee remote revocation, and `send_invites` does not confirm delivery. Tools that call, text or launch campaigns can spend credit. See [the full MCP limits](https://docs.nixflex.com/ai-tools/overview.md#what-the-tools-can-do).

Give Codex [llms.txt](https://docs.nixflex.com/llms.txt) and [this page as Markdown](https://docs.nixflex.com/ai-tools/codex.md). Ask it to read the relevant page and inspect the available tool schema before proposing an action. Documentation is context, not account permission.

## Next

* [Manage calendar settings](https://docs.nixflex.com/ai-tools/calendar-settings.md)
* [Check call and booking results](https://docs.nixflex.com/ai-tools/call-results.md)
* [Prepare private number credentials](https://docs.nixflex.com/ai-tools/number-credentials.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.