Skip to content
Harjot Singh Rana

Full-Stack & AI Product Engineer

All projects

Locum

Open-source Python MCP server that lets Grok Bot hand coding jobs to Claude Code and Codex running on your own machine. It ships its own OAuth 2.1 authorization server, an async job queue with a persistent journal, and spend and volume guardrails, and is reached over a Cloudflare tunnel as a Grok custom connector.

Case study

Situation

Grok Bot can call custom MCP connectors, but it has no way to run code on a developer's own machine. Locum fills that gap so Grok can delegate a coding job to the Claude Code or Codex install you already use.

Constraint

The server is reachable from the public internet through a tunnel and can start coding agents on a personal machine. Access had to be gated by real authorization, and runaway jobs had to be capped.

Stack

PythonMCPClaude CodeCodexCloudflare

What I built

  • Built the MCP server in Python with 8 tools covering the job lifecycle.
  • Wrote an OAuth 2.1 authorization server with PKCE and a passphrase consent gate instead of relying on the tunnel for access control.
  • Added an async queue with a persistent journal, plus spend and volume guardrails.

Outcome

A single Python package that connects Grok Bot to local coding agents with authorization, restart-safe job tracking, and spend limits. Released under Apache-2.0.

Role
Creator and maintainer
Timeline
Aug 2026 · Sep 2026

Technical detailPython 3.11+; MCP; OAuth 2.1 with PKCE; async job queue with a persistent journal; Cloudflare tunnel; GitHub Actions.

Discuss an agent integration

Key features

  • 8 MCP tools for starting, watching, and stopping coding jobs
  • Built-in OAuth 2.1 authorization server with PKCE and passphrase consent
  • Async job queue with a persistent journal that survives restarts
  • Spend and volume guardrails per job and per day
  • --doctor command that checks the setup before you connect
  • Dashboard for live job status
  • Works with Claude Code and Codex on your own machine
  • Apache-2.0; independent project, not affiliated with xAI, OpenAI, Anthropic, or Anysphere