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

# Create a personal MCP key



## OpenAPI

````yaml /api-reference/openapi.json post /api/settings/mcp-keys
openapi: 3.1.0
info:
  title: LaneSync API
  description: >-
    REST API for LaneSync release governance — milestones, evidence, quality,
    and sync.
  version: 1.0.0
  contact:
    name: LaneSync
    url: https://lanesync.dev
servers:
  - url: https://lanesync.dev
    description: Hosted SaaS
security: []
tags:
  - name: Health
    description: Liveness and readiness
  - name: Auth
    description: GitHub OAuth and sessions
  - name: Dashboard
    description: Org-wide milestone views
  - name: Milestones
    description: Release pipeline and deploy gates
  - name: Repos
    description: Repository bootstrap and configuration
  - name: Sync
    description: GitHub sync triggers
  - name: Evidence
    description: CI evidence upload (no session)
  - name: Quality
    description: Quality scorecards and exports
  - name: Projects
    description: Multi-repo release projects
  - name: Team
    description: Workspace members and invites
  - name: Webhook
    description: GitHub App webhooks
  - name: Reviews
    description: Live evidence reviewer policy and eligibility
  - name: History
    description: Recorded shipped releases
  - name: MCP
    description: Remote MCP connection, OAuth, and personal keys
paths:
  /api/settings/mcp-keys:
    post:
      tags:
        - MCP
      summary: Create a personal MCP key
      operationId: createMcpKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                scope:
                  type: string
                  enum:
                    - read
                    - release:write
                  default: read
      responses:
        '201':
          description: The key is returned only once and expires after 30 days.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/McpKey'
                  - type: object
                    required:
                      - key
                    properties:
                      key:
                        type: string
                        pattern: ^lsm_
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            Delegated GitHub credential is invalid or permission is denied. Read
            the error message for the reconnect or access action.
        '503':
          description: >-
            GitHub verification is temporarily unavailable. Retry key creation
            after recovery.
          headers:
            Retry-After:
              description: Optional suggested wait in seconds for GitHub throttling.
              schema:
                type: integer
                minimum: 1
      security:
        - sessionCookie: []
components:
  schemas:
    McpKey:
      type: object
      required:
        - id
        - name
        - prefix
        - createdAt
        - expiresAt
        - lastUsedAt
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        prefix:
          type: string
        createdAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        lastUsedAt:
          type:
            - string
            - 'null'
          format: date-time
        scope:
          type: string
          enum:
            - read
            - release:write
    Error:
      type: object
      properties:
        error:
          type: string
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid session
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: connect.sid
      description: GitHub OAuth session cookie

````

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