Skip to main content

Online Judge MCP Server

Python Version PyPI License

This is a Model Context Protocol (MCP) server that provides AI agents with tools to interact with an Online Judge API.

Features

Provides the following tools:

  • list_problems(offset, limit): List available problems on the OJ.
  • list_my_submissions(offset, limit): List recent submissions made by the authenticated user.
  • get_problem_details(problem_id): Fetch detailed descriptions, samples, limits, and rules of a problem.
  • submit_code(problem_id, code, language): Submit source code to a specific problem.
  • get_submission_status(submission_id): Check the polling status of a code submission.

Quickstart

Using uvx (Recommended)

The easiest way to run this server is using uvx, which automatically downloads the correct Python version, creates an ephemeral environment, and runs the tool seamlessly:

set OJ_URL="http://localhost:8000" # Replace with actual OJ URL
set OJ_USERNAME="your-username"
set OJ_PASSWORD="your-password"

uvx oj-mcp-server

Using pip or pipx

Alternatively, you can install the package directly into your Python environment:

pip install oj-mcp-server
oj-mcp-server

Usage with MCP Clients

To use this server, add it to your MCP client's configuration (e.g., Claude Desktop, Cursor, Cline).

Claude Desktop

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "oj-mcp-server": {
      "command": "uvx",
      "args": ["oj-mcp-server"],
      "env": {
        "OJ_URL": "http://localhost:8000",
        "OJ_USERNAME": "your-username",
        "OJ_PASSWORD": "your-password"
      }
    }
  }
}

Note: If you installed globally via pip, simply change "command" to "oj-mcp-server" and "args" to [].

Cursor & Cline

In the MCP settings panel, add a new server:

  • Type: command
  • Name: oj-mcp-server
  • Command: uvx oj-mcp-server (or oj-mcp-server if installed via pip)
  • Environment: Set OJ_URL, OJ_USERNAME, and OJ_PASSWORD

OpenCode

Add this configured server inside your opencode.json (under the mcp key):

{
  "mcp": {
    "oj-mcp-server": {
      "type": "local",
      "command": ["uvx", "oj-mcp-server"],
      "environment": {
        "OJ_URL": "http://localhost:8000",
        "OJ_USERNAME": "your-username",
        "OJ_PASSWORD": "your-password"
      }
    }
  }
}

Note: If using pip, change the command array to ["oj-mcp-server"].

Metadata

Release files for oj-mcp-server 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oj-mcp-server 0.1.1
File Size Uploaded Provenance
oj_mcp_server-0.1.1.tar.gz 60.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for oj-mcp-server 0.1.1
File Interpreter ABI Platform
oj_mcp_server-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 66.5 kB

Release files / oj_mcp_server-0.1.1.tar.gz

Download URL oj_mcp_server-0.1.1.tar.gz
Size 60.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b2de360f2b89f7295b5044030e4e36c2c9021008636570232e36c99bdde5ecbc
BLAKE2b-256 checksum
How to use checksums
a4c6773ca1ba8de1d8bf017e36a8e0ad5d58886e31bd3b9fe7f4a995b3319a91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / oj_mcp_server-0.1.1-py3-none-any.whl

Download URL oj_mcp_server-0.1.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
953d0753a58b0ccf064897a06be86a74fe1bb0580ae46dd970b09a41d4916855
BLAKE2b-256 checksum
How to use checksums
3ad0b52ba454c6b1f74d52df2559cc57735e08d1d8dcfcd8ab9606188e2b6f34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for oj-mcp-server 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page