API & MCP

Everything a person can do on Open a GitHub repo in Codeharbor, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

  • POST https://codeharborrepoimport.usefulweb.app/api/v1/calculate – run Open a GitHub repo in Codeharbor
  • GET https://codeharborrepoimport.usefulweb.app/api/v1/tool – inputs, output schema, examples
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

Open a GitHub repo in Codeharbor

Give a public GitHub address (or upload a ZIP/.tar.gz) and get a Codeharbor project with the repository’s text files — the same import Codeharbor’s “Open a GitHub repo” uses. Secret files, vendored code, lock files and binaries stay out; the project remembers the repository and commit. It is a one-way copy: nothing is ever written back to GitHub.

Inputs of Open a GitHub repo in Codeharbor
FieldTypeDefaultDescription
repoUrltext—Public GitHub repository. An address like https://github.com/owner/repo, …/tree/<branch>/<folder> or owner/repo. Private repositories cannot be opened.
archivefile—Or upload the repository (.zip, .tar.gz). Used instead of the address when given, e.g. GitHub’s “Download ZIP”. Works without GitHub.
foldertext—Only this folder (optional). e.g. packages/core — leave empty for the whole repository.
includetextarea—Include only (optional). Glob patterns, one per line or comma-separated, e.g. src/**/*.ts, *.md.
excludetextarea—Leave out (optional). Glob patterns, e.g. tests/, *.snap, docs/**.
maxFileKbnumber200Largest file to include (KB)
skipVendorbooleantrueSkip vendored code and build output (node_modules, vendor, dist …)
skipLockfilesbooleantrueSkip lock files (package-lock.json, poetry.lock …)

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

  • Streamable HTTP endpoint: https://codeharborrepoimport.usefulweb.app/mcp – protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake).
  • Tools: codeharbor_repo_import
  • Local stdio connector: node src/mcp-stdio.ts --tool=codeharbor-repo-import
{
  "mcpServers": {
    "codeharbor-repo-import": { "type": "http", "url": "https://codeharborrepoimport.usefulweb.app/mcp" }
  }
}