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

# DialNexa MCP Quickstart

> Connect an MCP-compatible AI client to DialNexa with OAuth or an API key, verify tool discovery, and make a first read-only tool call.

This DialNexa MCP quickstart connects an MCP-compatible AI client to your workspace and verifies the connection with the read-only `get_my_organization` tool. Use OAuth for an interactive sign-in, or use a DialNexa API key when the client supports custom request headers.

## Before you begin

* Confirm that you can sign in to the DialNexa workspace you want to authorize.
* Use a test workspace when evaluating tools that can change data or spend wallet balance.
* Confirm that your MCP client supports remote MCP servers over Streamable HTTP.

If you plan to use an API key, see [API key authentication](/docs/api-reference/authentication) before placing a key in local configuration or a secret manager.

## Step 1: Add The DialNexa MCP Server With OAuth

Most OAuth-capable MCP hosts only need the remote server URL:

```json theme={null}
{
  "mcpServers": {
    "dialnexa": {
      "url": "https://api.dialnexa.com/v1/mcp"
    }
  }
}
```

Save the configuration and connect. Do not add a placeholder Authorization header when you want the client to start OAuth discovery.

## Step 2: Sign In And Review Consent

Your client should open the DialNexa sign-in and consent flow. Sign in if needed, review the requested read and write permissions, select the intended workspace when more than one is available, and click **Allow**.

<img src="https://mintcdn.com/dialnexa/KQqTe49OFCMnH_9c/images/documentation/screenshots/mcp-oauth-consent.png?fit=max&auto=format&n=KQqTe49OFCMnH_9c&q=85&s=2df55d326baa2fe195fb4d86536328d8" alt="DialNexa MCP OAuth consent screen showing Claude, read and write permissions, offline access, and Deny and Allow buttons." style={{ width: '100%', maxWidth: '700px', margin: '8px 0 24px', border: '1px solid #e5e7eb', borderRadius: '6px' }} width="1072" height="934" data-path="images/documentation/screenshots/mcp-oauth-consent.png" />

Click **Deny** if the client name, permissions, or workspace is not what you expected. The MCP connection will not be authorized.

## Alternative: Connect With An API Key

Most MCP hosts accept a server configuration with a URL and headers. Add the following values using your client's settings format:

```json theme={null}
{
  "mcpServers": {
    "dialnexa": {
      "url": "https://api.dialnexa.com/v1/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

Configuration field names vary between clients. Keep the URL and Authorization header unchanged if your client uses a different wrapper.

## Step 3: Reconnect The Client

Save the configuration, then reconnect or restart the MCP host so it initializes the new server. The client should complete MCP initialization and call `tools/list` automatically.

Do not send workspace IDs in the server URL or tool arguments. DialNexa derives the workspace from the OAuth grant or API key.

## Step 4: Verify Tool Discovery

Open the client's tool list and confirm that it contains `get_my_organization`, `list_agents`, and `list_calls`. The current reference contains a dedicated page for every available tool in the **MCP Tools** sidebar.

If no DialNexa tools appear, check the server URL, OAuth consent state or Bearer header, and client logs before attempting a tool call.

## Step 5: Make A First Read-Only Call

Ask the client to identify the current DialNexa workspace. It should call `get_my_organization` without arguments.

The protocol request has this shape:

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_my_organization",
    "arguments": {}
  }
}
```

Use your MCP host for normal calls. The JSON-RPC example shows what the host sends after initialization and is useful when reading logs or building a custom client.

## Verify the result

A successful response contains one text content block. Parse its `text` value as JSON when you are building a custom client:

```json theme={null}
{
  "content": [
    {
      "type": "text",
      "text": "{\"id\":\"org_example\",\"name\":\"Example Workspace\"}"
    }
  ]
}
```

Confirm that the returned workspace name matches the workspace that owns the API key. This check prevents accidental operations in the wrong workspace.

## Make your next call

Start with a list or get tool, then pass returned IDs into a state-changing tool only after reviewing its safety label and prerequisites.

1. Call [`list_agents`](/docs/mcp-tools/agents/list-agents) to discover agent IDs.
2. Call [`get_agent`](/docs/mcp-tools/agents/get-agent) to inspect one agent.
3. Review [`create_call`](/docs/mcp-tools/calls/create-call) before placing a billable outbound call.

## Troubleshooting

| Symptom                                              | What to check                                                                                                                      |
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `401 Unauthorized` before OAuth starts               | Confirm the client supports MCP OAuth discovery and reads the `WWW-Authenticate` header.                                           |
| Consent page does not open                           | Reconnect the server, allow browser redirects, and confirm you can sign in to DialNexa.                                            |
| Consent shows the wrong workspace                    | Select the intended workspace before clicking Allow. If the wrong workspace was already authorized, reconnect and authorize again. |
| API key returns `401 Unauthorized`                   | Confirm the key is active and the header starts with `Bearer `.                                                                    |
| Server connects but tools are missing                | Reconnect the client so it runs initialization and `tools/list` again.                                                             |
| A tool returns `isError: true`                       | Read the text block for the operation-specific cause and remediation.                                                              |
| Returned resources belong to an unexpected workspace | Stop and replace the API key with one created in the intended workspace.                                                           |

See [MCP responses and errors](/docs/mcp-tools/errors) for retry decisions and confirmation rules.
