> ## 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](https://dialnexa.com/docs/api-reference/api-fundamentals.md#authenticate-dialnexa-api-requests) 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, then select every workspace this client may use. Write access is chosen per workspace and starts unticked: tick **Allow writes** for each workspace where the client should create or change things, and leave it unticked where the client should only read. Then click **Allow**.

![DialNexa MCP OAuth consent screen showing Claude, read and write permissions, offline access, and Deny and Allow buttons.](https://mintcdn.com/dialnexa/KQqTe49OFCMnH_9c/images/documentation/screenshots/mcp-oauth-consent.png?fit=max\&auto=format\&n=KQqTe49OFCMnH_9c\&q=85\&s=2df55d326baa2fe195fb4d86536328d8)

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 put a workspace ID in the server URL: DialNexa takes the workspaces from the OAuth grant or the API key. With a credential for one workspace, tools take no workspace argument. When an OAuth grant covers several workspaces, every tool except `list_my_organizations` requires an `organization_id` argument naming the workspace to act in.

## 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. With a credential for one workspace, call `get_my_organization` without arguments. If the token grants several workspaces, call [List My Organizations](https://dialnexa.com/docs/mcp-tools/organization/list-my-organizations.md) first and pass the chosen `organization_id` to `get_my_organization` and subsequent tools.

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, whose `text` is the result as JSON, and the same result as an object in `structuredContent`. A list result is wrapped as `{ "items": [...] }` and a single value as `{ "value": ... }`. A custom client can read `structuredContent` directly:

```json theme={null}
{
  "content": [
    {
      "type": "text",
      "text": "{\"id\":\"o14XKPP84rt22g\",\"title\":\"Example Workspace\"}"
    }
  ],
  "structuredContent": {
    "id": "o14XKPP84rt22g",
    "title": "Example Workspace"
  }
}
```

Confirm that the returned workspace name (`title`) matches the workspace you meant to use. The organization fields beyond `id` and `title` are passed through as stored and are shortened here. This check prevents accidental operations in the wrong workspace.

## MCP File Uploads

Use a host-provided attachment when your MCP client can pass the attached file directly. If it cannot, call [Create Upload URL](https://dialnexa.com/docs/mcp-tools/uploads/create-upload-url.md), upload the bytes, then call the returned `finalize_tool` with the `upload_id`. Each slot is tied to one workspace, resource, and upload kind and expires after 10 minutes.

| Upload kind | Target | Finalize tool | File limit |
| - | - | - | - |
| `kb_document` | Knowledge base ID | [Upload Knowledge Base Document](https://dialnexa.com/docs/mcp-tools/knowledge-base/upload-knowledge-base-document.md) | PDF or TXT, 100 MB |
| `batch_leads` | Agent ID | [Create Batch Call](https://dialnexa.com/docs/mcp-tools/batch-calls/create-batch-call.md) | CSV or XLSX, 10 MB |

In a host that supports the upload panel, select the file in chat and wait for upload completion. A coding client that can send HTTP requests can set `reveal_url: true`, then PUT the file bytes with the returned headers. Allow the returned `upload_host` through any network restrictions. Uploading bytes alone does not create a batch, enroll leads, or add a knowledge-base document; the finalize tool performs that action.

For small text or CSV content already available to the client, use the supported inline text field and file name. Inline content is limited to 200 KB for a leads file and 1 MB for knowledge-base text; use an upload slot for anything larger. [Upload Knowledge Base Text](https://dialnexa.com/docs/mcp-tools/knowledge-base/upload-knowledge-base-text.md) can index text directly. Send exactly one file source, and do not paste or re-encode a large attached file into tool arguments.

Review the action before finalizing: a batch starts real calls. After a timeout, inspect the batch or document list before retrying. Workflow leads are added in the dashboard. A consumed or expired upload slot cannot be reused; check the result before creating a replacement.

## 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`](https://dialnexa.com/docs/mcp-tools/agents/list-agents) to discover agent IDs.
2. Call [`get_agent`](https://dialnexa.com/docs/mcp-tools/agents/get-agent) to inspect one agent.
3. Review [`create_call`](https://dialnexa.com/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 workspaces before clicking Allow. If the wrong workspace was already authorized, reconnect and authorize again. |
| Only read tools appear, or a write tool returns `connected with read-only access` | Write access was not granted for that workspace. Reconnect and tick **Allow writes** for it on the consent screen. |
| 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](https://dialnexa.com/docs/mcp-tools/errors.md) for retry decisions and confirmation rules.


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