---
title: "POST /api/v1/projects/{projectUuid}/aiAgents/mcpServers/github/connect"
method: POST
path: "/api/v1/projects/{projectUuid}/aiAgents/mcpServers/github/connect"
---

# POST /api/v1/projects/{projectUuid}/aiAgents/mcpServers/github/connect

`POST /api/v1/projects/{projectUuid}/aiAgents/mcpServers/github/connect`

## Path parameters

- `projectUuid` string, required

## Request body

- ApiConnectGithubMcpServerBody
  - `credentialScope` 'shared' | 'user', required
  - `personalAccessToken` string, required

## Response `201`

Created

- ApiAiMcpServerResponse
  - `results` AiMcpServer, required
    - `updatedAt` string, date-time, required
    - `createdAt` string, date-time, required
    - `connectedByUserUuid` string, nullable, required
    - `error` string, nullable, required
    - `connectionStatus` 'not_connected' | 'connecting' | 'connected' | 'error', required
    - `credentialScope` 'shared' | 'user', required
    - `hasCredentials` boolean, required
    - `allowOAuthCredentialSharing` boolean, required
    - `authType` 'none' | 'bearer' | 'oauth', required
    - `iconUrl` string, nullable, required
    - `url` string, required
    - `name` string, required
    - `projectUuid` string, required
    - `uuid` string, required
  - `status` 'ok', required

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/lightdash/apis/lightdash-api.md) · [All operations](https://skmtc.dev/lightdash/apis/lightdash-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lightdash/lightdash-api/revisions/40c933755c9a/schema)
