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

# Connect GitHub and MCP servers

> Let Itoflow's research agent read and change your GitHub repositories, open draft pull requests, and call tools on your own MCP servers. Tokens never reach the model or the sandbox.

> [!TIP]
>
> **The easiest way: ask your AI assistant.** With [Itoflow MCP](https://docs.itoflow.ai/mcp/install.md) connected to Claude or Codex, paste:
>
> ```text theme={null}
> Use Itoflow to list my MCP server connections and their status, and show the
> tools each ready connection offers.
> ```
>
> > [card] [Open in Claude](https://claude.ai/new?q=Use%20the%20Itoflow%20plugin%20\(https%3A%2F%2Fgithub.com%2Fitoflow%2Fskills\)%20for%20this.%20If%20it%20isn't%20installed%20yet%2C%20first%20tell%20me%20how%20to%20install%20it%20and%20sign%20in%20to%20Itoflow%2C%20and%20wait%20until%20I%20confirm.%20Then%3A%0A%0AUse%20Itoflow%20to%20list%20my%20MCP%20server%20connections%20and%20their%20status%2C%20and%20show%20the%20tools%20each%20ready%20connection%20offers.)
> >
> > Start this in Claude with the Itoflow plugin.
>
> > [card] [Open in ChatGPT](https://chatgpt.com/?q=Use%20the%20Itoflow%20plugin%20\(https%3A%2F%2Fgithub.com%2Fitoflow%2Fskills\)%20for%20this.%20If%20it%20isn't%20installed%20yet%2C%20first%20tell%20me%20how%20to%20install%20it%20and%20sign%20in%20to%20Itoflow%2C%20and%20wait%20until%20I%20confirm.%20Then%3A%0A%0AUse%20Itoflow%20to%20list%20my%20MCP%20server%20connections%20and%20their%20status%2C%20and%20show%20the%20tools%20each%20ready%20connection%20offers.)
> >
> > Start this in ChatGPT with the Itoflow plugin.
>
> Using another client? Copy the prompt with the button on the code block.
>
> No tokens or code needed. You can also do this in the [Itoflow app](https://app.itoflow.ai/integrations). The rest of this page covers the HTTP API.

Connections give Itoflow's research agent extra tools: your GitHub repositories, or any remote MCP server you use. Once connected, they are available in all your chats.

This page is about connecting other services *to* Itoflow. To connect your own assistant to Itoflow, see [Itoflow MCP](https://docs.itoflow.ai/mcp/overview.md).

You can manage connections in three ways: in the app under [**Integrations**](https://app.itoflow.ai/integrations) (in the sidebar, or under **More** on mobile), with the HTTP endpoints below, or by asking your assistant through Itoflow MCP. All three change the same saved connections.

## GitHub

| Endpoint | What it does |
| - | - |
| `GET /integrations/github/availability` | Whether GitHub connections are enabled for your account |
| `POST /integrations/github/getConnection` | Your connection status |
| `POST /integrations/github/connect` | Starts connecting or reconnecting; returns a `url` |
| `POST /integrations/github/listRepositories` | Repositories Itoflow can see |
| `POST /integrations/github/disconnect` | Disconnects |

The `POST` endpoints take a JSON body; send `{}` when there are no inputs.

To connect, call `connect`, open the returned `url` in a browser and approve access on GitHub, then call `getConnection` to confirm. If a write returns `outcome_unknown`, check the connection before you retry. The status response also has an `installUrl`, where you choose which repositories Itoflow can see.

`listRepositories` takes `page` and `perPage` and returns `items` and `nextPage`. Keep `perPage` the same while you follow `nextPage`.

```bash theme={null}
curl --fail-with-body --silent --show-error \
  'https://api.itoflow.ai/integrations/github/listRepositories' \
  --header "Authorization: Bearer $ITOFLOW_ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{"page": 1, "perPage": 30}'
```

## Remote MCP servers

You can connect any MCP server that has a public HTTPS URL and supports Streamable HTTP.

```text theme={null}
Add server URL → Sign in with OAuth or a bearer token → Tools appear in your chats
```

In the app, open [**Integrations → MCP servers**](https://app.itoflow.ai/integrations#connections) (in the sidebar, or under **More** on mobile), select **Add MCP server**, enter the URL, then choose **Connect**. With the API, first call `GET /integrations/remote-mcp/availability` to check the feature is on for you; `POST /integrations/remote-mcp/list` lists your connections. Then:

1. `POST /integrations/remote-mcp/add` with `endpoint` and an optional `name`. It returns the new `connection`, including its ID and `version`.
2. `POST /integrations/remote-mcp/connect` with `connectionId` and `expectedVersion`. If the server uses OAuth, open the returned `authorizationUrl` and sign in.
3. `POST /integrations/remote-mcp/getStatus` with `connectionId` and the returned `attemptId` until the connection is ready.

```bash theme={null}
curl --fail-with-body --silent --show-error \
  'https://api.itoflow.ai/integrations/remote-mcp/add' \
  --header "Authorization: Bearer $ITOFLOW_ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{"endpoint": "SERVER_URL", "name": "Research tools"}'
```

Replace `SERVER_URL` with the MCP server's HTTPS URL.

Other endpoints rename a connection, list its tools, disconnect it, or remove it. Removing also deletes the saved credential. Each change takes the connection's current `expectedVersion`; if another change got there first, you get `connection_changed`. Read the list again and retry with the new version.

If a `connect` response is lost, call `getStatus` before you try again.

### Servers that use a bearer token

If the server gives you a token instead of OAuth, pass it as `bearerToken` to `add` or `connect`, or paste it in the app. Send only the token, without the `Bearer ` prefix: at most 8,192 characters, with no spaces or control characters. Itoflow keeps the token exactly as issued, including punctuation, and stores it encrypted. It is sent only to that server, and Itoflow never passes on your own Itoflow credentials.

When you use MCP, your assistant's inputs can end up in its conversation history. Don't paste server tokens into a chat; add them in the app or with the API instead.

### If connecting fails

* After a failed OAuth sign-in, choose **Connect** again to start a fresh one.
* If a server changes its OAuth sign-in settings, connecting again deletes the old saved sign-in and starts a new one. You don't need to disconnect or remove the server first.
* If Itoflow says the server rejected the OAuth discovery request, Itoflow couldn't fetch the server's sign-in details. Try again; if it keeps failing, email [support@itoflow.ai](mailto:support@itoflow.ai).
* `POST /integrations/remote-mcp/listTools` shows every tool a connected server offers.
* A connected server can be temporarily absent from a research turn when catalog discovery fails. Missing tools alone do not mean your OAuth sign-in expired; reconnect when the connection reports that sign-in is required.

For a worked example, see [Research with your own code and tools](https://docs.itoflow.ai/use-cases/research-with-your-code.md). [How we connected customers' MCP servers and GitHub repos to our research agent](https://itoflow.ai/blog/how-we-connected-mcp-servers-and-github), October 7, 2026, explains how tokens stay out of the model and the sandbox.

See the [GitHub](https://docs.itoflow.ai/api-reference/coverage.md#github) and [MCP connection](https://docs.itoflow.ai/api-reference/coverage.md#connected-mcp-servers) endpoint references for every field.


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