Model Context Protocol (MCP) server for PyTorch Lightning
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"lightning-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# PyTorch Lightning MCP (Model Context Protocol) An integration layer that exposes **PyTorch Lightning** through a structured, machine-readable API. Intended for programmatic use by tools, agents, and orchestration systems. ## Features * Structured training and inspection APIs * Real PyTorch Lightning execution * Explicit, config-driven behavior * Safe model instantiation * Stdio and HTTP servers * Fully tested core logic * Clean separation between protocol, capabilities, and transport ## Project Structure ``` src/lightning_mcp/ ├── protocol.py # Request / response schema ├── handlers/ │ ├── train.py # Training capability │ └── inspect.py # Inspection capability ├── lightning/ │ └── trainer.py # Lightning integration boundary ├── server.py # Stdio server ├── http_server.py # HTTP server (FastAPI) ├── models/ │ └── simple.py # Example LightningModule ├── tools.py # Expose tools tests/ # Simple test suite ``` ## Requirements * Python 3.10 – 3.12 * PyTorch Lightning (compatible versions) * uv (recommended) ## Installation (using uv) ### 1. Install uv (if not already installed) ```bash curl -Ls https://astral.sh/uv/install.sh | sh ``` Restart your shell after installation. Verify: ```bash uv --version ``` ### 2. Clone the repository ```bash git clone https://github.com/<your-org>/lightning-mcp.git cd lightning-mcp ``` ### 3. Install dependencies To install all dependencies (including server extras): ```bash uv sync --all-extras ``` This will: * create a local virtual environment * install PyTorch Lightning and dependencies * install HTTP server dependencies (FastAPI, Uvicorn) No manual venv management is required. ## Usage ### Training (in-process) ```python from lightning_mcp.handlers.train import TrainHandler from lightning_mcp.protocol import MCPRequest handler = TrainHandler() request = MCPRequest( id="train-1", method="lightning.train", …
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.