# MCP Server

## Connect Optibase to AI Assistants

Optibase integrates with AI assistants like **Claude** and **Cursor** through the Model Context Protocol (MCP). This lets you ask questions about your A/B tests, analytics, heatmaps, and conversions in natural language — and get instant answers from your actual data.

### Getting Started

#### Claude Desktop

1. Open Claude Desktop settings and navigate to the **MCP Servers** section
2. Add a new server with the following URL:

   ```
   https://my.optibase.io/api/mcp
   ```
3. The first time you use it, a browser window will open asking you to log in and select a workspace
4. Once connected, you can start asking questions about your data

#### Cursor

1. Open Cursor settings and go to **MCP Servers**
2. Add a new server:
   * **Name**: Optibase
   * **Type**: HTTP
   * **URL**: `https://<your-optibase-url>/api/mcp`
3. Log in when prompted and select your workspace

#### Other MCP-Compatible Clients

Any client that supports the MCP protocol can connect using the server URL above. Authentication is handled automatically via OAuth — you'll be prompted to log in and pick a workspace on first use.

***

### What Can You Do?

Once connected, just ask your AI assistant questions in plain English. Here's what's possible:

#### Analyze Your A/B Tests

Ask about test performance, compare variants, and get actionable recommendations.

* "Show me all my active A/B tests"
* "What are the results for my homepage headline test?"
* "Which variant is winning in my pricing page test?"
* "Compare conversion rates across all variants for my checkout flow test"
* "How has my hero section test performed over the last 30 days?"
* "Show me results for my landing page test filtered by desktop users only"
* "Which of my tests have enough data to declare a winner?"

#### Review Website Content & Suggest Improvements

The assistant can fetch your live test pages and analyze the actual content of each variant.

* "Fetch the page for my hero section test and tell me what each variant looks like"
* "Suggest copy improvements for the losing variant in my homepage headline test"
* "What are the differences between variant A and B in my CTA button test?"

#### Explore Your Traffic & Analytics

Understand how visitors interact with your site across pages, devices, and geographies.

* "What are my top 10 most visited pages?"
* "Show me daily traffic trends for the last month"
* "How many tested users did I have each month this year?"
* "Break down traffic to /pricing by country"
* "Compare mobile vs desktop traffic on my landing pages"

#### Understand Your Heatmaps

Get engagement summaries from your heatmap data without looking at screenshots.

* "List all my heatmaps"
* "What's the click and scroll data for my homepage heatmap?"
* "Compare mobile vs desktop engagement on my product page"

#### Track Conversions

Review your conversion goals and how they perform across tests.

* "List all my conversion goals"
* "Show me daily conversion trends for my signup form test"
* "Which tests are connected to my 'Purchase' conversion?"

#### Segment Your Audience

Break down your test visitors by country, device, browser, or operating system.

* "What devices do visitors in my pricing page test use?"
* "Break down visitors by country for my homepage headline test"
* "Show me the browser distribution for my checkout flow test"

#### Get Strategic Insights

Combine multiple data points and ask for high-level recommendations.

* "Give me a summary of all my running experiments"
* "Analyze my pricing page test and recommend what I should do next"
* "Which tests should I stop and which should keep running?"
* "What patterns do you see across my recent test results?"

***

### Tips

* **You don't need to know tool names** — just ask naturally. The AI will figure out which data to pull.
* **Filter by date** — ask for "last 7 days", "this month", or any specific date range.
* **Filter by segment** — narrow results by country, device type (phone/tablet/desktop), browser, or OS.
* **Combine questions** — ask follow-up questions to dig deeper into any result.
* **Ask for recommendations** — the AI can analyze your data and suggest next steps, not just report numbers.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.optibase.io/integrations/mcp-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
