Skip to main content

Agentic MCP tools for HPC

Project description

hpc-mcp

🌀 Agentic MCP tools for High Performance Computing

PyPI version

img/hpc-mcp.png

Related Projects

  • flux-mcp: MCP functions for Flux Framework.
  • fractale-mcp: (fractale) MCP orchestration (agents, databases, ui interfaces).

Usage

This is a library of MCP tools (functions, prompts, and resources) intended for converged computing and HPC use cases. A demo server is provided here, and largely functions are expected to be used a-la-carte as imports to other libraries. We welcome contributions of all functions types that are related to HPC, converged computing, and science. These MCP tools can be used via a standalone server, or combined with other tools.

Server

We provide examples for fastmcp and a vanilla mcp (stdio) setup. Neither requirements are added to the install directly, so it's up to the user (you) to install. Tests are performed with fastmcp (TBA)

fastmcp

You will need fastapi and fastmcp installed.

# fastmcp
pip install fastmcp fastapi

To start the demo server:

# Vanilla MCP (with cli)
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0"}}}' | python3 -m hpc_mcp.server | jq

# Initialize and list tools
(echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "manual-test", "version": "1.0"}}}';
 echo '{"jsonrpc": "2.0", "method": "notifications/initialized"}';
 echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}') | python3 -m hpc_mcp.server | jq

# FastMCP
python3 -m hpc_mcp.server.fastmcp

Testing

I will add tools to git as I write tests for them. To test, start the fastmcp server in one terminal:

python3 -m hpc_mcp.server.fastmcp

In another terminal, run the test. You'll need to pip install pytest pytest-asyncio

pytest -xs tests/test_build_docker.py

# or
pytest -xs tests/test_*.py

TODO

  • Add annotated descriptions to all functions for LLM.

Tools to add:

  • helpers
    • debug
    • result parser (regular expressions)
    • timer (agent can request to wait some N time)
  • kubernetes
    • deploy job
    • deploy minicluster

License

DevTools is distributed under the terms of the MIT license. All new contributions must be made under this license.

See LICENSE, COPYRIGHT, and NOTICE for details.

SPDX-License-Identifier: (MIT)

LLNL-CODE- 842614

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

hpc_mcp-0.0.12.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

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

hpc_mcp-0.0.12-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file hpc_mcp-0.0.12.tar.gz.

File metadata

  • Download URL: hpc_mcp-0.0.12.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for hpc_mcp-0.0.12.tar.gz
Algorithm Hash digest
SHA256 6844e51ecc4873a584673b89624ff76692635780165a63adcd5e67444f4d20e4
MD5 12e767e570fa074806d8c8bd814d2abd
BLAKE2b-256 651d1f27fd173aa53e6b7a53e705f10123a8530ed5174894ef8aa0d28e9eabad

See more details on using hashes here.

File details

Details for the file hpc_mcp-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: hpc_mcp-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for hpc_mcp-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 5b5cc2257ee21fcdca121381fe0a1b13d5a00e122a246a44253b3e7958a585b9
MD5 2d2c0c1410465f54cffaf3737b0df0b4
BLAKE2b-256 00622080b3ed9fa54c856905da5a60c96902ea9979abc66cb13d3cbf4d27e25c

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