# Mobitree MCP server

Mobitree provides a small, stateless, read-only [Model Context Protocol] endpoint
at:

```text
https://mobitr.ee/mcp
```

It is designed for ChatGPT and other MCP-compatible clients that need reliable
answers about the Mobitree REST API and product support. It reads only the
checked-in [`openapi.json`](./openapi.json) and Markdown feature contracts. It
does not load a user session, accept API keys, query customer records, or expose
profile mutations.

## Available tools

| Tool | Purpose |
| --- | --- |
| `search_api_docs` | Search API operations and feature documentation. |
| `get_api_operation` | Read one method/path from the canonical OpenAPI contract. |
| `get_support_article` | Read a bounded support article (authentication, links, Instagram, versions, campaigns, or MCP). |

The server also publishes read-only MCP resources for the same articles and the
OpenAPI JSON document. Every tool is annotated as read-only and non-destructive.

## Register with the OpenAI Responses API

OpenAI’s official MCP integration uses a public HTTPS MCP server URL as a tool
in the Responses API. A minimal request looks like:

```bash
curl https://api.openai.com/v1/responses \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6",
    "tools": [{
      "type": "mcp",
      "server_label": "mobitree",
      "server_description": "Read-only Mobitree API and support documentation",
      "server_url": "https://mobitr.ee/mcp",
      "require_approval": "never"
    }],
    "input": "How do I create a profile link?"
  }'
```

For ChatGPT custom connectors or a private deployment, follow the current
OpenAI MCP and Connectors guide and keep the endpoint reachable over HTTPS. Do
not put a Mobitree personal API key in the MCP configuration: this server is a
documentation source, while authenticated data operations stay on `/api`.

## Transport and safety

- `POST` carries JSON-RPC 2.0 messages; `GET` is a lightweight health response.
- `OPTIONS` is supported for browser and connector preflight checks.
- Request bodies are limited to 1 MiB and responses are marked `no-store`.
- Notifications return HTTP 202 with no response body.
- Unknown methods, malformed JSON, and unknown resources fail closed.

For API calls that read or change a customer’s profile, use the authenticated
stable REST API at `https://mobitr.ee/api/v1` described in [`API.md`](./API.md),
not this MCP endpoint.

[Model Context Protocol]: https://modelcontextprotocol.io/
