mcpField
M
mcp-server

mcp-server

Remote
github.com/zchaffee1Cloud & Infra0Updated 79w ago
Repository

About mcp-server

This server provides HDF5 file operations, Slurm job management, hardware information, and compression capabilities. It is intended for clients that need to perform these operations through MCP endpoints.

Key features

  1. 01Read HDF5 datasets and list file contents
  2. 02Submit Slurm jobs and check status
  3. 03Retrieve CPU, memory, and disk information
  4. 04Compress and decompress data and files

Use cases

  1. 01Read a dataset from an HDF5 file
  2. 02Submit a Slurm job and inspect its status
  3. 03Check node hardware details
  4. 04Compress or decompress data

MCP support

The server accepts MCP requests at `POST /mcp` and provides a `GET /health` health check endpoint.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttp://localhost:8000
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

Details

From the project README

mcp-server

By: Zack Chaffee A20478873

A server implementing Model Coupling Protocol (MCP) capabilities for HDF5 file operations and Slurm job management.

Features

HDF5 file operations:
  • Read datasets
  • List file contents
Slurm job management:
  • Submit jobs
  • Check job status
Node Hardware Operations
  • Get CPU information
  • Get memory information
  • Get disk information
  • Get comprehensive system information
Compression Operations
  • Compress string data with gzip or zlib
  • Compress files with gzip or zlib
  • Decompress data

Initialization

Once you clone this reponsitory cd into it

After this hwe will create a virtual enviornment and install all dependincies:

uv venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv pip install -e .
uv pip install -e ".[test]"

Running

To startup the server run:

python -m src.server

This will autoclocate the server at http://localhost:8000.

Endpoints

  • POST /mcp: Main endpoint for MCP requests
  • GET /health: Health check endpoint

Examples:

import httpx

async with httpx.AsyncClient() as client:
    # Read a dataset
    response = await client.post("http://localhost:8000/mcp", json={
        "capability": "hdf5",
        "action": "read_dataset",
        "parameters": {
            "file_path": "/path/to/data.h5",
            "dataset_path": "/path/to/dataset"
        }
    })
    
    # List contents
    response = await client.post("http://localhost:8000/mcp", json={
        "capability": "hdf5",
        "action": "list_contents",
        "parameters": {
            "file_path": "/path/to/data.h5",
            "group_path": "/"
        }
    })
curl -X POST http://localhost:8000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "mcp/listTools", 
    "params": {}, 
    "id": "1"
  }'

Testing

For testing rung:

pytest

For tests with coverage:

pytest --cov=src

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.