{
  "info": {
    "name": "Sourcegraph — mcp.ai",
    "description": "REST API for the Sourcegraph MCP. Set {{apiKey}} to a workspace key (sk_live_…) created at https://mcp.ai/settings/api-keys.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.mcp.ai/api/sourcegraph",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "sk_live_...",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "sourcegraph_check_site_settings_edit_permission",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/check/site/settings/edit/permission",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "check",
            "site",
            "settings",
            "edit",
            "permission"
          ]
        },
        "description": "Tool to check whether site settings can be edited through the API. Use when you need to confirm the API allows site settings edits before attempting configuration changes.",
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "sourcegraph_compare_commits",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/compare/commits",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "compare",
            "commits"
          ]
        },
        "description": "Tool to compare two commits in a repository and retrieve their file diffs. Use after confirming the repository name and commit SHAs to inspect differences.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"base\": \"\",\n  \"head\": \"\",\n  \"repo\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "sourcegraph_get_commit_details",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/get/commit/details",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "get",
            "commit",
            "details"
          ]
        },
        "description": "Get detailed information about a specific commit in a repository.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"rev\": \"\",\n  \"repo\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "sourcegraph_get_current_user",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/get/current/user",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "get",
            "current",
            "user"
          ]
        },
        "description": "Tool to retrieve information about the currently authenticated user. Use when needing confirmation of identity via Sourcegraph GraphQL API.",
        "body": {
          "mode": "raw",
          "raw": "{}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "sourcegraph_get_file_contents",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/get/file/contents",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "get",
            "file",
            "contents"
          ]
        },
        "description": "Tool to fetch the contents of a specified file on the default branch. Use when you need raw file text without cloning the repo or using a slower code-host API.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"file_path\": \"\",\n  \"repo_name\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "sourcegraph_list_repositories",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/list/repositories",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "list",
            "repositories"
          ]
        },
        "description": "Tool to list repositories on the Sourcegraph instance. Use when you need to paginate through all available repositories.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"after\": \"\",\n  \"first\": 0\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "sourcegraph_list_repository_files",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/list/repository/files",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "list",
            "repository",
            "files"
          ]
        },
        "description": "Tool to list all files and directories in a repository path. Use when you need to enumerate files in a repository without cloning.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"rev\": \"\",\n  \"path\": \"\",\n  \"recursive\": false,\n  \"repo_name\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "sourcegraph_list_repository_languages",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/list/repository/languages",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "list",
            "repository",
            "languages"
          ]
        },
        "description": "Tool to list languages used in a repository. Use when you need to determine the primary and all languages of a given repository; call after you have the repository name.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"repoName\": \"\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    }
  ]
}