This MCP server acts as an interface for an Online Judge platform, allowing AI agents to interact with coding problems and submissions.
List Problems (
list_problems): Retrieve a paginated list of available coding problems, with configurable offset and limit parameters.List My Submissions (
list_my_submissions): Fetch the authenticated user's recent submission history, also supporting pagination.Get Problem Details (
get_problem_details): Retrieve full details of a specific problem by its display ID (e.g.,PR-114-1-31), including descriptions, sample inputs/outputs, limits, and rules.Submit Code (
submit_code): Submit source code (C, C++, Python3, etc.) to a specific problem using its internal system ID.Get Submission Status (
get_submission_status): Poll and check the result/status of a previously submitted solution using its submission ID.
Authentication uses username/password credentials, and the server is compatible with MCP clients such as Claude Desktop, Cursor, Cline, and OpenCode IDE.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Online Judge MCP ServerList the latest problems and show me the details for problem 1001"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Online Judge MCP Server
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:
Using pip or pipx
Alternatively, you can install the package directly into your Python environment:
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:
Note: If you installed globally via
Cursor & Cline
In the MCP settings panel, add a new server:
Type: command
Name:
oj-mcp-serverCommand:
uvx oj-mcp-server(orEnvironment: Set
OJ_URL,OJ_USERNAME, andOJ_PASSWORD
OpenCode
Add this configured server inside your opencode.json (under the mcp key):
Note: If using pip, change the command array to