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

> ## Agent Instructions
> Start with https://docs.stealthgpt.ai/api-reference/quickstart.md for REST setup and https://docs.stealthgpt.ai/api-reference/models.md for Super, Standard and Lite model selection.
> For existing drafts, use the Writer & Humanizer endpoints; for research-to-draft generation, use the Stealth Agent guides. Choose polling, webhook callbacks or MCP with https://docs.stealthgpt.ai/api-reference/workflow-patterns.md.
> For bulk humanization and editorial review, use https://docs.stealthgpt.ai/api-reference/recipes/humanize-review.md. For fixed links, citations or other approved spans, use https://docs.stealthgpt.ai/api-reference/text-preservation.md and replace each protected span with a marker in your application.
> For assistant setup and verified client status, use https://docs.stealthgpt.ai/api-reference/integrations/mcp.md. Consult the Pricing and Data Handling references for API entitlements, word accounting and processing details; web subscriptions and API plans are separate.

# Humanize AI text in Codex

> Connect the StealthGPT MCP server to Codex with OAuth, then humanize drafts and run content workflows from your coding session

Bring StealthGPT into your Codex workflow to humanize product copy, articles, and other drafts without switching to a separate editor. Connect once with your StealthGPT account, then ask Codex to submit a rewrite and retrieve the result through MCP.

## Connect with OAuth

You need the Codex CLI and a StealthGPT account with available subscription usage or API credits. OAuth handles sign-in, so you don't need to copy an API key.

**1. Add the StealthGPT MCP server**

Run this command in your terminal:

```bash theme={null}
codex mcp add stealthgpt --url https://www.stealthgpt.ai/api/mcp/mcp
```

**2. Sign in with your StealthGPT account**

Start the OAuth flow:

```bash theme={null}
codex mcp login stealthgpt
```

Open the sign-in page when prompted, sign in, and approve the connection.

**3. Open a Codex session**

Start a new Codex session so it loads the connection. The StealthGPT tools are available alongside your other MCP tools.

For Codex installation and MCP configuration options, see the [official Codex MCP guide](https://developers.openai.com/codex/mcp).

## Humanize a draft

Give Codex the text and the workflow you want. For example:

```text theme={null}
Use StealthGPT to humanize the product update below.
Use model "super", qualityMode "quality", and outputFormat "text".
Call humanize_text once, then use get_run_status with its runId until the run
is completed, failed, or cancelled. Wait between status checks.
Return the completed text here without changing any files.

Product update:
The new dashboard brings account activity and usage into one view.
Teams can review recent changes and plan their next steps from the same page.
```

`humanize_text` starts an asynchronous job and returns a `runId`. Codex uses `get_run_status` with that same ID to retrieve its progress and completed result. Keep the ID for the existing run instead of submitting the draft again while it is processing.

MCP humanization defaults to `model: "super"` and `outputFormat: "markdown"`. The example selects plain text explicitly. For content with headings, links, or tables, use the [text-preservation guide](https://docs.stealthgpt.ai/api-reference/text-preservation.md) to plan format-sensitive requests and review the returned structure before saving it to a file.

## Choose the right tool

* **`humanize_text`** rewrites text you already have. Choose `super`, `standard`, or `lite` and a quality mode for the task.
* **`generate_content`** starts a Stealth Agent content workflow from a brief, using an `academic`, `seo`, or `social` preset.
* **`get_run_status`** retrieves progress and results for either kind of run.

See the [MCP tool reference](https://docs.stealthgpt.ai/api-reference/integrations/mcp.md#tools) for arguments, defaults, and result fields, and [workflow patterns](https://docs.stealthgpt.ai/api-reference/workflow-patterns.md) for larger publishing pipelines.

## Account and usage

Runs are billed to the StealthGPT account used during OAuth sign-in. Subscription usage and API-credit selection follow the [MCP billing rules](https://docs.stealthgpt.ai/api-reference/integrations/mcp.md#billing); check those rules and your account settings before starting a larger batch. The OAuth connection does not require a separate API token.

> [!NOTE]
>
> Setup verified November 7, 2026 with `codex-cli 0.167.0-alpha.3.2`: OAuth sign-in completed, and the connected desktop client completed a `humanize_text` → `get_run_status` flow.


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