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

# MCP Tools: Getting Started

> Connect Ana to external tools using the Model Context Protocol

## What is MCP?

The **Model Context Protocol (MCP)** is an open standard that lets Ana connect to external services and tools—like Notion, Slack, GitHub, or your internal APIs. Think of it as a universal connector for AI.

<Note>
  MCP Tools are configured by organization administrators through Settings.
</Note>

<Warning>
  **Important:** TextQL currently only supports **HTTP/SSE-based MCP servers**. Standard input/output (stdio) MCP servers are not supported at this time.

  **Not sure the difference? If you see `url` in the JSON configuration you're good, but if you see `command` then it's local/stdio and won't work.**
</Warning>

## Why Use MCP?

Connect Ana to services beyond TextQL's built-in integrations:

* **Productivity**: Notion, Google Drive, Slack, Jira
* **Development**: GitHub, GitLab, Linear
* **Custom APIs**: Your organization's internal tools
* **Data Sources**: Industry-specific platforms

## Quick Setup

### Prerequisites

* Organization administrator access
* MCP server URL (we'll use Notion as an example)

### Step 1: Open MCP Settings

1. Navigate to **Settings** → **Configuration** tab → **MCP Tools**
2. Click **Edit Configuration**

<Frame caption="MCP Settings in the Settings page">
  <img src="https://mintcdn.com/textql/P-MWWb8LMTk60fQx/images/mcp/mcp-empty-state.png?fit=max&auto=format&n=P-MWWb8LMTk60fQx&q=85&s=17f814270627bb34616c85d0ce3e750d" alt="Empty MCP configuration" width="2400" height="1742" data-path="images/mcp/mcp-empty-state.png" />
</Frame>

### Step 2: Add Your First Server

<Tip>
  **Using your own MCP server?** Make sure you see `url` in the JSON, not `command`. Only HTTP/SSE servers work with TextQL.
</Tip>

Add this configuration for Notion:

```json theme={null}
{
  "mcpServers": {
    "notion": {
      "url": "https://mcp.notion.com/mcp",
      "enabled": true
    }
  }
}
```

**Configuration breakdown:**

* `"notion"`: Server name (use any descriptive name)
* `"url"`: MCP server endpoint
* `"enabled": true`: Server is active

<Frame caption="Configuration editor with Notion setup">
  <img src="https://mintcdn.com/textql/P-MWWb8LMTk60fQx/images/mcp/mcp-config-final.png?fit=max&auto=format&n=P-MWWb8LMTk60fQx&q=85&s=563cd970a1926202c286561df519b37c" alt="MCP configuration modal" width="3456" height="1992" data-path="images/mcp/mcp-config-final.png" />
</Frame>

### Step 3: Apply Configuration

1. Click **Apply Configuration**
2. TextQL validates and connects (takes a few seconds)
3. Tools are discovered automatically

<Frame caption="Notion server showing authentication required">
  <img src="https://mintcdn.com/textql/P-MWWb8LMTk60fQx/images/mcp/mcp-server-auth-required.png?fit=max&auto=format&n=P-MWWb8LMTk60fQx&q=85&s=fa2e0da15b51caab18611dc7e5d0f41e" alt="Server requires authentication" width="3456" height="1992" data-path="images/mcp/mcp-server-auth-required.png" />
</Frame>

### Step 4: Authenticate (if required)

Some servers like Notion require authentication. You'll see an **Authentication required** badge.

1. Click **Authenticate**
2. A popup opens with the OAuth login page
3. Log in and click **Allow**
4. Popup closes automatically

<Frame caption="OAuth authentication flow">
  <img src="https://mintcdn.com/textql/P-MWWb8LMTk60fQx/images/mcp/mcp-oauth-notion-login.png?fit=max&auto=format&n=P-MWWb8LMTk60fQx&q=85&s=ea0c9884112847d38e53c2bc710b9818" alt="OAuth login page" width="3456" height="1992" data-path="images/mcp/mcp-oauth-notion-login.png" />
</Frame>

After authentication:

* Tool badges appear (e.g., `search_pages`, `create_page`)
* The authentication badge is removed

<Frame caption="Authenticated server with available tools">
  <img src="https://mintcdn.com/textql/P-MWWb8LMTk60fQx/images/mcp/mcp-server-authenticated.png?fit=max&auto=format&n=P-MWWb8LMTk60fQx&q=85&s=52a462b1b70337b1379500504c52bc47" alt="Server showing tools" width="3456" height="1992" data-path="images/mcp/mcp-server-authenticated.png" />
</Frame>

## Using MCP Tools with Ana

Once connected, simply ask Ana natural questions:

**Search:**

```
"Search my Notion for the product roadmap"
```

**Read:**

```
"What's in my Notion page about Q1 goals?"
```

**Create:**

```
"Create a Notion page with today's meeting notes"
```

Ana automatically selects and uses the appropriate tools—no need to specify tool names.

<Frame caption="Ana using MCP tools in conversation">
  <img src="https://mintcdn.com/textql/P-MWWb8LMTk60fQx/images/mcp/chat-with-mcp-tool-executing.png?fit=max&auto=format&n=P-MWWb8LMTk60fQx&q=85&s=e4dc3079c21a76019909250ad8bd34aa" alt="Chat showing MCP tool execution" width="3456" height="1992" data-path="images/mcp/chat-with-mcp-tool-executing.png" />
</Frame>

### Tool Execution

When Ana uses an MCP tool, you'll see:

* Tool name and server
* Execution status (loading → success/error)
* Results and timing

**Example cell:**

```
[MCP: notion] search_pages
  ✓ Found 3 pages in 0.8s
```

## Multiple Servers

<Tip>
  **Using your own MCP server?** Make sure you see `url` in the JSON, not `command`. Only HTTP/SSE servers work with TextQL.
</Tip>

Add multiple servers in one configuration:

```json theme={null}
{
  "mcpServers": {
    "notion": {
      "url": "https://mcp.notion.com/mcp",
      "enabled": true
    },
    "github": {
      "url": "https://api.githubcopilot.com/mcp/",
      "enabled": true
    }
  }
}
```

## Managing Servers

* **Disable temporarily**: Toggle the switch (keeps configuration and authentication)
* **Edit configuration**: Click "Edit Configuration" again
* **Clear authentication**: Click "Clear authentication" to revoke access
* **Delete server**: Remove from JSON and apply

<Warning>
  Deleting a server removes stored OAuth tokens. You'll need to re-authenticate if you add it back.
</Warning>

## Quick Troubleshooting

**Connection Failed:**

* Verify the URL is correct
* Check if the server is running
* Ensure no firewall is blocking the connection

**Authentication keeps asking:**

* Server requires OAuth—click Authenticate
* Enable pop-ups for your TextQL domain if blocked

**No tools appear:**

* Complete authentication first if the authentication badge is shown
* Server may not implement MCP correctly
* Check the [Reference guide](/core/how-it-works/mcp/reference) for details

**Stdio MCP servers not working:**

* TextQL only supports HTTP/SSE-based MCP servers
* Stdio (standard input/output) transport is not currently supported
* If you have a stdio MCP server, you'll need to wrap it with an HTTP/SSE adapter

## Next Steps

* [See all configuration options and troubleshooting →](/core/how-it-works/mcp/reference)
* Start with read-only tools (search) before adding write tools
* Ask Ana naturally—she'll figure out which tools to use
