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

# Connect SLNG to your AI tools

> Let Claude, ChatGPT, Codex, Cursor, or your own agent framework create SLNG voice agents and place outbound calls through the SLNG MCP server.

The SLNG MCP server gives an AI assistant a small set of tools to create a voice
agent in a region you choose, attach a phone number from your dashboard, and
place an outbound call. You describe the task in plain language:

```text Prompt theme={null}
Create a voice agent in the Germany region that calls our customers to confirm
their appointments, then call +49 30 1234 .... to test it.
```

The assistant settles the region with you, builds and deploys the agent, shows
you the call preview, and places the call only after your yes. It then follows
the call and reports the outcome and the transcript.

The server speaks Streamable HTTP at:

```text Server URL theme={null}
https://mcp.slng.ai/mcp
```

<Note>
  This page connects your AI assistant to SLNG. To let an SLNG agent call tools
  on another MCP server during a call, see
  [Connect an MCP server](/guides/agents/tools-and-mcp/connect-with-mcp).
</Note>

## Before you start

* **An SLNG API key.** Organization owners and admins create keys. See
  [Create your API key](/guides/get-started/quickstart#create-your-api-key); a
  name such as `wayne-enterprises-mcp` helps you find it later.
* **An outbound connection, for phone calls.** Create it in the dashboard, as
  [Place calls from an agent](/guides/agents/telephony/outbound#create-the-connection)
  shows. The assistant attaches an existing connection to the agent; it can't
  create one.
* **Credits** on your organization. A call with a balance at zero or below fails
  with `CREDITS_REQUIRED`.

## Connect your assistant

You sign in with your API key in one of two ways:

* **Connect page.** Your client opens a page on `mcp.slng.ai`, you paste the key
  once, and the page shows your organization's name so you can confirm. The
  connection lasts 30 days; after that, your client asks you to sign in again.
  The server keeps no copy of the key: it travels encrypted inside the sign-in
  tokens your client holds, so revoking the key in the dashboard disconnects
  every client that uses it.
* **Header.** Clients that can send their own headers pass the key as
  `Authorization: Bearer <your key>` on every request.

### Claude Code

Add the server, then sign in through the connect page:

```bash Terminal theme={null}
claude mcp add --transport http --scope user slng https://mcp.slng.ai/mcp
```

In Claude Code, run `/mcp`, select `slng`, and choose **Authenticate**. Your
browser opens the connect page.

To use a header instead, keep the key in the `SLNG_API_KEY` environment variable
and reference it from `.mcp.json`:

```json .mcp.json theme={null}
{
  "mcpServers": {
    "slng": {
      "type": "http",
      "url": "https://mcp.slng.ai/mcp",
      "headers": { "Authorization": "Bearer ${SLNG_API_KEY}" }
    }
  }
}
```

### Claude

Add SLNG as a custom connector in Claude on the web or in the desktop app.

<Steps>
  <Step title="Add the connector">
    On Free, Pro, and Max plans, open **Customize > Connectors**, click **+ Add**,
    then **Add custom connector**. On Team and Enterprise plans, an owner adds it
    once in **Organization settings > Connectors**: click **Add**, hover over
    **Custom**, and select **Web**.
  </Step>

  <Step title="Enter the server">
    Name the connector `SLNG` and enter `https://mcp.slng.ai/mcp` as the remote
    MCP server URL. Keep the recommended sign-in options.
  </Step>

  <Step title="Sign in">
    Click **Connect**. The connect page opens; paste your API key and confirm
    your organization. On Team and Enterprise plans, each member connects from
    **Customize > Connectors**.
  </Step>

  <Step title="Use it in a chat">
    Turn the connector on for a conversation with the **+** button, then
    **Connectors**.
  </Step>
</Steps>

<Note>
  Free plans allow one custom connector.
</Note>

### ChatGPT

ChatGPT reaches MCP servers through developer mode, on the web, with Plus, Pro,
Business, Enterprise, and Edu plans. In a Business or Enterprise workspace, an
admin turns developer mode on first.

<Steps>
  <Step title="Turn on developer mode">
    In ChatGPT settings, open **Apps**, then **Advanced settings**, and turn on
    **Developer mode**.
  </Step>

  <Step title="Create the app">
    Create an app named `SLNG` with `https://mcp.slng.ai/mcp` as the MCP server
    URL and **OAuth** as the authentication.
  </Step>

  <Step title="Sign in">
    The connect page opens; paste your API key and confirm your organization.
  </Step>
</Steps>

ChatGPT asks you to confirm each tool call that changes something, such as a
deploy or a call.

### Codex

Keep the key in `SLNG_API_KEY` and add the server to `~/.codex/config.toml`:

```toml ~/.codex/config.toml theme={null}
[mcp_servers.slng]
url = "https://mcp.slng.ai/mcp"
bearer_token_env_var = "SLNG_API_KEY"
tool_timeout_sec = 300
```

Codex stops a tool call after 60 seconds by default. Building and deploying an
agent can take longer, so raise `tool_timeout_sec` as shown.

### Cursor

Keep the key in `SLNG_API_KEY` and add the server to `~/.cursor/mcp.json` (or
`.cursor/mcp.json` in one project):

```json ~/.cursor/mcp.json theme={null}
{
  "mcpServers": {
    "slng": {
      "url": "https://mcp.slng.ai/mcp",
      "headers": { "Authorization": "Bearer ${env:SLNG_API_KEY}" }
    }
  }
}
```

### Your own agent

Agent frameworks connect with a header. Two things matter more here than in a
chat client:

* **Pass the server instructions to the model.** The server sends instructions
  when the client connects (settle the region first, show the plan and the
  preview, wait for a yes). Frameworks don't hand them to the model on their own,
  so add them to the system prompt.
* **Ask a person before a call.** A framework agent can pass a confirm token
  straight back without asking anyone. Require human approval at least for
  `slng_place_call`.

<Tabs>
  <Tab title="Vercel AI SDK" icon="code">
    With `ai` 7 and `@ai-sdk/mcp`:

    ```ts agent.ts theme={null}
    import { anthropic } from '@ai-sdk/anthropic';
    import { createMCPClient } from '@ai-sdk/mcp';
    import { generateText, isStepCount } from 'ai';

    const slng = await createMCPClient({
      transport: {
        type: 'http',
        url: 'https://mcp.slng.ai/mcp',
        headers: { Authorization: `Bearer ${process.env.SLNG_API_KEY}` },
      },
    });

    const result = await generateText({
      model: anthropic('claude-opus-5-5'),
      instructions: slng.instructions,
      tools: await slng.tools(),
      toolApproval: { slng_place_call: 'user-approval' },
      prompt: 'Which regions can I use for a call to Germany?',
      stopWhen: isStepCount(20),
    });
    ```

    A call that needs approval comes back as a `tool-approval-request` part.
    Send the person's answer as a `tool-approval-response` and call
    `generateText` again.
  </Tab>

  <Tab title="LangGraph" icon="code">
    With `langchain[mcp]` 1.4 or later. The `langchain.mcp` module is in beta.

    ```python agent.py theme={null}
    import os

    from fastmcp.client.transports import StreamableHttpTransport
    from langchain.agents import create_agent
    from langchain.agents.middleware import HumanInTheLoopMiddleware
    from langchain.mcp import MCPAdapter
    from langgraph.checkpoint.memory import InMemorySaver

    async def main() -> None:
        transport = StreamableHttpTransport(
            "https://mcp.slng.ai/mcp",
            headers={"Authorization": f"Bearer {os.environ['SLNG_API_KEY']}"},
        )
        async with MCPAdapter(transport) as slng:
            agent = create_agent(
                "anthropic:claude-opus-5-5",
                await slng.list_tools(),
                system_prompt=slng.client.instructions,
                middleware=[
                    HumanInTheLoopMiddleware(
                        interrupt_on={"slng_place_call": {"allowed_decisions": ["approve", "reject"]}}
                    )
                ],
                checkpointer=InMemorySaver(),
            )
            # Run the agent here, while the connection is open.
    ```

    Before a call, the graph pauses with an interrupt. Resume it with
    `Command(resume={"decisions": [{"type": "approve"}]})`, or `reject`.
  </Tab>
</Tabs>

### Run the server on your machine

Clients that start local MCP servers (Claude Code, Codex, Cursor, or your own
framework) can also run the same server over stdio with the
[`@slng-ai/mcp`](https://www.npmjs.com/package/@slng-ai/mcp) package. Agents are
then built on your machine. You need:

* Node.js 22 or later.
* The [Unmute](/unmute) CLI on your `PATH`, at the exact version the server is
  pinned to: the server builds agents with it and refuses any other version.
  The [package's README](https://www.npmjs.com/package/@slng-ai/mcp) names that
  version and how to install it. Check yours with `unmute --version`.
* [uv](https://docs.astral.sh/uv/) on your `PATH`. The first build downloads
  Python and a few packages into a cache, once.

Keep the key in the `SLNG_API_KEY` environment variable of the shell that starts
your client. With `@latest`, `npx` checks for a newer release each time your
client starts the server:

<Tabs>
  <Tab title="Claude Code" icon="terminal">
    ```json .mcp.json theme={null}
    {
      "mcpServers": {
        "slng": {
          "command": "npx",
          "args": ["-y", "@slng-ai/mcp@latest"],
          "env": { "SLNG_API_KEY": "${SLNG_API_KEY}" }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Codex" icon="terminal">
    ```toml ~/.codex/config.toml theme={null}
    [mcp_servers.slng]
    command = "npx"
    args = ["-y", "@slng-ai/mcp@latest"]
    env_vars = ["SLNG_API_KEY"]
    startup_timeout_sec = 60
    tool_timeout_sec = 300
    ```

    The first download and an agent build can take longer than Codex's default
    timeouts, so raise both as shown.
  </Tab>

  <Tab title="Cursor" icon="terminal">
    ```json ~/.cursor/mcp.json theme={null}
    {
      "mcpServers": {
        "slng": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@slng-ai/mcp@latest"],
          "env": { "SLNG_API_KEY": "${env:SLNG_API_KEY}" }
        }
      }
    }
    ```
  </Tab>
</Tabs>

Then ask "Using SLNG, who am I connected as?". The answer names your
organization, the Unmute version the server needs, and the Unmute and uv
versions it found. If Unmute or uv is missing, start your client from a terminal
where `unmute --version` works. If a newer release needs a newer Unmute, the
server says which version to install.
The package's README lists the other settings, such as a list of numbers the
server may call.

## How a call comes together

A typical request runs these steps. The assistant stops for your answer at each
one marked with a yes.

1. **Region (yes).** The assistant uses the region you named. Otherwise it
   suggests one from the number you call or from where you are, says why, and
   waits for your yes.
2. **Models.** It reads which models the region offers for the call's language,
   and where each one runs.
3. **Build.** It writes the agent: the prompt, the greeting, the goodbye, and the
   values that change per call, such as the name of the person called.
4. **Deploy (yes).** It shows the plan (create or replace, the models and where
   they run, and anything a replace removes) and deploys after your yes.
5. **Number.** It lists the outbound numbers this agent can use and attaches one.
6. **Call (yes).** It shows the preview: from which number, to which number,
   the greeting, and the call values. It dials only after your yes.
7. **Result.** It follows the call until it ends, then reports the outcome and
   the transcript.

For a quick call, the assistant fills a ready-made outbound call template. For a
custom flow, such as an agent that confirms who answered before it cancels an
appointment, it writes a full [Unmute](/unmute) package with tasks and saved
values. The server includes Unmute's authoring guide, matched to the Unmute
version it builds with, and the assistant reads it before it writes a package.

Calls start right away. Scheduled calls aren't available, so an assistant asked
to call tomorrow offers to call now instead.

## Regions and where models run

Every agent runs in one agent region. SLNG Managed regions run on SLNG's own
infrastructure; the LiveKit Cloud regions `us-east`, `eu-central`, and
`ap-south` run on LiveKit's cloud. For the full list, see the
[regions map](/guides/regions/regions-map).

* **You choose the region.** The assistant never picks or switches one without
  asking you.
* **Phone numbers you add in the dashboard work in every region.** For a phone
  call, the assistant suggests the SLNG Managed region for the country you're
  calling.
* **Models in the region come first.** The assistant offers only the models the
  region provides for the call's language. It prefers models that run in the
  region, and tells you which chosen models run elsewhere.
* **The region choice covers models, not routing.** It decides which models the
  agent uses. Each request can still be served from another region.

To keep every model in the region, ask the assistant to use only in-region
models. A role with no in-region model then fails with `REGION_NO_MODELS`
instead of using a model elsewhere. LiveKit Cloud regions don't support this
option, because their models are only approximately in the region.

## Phone numbers

The assistant attaches an outbound connection you created in the dashboard,
and lists only the numbers the platform says this agent can use. The person you
call sees the connection's caller ID number. To call from a different
connection just once, or to pick one of its caller ID numbers, ask the
assistant: it sets both for that call only, and shows them in the call preview.

If no number is usable, the assistant explains why and asks you to add an
outbound connection in the dashboard. See [Connect a phone number](/guides/agents/telephony/overview) for
how connections work.

## Safety

* **Two steps for every deploy and call.** The server returns a plan or a
  preview first, with a confirm token that expires after 10 minutes and works
  once. The token covers exactly what you reviewed: if the agent, the number, or
  the call values change, the server refuses it and the assistant shows a new
  preview.
* **Your client asks too.** Each tool tells clients whether it only reads or can
  change something, so Claude, ChatGPT, and other clients ask before deploys,
  number changes, deletes, and calls.
* **Replacing an agent shows what it removes.** Deploying an agent with the name
  of an existing one replaces it, and the plan lists the tools and tasks the
  replace removes. Replacing an agent this server didn't create needs your
  explicit confirmation.
* **Checks on the number you call.** The number must be a full international
  number, premium-rate numbers are refused, and each key has an hourly and a
  daily call limit. A number the assistant looked up itself is read back to you
  before the preview.
* **No second call by accident.** If the server can't tell whether a call went
  out, it refuses to dial the same number again until it finds the call.
* **The agent says it's an AI.** The assistant writes the greeting and the
  goodbye for your use case, and by default the greeting says an AI assistant is
  calling, and for whom. AI providers' usage policies and laws in several places
  expect that. If you ask to leave it out, the assistant tells you about those
  rules first, and the call preview points out a greeting that doesn't say it.
* **Nothing is kept.** The server doesn't store or log your key, the numbers you
  call, or transcripts. Transcripts go only to your assistant.

## Docs servers

Two more MCP servers help an assistant answer questions about SLNG and Unmute:

| Server | URL |
| - | - |
| SLNG docs | `https://docs.slng.ai/mcp` |
| Unmute docs | `https://unmute.ai/mcp` |

In Claude Code:

```bash Terminal theme={null}
claude mcp add --transport http --scope user slng-docs https://docs.slng.ai/mcp
claude mcp add --transport http --scope user unmute-docs https://unmute.ai/mcp
```

When the Unmute docs and the server's own guide differ, the guide matches the
Unmute version the server builds with.

## Tools

The tool names start with `slng_`, so they don't clash with tools from other
servers.

| Tool | What it does |
| - | - |
| `slng_whoami` | Shows the organization that owns the key, and the server's versions. |
| `slng_list_regions` | Lists the agent regions and suggests one for a number or country. |
| `slng_get_capabilities` | Lists the models and voices a region offers for a language, and where each model runs. |
| `slng_list_agents` | Lists your agents. |
| `slng_get_agent_guide` | Serves the agent-writing guide: Unmute's authoring guide plus notes for this server. |
| `slng_build_agent` | Builds and validates an agent from the template or from an Unmute package. |
| `slng_deploy_agent` | Shows the deploy plan, then deploys after confirmation. |
| `slng_list_phone_numbers` | Lists the outbound numbers an agent can use. |
| `slng_attach_phone_number` | Attaches an outbound number to an agent, replacing the one it had. |
| `slng_prepare_call` | Shows the call preview and returns a confirm token. |
| `slng_place_call` | Places the call after confirmation. |
| `slng_get_call` | Reads a call's status, outcome, task results, and transcript. |
| `slng_create_test_session` | Starts a browser test session with an agent. |
| `slng_delete_agent` | Deletes an agent, unless a call is live. |

## Troubleshooting

| Error | What it means | What to do |
| - | - | - |
| `AUTH_INVALID` | The key is missing, revoked, or expired, or it's an older key that doesn't start with `slng_`. | Create a new key and connect again. |
| `CREDITS_REQUIRED` | The organization's balance is at zero or below. | Add credits in the dashboard. |
| `NO_NUMBER_IN_REGION` | No outbound number works with this agent. | Create an outbound connection in the dashboard. |
| `REGION_NO_MODELS` | No allowed model for a role in this region and language. | Choose another region or language, or allow models outside the region. |
| `REGION_NOT_ALLOWED` | In-region-only models were asked for in a LiveKit Cloud region. | Use the matching SLNG Managed region, or allow models outside the region. |
| `CALLEE_NOT_ALLOWED` | The number can't be called from this server: it's premium-rate, it isn't on the server's list of allowed numbers, or the key reached its hourly or daily call limit. | Call another number, or wait for the time the assistant reports. |
| `CALL_STATE_UNKNOWN` | The server can't tell whether the call went out. | Ask the assistant to check the agent's calls before you call again. |

If a chat client stops working after a month, sign in again: connect-page
connections last 30 days.

## Next steps

<CardGroup cols={2}>
  <Card title="Place calls from an agent" icon="phone-outgoing" href="/guides/agents/telephony/outbound">
    Create the outbound connection the assistant attaches.
  </Card>

  <Card title="Regions map" icon="map" href="/guides/regions/regions-map">
    See every region and its base URL.
  </Card>

  <Card title="Unmute" icon="package" href="/unmute">
    Learn the package format the assistant writes for custom flows.
  </Card>

  <Card title="Agent skill" icon="sparkles" href="/integrations/skills/agent-skill">
    Teach a coding agent to call the SLNG API directly.
  </Card>
</CardGroup>


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