Skip to main content

MCP server for the Codabench REST API

Project description

codabench-mcp

MCP server for the Codabench REST API. Lets an AI agent drive a full participant ML-benchmark workflow: discover competitions, read rules, download data, submit, poll, read leaderboards.

Features

Curated tools for the participant path:

  • search_competitions, get_competition, list_competition_phases, get_phase, get_competition_rules, list_competition_tasks, get_task
  • download_dataset (streaming + SHA-256)
  • list_my_submissions, get_submission, get_submission_logs
  • submit_to_phase (handles Codabench's 3-step upload flow)
  • poll_submission (backoff + timeout + non-error "still_running")
  • get_leaderboard, get_my_profile
  • codabench_request — generic REST escape hatch (GET-only by default)

Authentication

You need a Codabench API token. Two ways to get one:

1. Swagger UI (recommended)

  1. Visit https://www.codabench.org/api/docs/
  2. Find the api-token-auth endpoint → Try it out
  3. POST your username/password
  4. Copy the token value from the response

2. curl

curl -X POST https://www.codabench.org/api/api-token-auth/ \
  -H "Content-Type: application/json" \
  -d '{"username":"YOUR_USERNAME","password":"YOUR_PASSWORD"}'

The response is {"token": "..."}.

Install

uvx --from git+https://github.com/harshitAgr/codabench-mcp codabench-mcp

Or for development:

git clone https://github.com/harshitAgr/codabench-mcp.git
cd codabench-mcp
uv sync
uv run codabench-mcp  # requires CODABENCH_API_TOKEN

Configure an MCP client

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "codabench": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/harshitAgr/codabench-mcp",
        "codabench-mcp"
      ],
      "env": {
        "CODABENCH_API_TOKEN": "paste-your-token-here"
      }
    }
  }
}

Claude Code

claude mcp add codabench \
  --env CODABENCH_API_TOKEN=paste-your-token-here \
  -- uvx --from git+https://github.com/harshitAgr/codabench-mcp codabench-mcp

Environment variables

Variable Required Default Purpose
CODABENCH_API_TOKEN yes DRF token, sent as Authorization: Token <token>
CODABENCH_BASE_URL no https://www.codabench.org Override for tests
CODABENCH_ALLOW_WRITE_RAW no 0 Set to 1 to allow non-GET methods through codabench_request
CODABENCH_MAX_DOWNLOAD_BYTES no 5368709120 (5 GB) Cap for download_dataset

Development

uv sync
uv run pytest                              # unit tests, no network
uv run ruff check .                        # lint
uv run ruff format --check .               # format check

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codabench_mcp-0.1.0.tar.gz (57.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codabench_mcp-0.1.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file codabench_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: codabench_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 57.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codabench_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c50c7ad76af854b85c561cd2bd4c41d9232b78270a1717df53cb1ddee78aa6ee
MD5 1b065ddfb54baf4fd76b55669fb94e02
BLAKE2b-256 8fed0dbb3623a01af87a4030c14cf4cee66aecce467977aad11d3cd1331d6ab3

See more details on using hashes here.

File details

Details for the file codabench_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: codabench_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for codabench_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7df9071de984edcccb04861c8731f64ca81441586a38a54ea25e788ad265ebd3
MD5 a7436d221e305374f8f75cbf53731e4a
BLAKE2b-256 5f4d74fa803b485a3d0153575bb09a4cbfba89469a568d267cdcab380c45abb9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page