Skip to main content

Template-based MCP server for remote job execution

Project description

Make-Vibe

This project is designed to allow an AI coding agent to tune a code while performing performance experiments on a remote HPC system. You will be able to edit and develop code locally in a vibe coding tool while compiling and running on remotely. This includes support for doing the execution on multiple nodes.

How It Works

  • Prepare the code you would like to work on with an associated Makefile.
  • Prepare a template for a jobscript on your remote machine.
  • An MCP server is dynamically generated from your Makefile and exposes the targets to your local LLM.
  • BATCH mode: Every time a tool call is made, the code is synchronized to the remote machine, a jobscript is generated and submitted, and the results of the jobscript are returned to the LLM.
  • PERSISTENT mode: Jobs are submitted to a preallocated compute node.
  • LOCAL mode: commands executed on the same computer as the vibe coding tool.

Quick Start

pip install make-vibe

Then register it with Claude Code from your project directory:

claude mcp add make-vibe make-vibe

Open the project in Claude Code. If config.json and config.sh don't exist yet, make-vibe will expose a get_setup_help tool — call it and the agent will walk you through creating the required files for your environment.

Once the config files are in place, reload the MCP server and all your Makefile targets will be available as make_<target> tools.

The example/ directory includes working setups to reference:

  • nbody - turn a naive n-body code into an openmp parallel and optimized code.
  • matmul - optimize the compiler flags for a matrix multiplication code.
  • heat1d - MPI porting of a heat flow calculation.

Key Features

  • Automatic tool generation - Parses your Makefile, creates MCP tools for each target.
  • Remote execution - Built on remotemanager for job submission
  • Resource control - Specify MPI/OMP parameters per execution
  • Build / run variables - Pass compiler flags and other env vars (e.g., cflags="-O3")

Main Components

Makefile Target Definition:

...
# @env: CFLAGS - Compiler flags      ← Becomes MCP tool parameter
build:                               ← Becomes tool name: make_build
    $(CC) $(CFLAGS) -o app app.c     ← Actual command
...

Jobscript template:

...
#SBATCH --cpus-per-task=#OMP:default=1#      ← Becomes MCP tool parameter
#SBATCH --ntasks=1
module load system/fx700 FJSVstclanga/1.0.30.01
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK}

Template Configuration:

{
  ...
  "submitter": "sbatch",                          ← Jobscript submitter
  "template_params": {"MPI": "How many mpi..."},  ← Becomes tool parameters
  "template_file": "fx700.sh"                     ← Job script template file
  ...
}

Run Modes

The code can run in three different modes. PERSISTENT and BATCH are the modes this tool accomplishes. LOCAL could be useful if you want to enforce some fixed behavior / environment setting procedures for an LLM.

┌───────────────────────────────────────────────────────────────────────────┐
│          LOCAL: Developer's Machine (Claude Code + MCP Server)            │
│                                                                           │
│          ┌──────────────┐         ┌─────────────────┐                     │
│          │  Makefile    │────────>│   make-vibe     │                     │
│          │  (targets)   │  parsed │   MCP Server    │                     │
│          │              │         │                 │                     │
│          │ • build      │         │  Auto-generates │                     │
│          │ • run        │         │  MCP tools from │                     │
│          │ • run-large  │         │  targets        │                     │
│          └──────────────┘         └─────────────────┘                     │
│                 +                          |                              │
│          ┌──────────────┐                  |                              │
│          │  Template    │                  v                              │
│          │  config.json │         ┌─────────────────┐                     │
│          │  template.sh │────────>│  Tool Call      │                     │
│          │              │         │  + Parameters   │                     │
│          │ • host       │  fills  │  (MPI=4, etc.)  │                     │
│          │ • submitter  │  params └─────────────────┘                     │
│          │ • parameters │                  |                              │
│          └──────────────┘                  | + rsync                      │
└────────────────────────────────────|──────────────────────────────────────┘
                                     |
              ┌──────────────────────┼────────────────────────┐
              |                      |                        |
              v                      v                        v

┌──────────────────────┐  ┌──────────────────────┐  ┌──────────────────────┐
│  MODE 1: LOCAL       │  │  MODE 2: PERSISTENT  │  │  MODE 3: BATCH       │
│  submitter: "bash"   │  │  submitter: "srun    │  │  submitter: "sbatch" │
│                      │  │    --jobid=XXX bash" │  │                      │
├──────────────────────┤  ├──────────────────────┤  ├──────────────────────┤
│                      │  │                      │  │                      │
│  ┌────────────────┐  │  │  ┌────────────────┐  │  │  ┌────────────────┐  │
│  │ Local Machine  │  │  │  │ Pre-allocated  │  │  │  │  Job Queue     │  │
│  │                │  │  │  │ Compute Node   │  │  │  │                │  │
│  │  Execute       │  │  │  │                │  │  │  │ Job 1→[SLURM]  │  │
│  │  directly      │  │  │  │  [Active job]  │  │  │  │ Job 2→[SLURM]  │  │
│  │                │  │  │  │   Submit to    │  │  │  │ Job 3→[SLURM]  │  │
│  │  bash script   │  │  │  │   this job     │  │  │  │                │  │
│  │                │  │  │  │                │  │  │  │  [Each call =  │  │
│  └────────────────┘  │  │  │ [Job keeps     │  │  │  │  New job]      │  │
│                      │  │  │  running]      │  │  │  │                │  │
│                      │  │  └────────────────┘  │  │  └────────────────┘  │
├──────────────────────┤  ├──────────────────────┤  ├──────────────────────┤
│ ✓ No queue           │  │ ✓ No queue wait      │  │ ✓ Fair scheduling    │
│ ✓ Low latency        │  │ ✓ Rapid iteration    │  │ ✓ Long runs          │
│ ✓ Good for testing   │  │ ✓ Interactive feel   │  │ ✓ Independent runs   │
│                      │  │                      │  │ ✓ Cluster policies   │
│ ✗ Fixed resources    │  │ ✗ Must pre-allocate  │  │                      │
│ ✗ Must run vibe tool │  │ ✗ Fixed resource     │  │ ✗ Queue delays       │
│   on a compute node  │  │ ✗ size (#nodes)      │  │ ✗ Slower iteration   │
└──────────────────────┘  └──────────────────────┘  └──────────────────────┘

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

make_vibe-0.1.7.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

make_vibe-0.1.7-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file make_vibe-0.1.7.tar.gz.

File metadata

  • Download URL: make_vibe-0.1.7.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for make_vibe-0.1.7.tar.gz
Algorithm Hash digest
SHA256 66ccec1bafe5861754051f9823daec35ed80f94a442493f7812433e976f16841
MD5 67cd9bc20df92f0279d184c1ee6be016
BLAKE2b-256 f02e5bfae55a9d16b9c8dd59cd80d6ba69da3703a48bf185d015c098daa9e304

See more details on using hashes here.

File details

Details for the file make_vibe-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: make_vibe-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for make_vibe-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4bc8e841b2b1b5e76cc5f7d4e25bd66cf204e5ffc4d5bd94bf4ee21536f021f4
MD5 e11e2c340a722ab24d2eb434700f95ec
BLAKE2b-256 f2744431fc42b23c0e1754ad694951bd7fc8d54c22fbb0578534a2982fff7076

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