# Agent quickstart

> Create an API key, register the hosted or self-hosted MCP endpoint, inspect an agent, and save a reviewable draft with an evidence-based prompt.

{/* Generated by scripts/sync_docs_handbook.mjs from the preserved in-app docs. */}

Start by connecting your MCP client to the same Menace Voice workspace a human operator uses. The API key determines the organization and resources the assistant can see, so create a dedicated key, store it outside source control, and revoke it when the integration is no longer needed.

## 1. Collect the prerequisites

- Create a Menace Voice API key from the API Keys page and copy it immediately; the full value is shown only once.
- Hosted endpoint: https://voice.menaceui.com/api/v1/mcp/.
- Self-hosted endpoint: your backend base URL followed by /api/v1/mcp/.
- Use a client that supports Streamable HTTP and can send the X-API-Key header.

## 2. Configure Codex without committing the key

```text
[mcp_servers.menace-voice]
url = "https://voice.menaceui.com/api/v1/mcp/"
env_http_headers = { "X-API-Key" = "MENACE_VOICE_API_KEY" }
```

```shell
export MENACE_VOICE_API_KEY="YOUR_API_KEY"
codex mcp list
codex mcp get menace-voice
```

The server name menace-voice is only the local client identifier in your MCP config. The product and workspace are Menace Voice. For other MCP clients, use the same endpoint and X-API-Key header in that client's Streamable HTTP configuration.

## 3. Make the first session read-only

```prompt
Connect to Menace Voice. List the active agents, then find the agent named “Support Desk”.
Read its current TypeScript projection and report whether you are looking at a draft or published version.
Do not save or create anything. Summarize its nodes, branches, attached tools, and documents.
```

This proves authentication, organization scope, workflow lookup, and source projection without changing the workspace. Check that the reported agent, node names, and version match the Menace Voice UI before authorizing an edit.

## 4. Give the edit a precise contract

```text
Objective: add order-status lookup to the existing Support Desk agent
Preserve: all unrelated nodes, edges, prompts, tools, documents, and variable names
Read first: current workflow code, HTTP tool schema, agentNode schema, prompting guide
Change: create one lookup_order tool and attach it only to the Order Support node
Draft proof: save_workflow returns saved: true and identify the new draft version
Runtime proof: stop before publishing; give me the exact Web Call scenarios to run
```

The MCP instructions require a plan stage before new workflow authoring, current prompt guidance before writing prompts, and a review stage after a successful save. Keep the user involved in decisions about persona, stages, tools, exit conditions, and irreversible business actions.

## 5. Review the result in Menace Voice

- Confirm the named draft version exists and the published version has not changed.
- Inspect the graph for preserved nodes and edges, and verify the new tool is attached only where intended.
- Run a Web Call for the success, missing-input, empty-result, and tool-failure paths.
- Review the transcript and tool log, then publish from the UI only if the draft meets the defined outcome.

Before asking an implementation assistant to create integrations, read [Design tool contracts](/handbook/agents/tool-contracts) for the supported creation and attachment flow.
