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

# Get project builds via API key

> Get all builds for a project using API key authentication. Requires BUILD_AND_DEPLOY scope.



## OpenAPI

````yaml get /api/projects/{id}/builds
openapi: 3.0.0
info:
  title: LeanMCP SDK API
  description: >-
    API endpoints for LeanMCP SDK integration. These endpoints use API key
    authentication and are designed for programmatic access from the CLI and
    SDK.
  version: 1.0.0
servers:
  - url: https://api.leanmcp.com
    description: Production
  - url: http://localhost:3001
    description: Local Development
security: []
tags:
  - name: builds-sdk
  - name: chat-messages-api-key
  - name: chats-api-key
  - name: deployments-api-key
  - name: deployments-sdk
  - name: mapping-sdk
  - name: projects-api-key
paths:
  /api/projects/{id}/builds:
    get:
      tags:
        - projects-api-key
      summary: Get project builds via API key
      description: >-
        Get all builds for a project using API key authentication. Requires
        BUILD_AND_DEPLOY scope.
      operationId: ProjectsApiKeyController_getProjectBuilds
      parameters:
        - name: id
          required: true
          in: path
          description: Project ID
          schema:
            example: proj_123456789
            type: string
      responses:
        '200':
          description: Builds retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Build'
        '404':
          description: Project not found or access denied
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Build:
      type: object
      properties:
        id:
          type: string
          description: Unique ID of the build
          example: f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454
        projectId:
          type: string
          description: ID of the project this build belongs to
          example: a1b2c3d4-5678-90ab-cdef-11111111111
        awsBuildId:
          type: string
          description: AWS CodeBuild ID
          example: mcp-docker-build-2:12345678-1234-5678-abcd-12345678abcd
        status:
          type: string
          description: Current status of the build
          enum:
            - pending
            - in_progress
            - succeeded
            - failed
            - stopped
          example: in_progress
        s3SourceLocation:
          type: string
          description: S3 location of the source code
          example: s3-mcp-dev/1f04e1ec-8ff0-4bd6-8195-e58f0dd57326/project-id/file.zip
        ecrRepository:
          type: string
          description: ECR repository name
          example: ecr-mcp-dev/project-id
        logGroupName:
          type: string
          description: CloudWatch log group name
          example: /aws/codebuild/mcp-docker-build-2
        logStreamName:
          type: string
          description: CloudWatch log stream name
          example: 12345678-1234-5678-abcd-12345678abcd
        currentPhase:
          type: string
          description: Current phase of the build
          example: BUILD
        startTime:
          type: string
          description: Build start time
          example: '2023-01-01T00:00:00.000Z'
        endTime:
          type: string
          description: Build end time
          example: '2023-01-01T00:10:00.000Z'
        createdAt:
          type: string
          description: Build creation time
          example: '2023-01-01T00:00:00.000Z'
        updatedAt:
          type: string
          description: Build last update time
          example: '2023-01-01T00:10:00.000Z'
      required:
        - id
        - projectId
        - awsBuildId
        - status
        - s3SourceLocation
        - startTime
        - createdAt
        - updatedAt
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Enter your LeanMCP API key

````