mclsp — McCode DSL Language Server
A Language Server Protocol
implementation for the McCode domain-specific languages: McStas (.instr, .comp)
and McXtrace (.instr, .comp).
Built on top of mccode-antlr and
pygls.
Features
| Feature | Status |
|---|---|
| Syntax error diagnostics | ✅ |
| Keyword completion | ✅ |
| Component name completion | ✅ |
Parameter completion inside Component(…) |
✅ |
| Hover: component signature & description | ✅ |
| Syntax highlighting (TextMate grammar) | ✅ |
| Go-to-definition of .comp files | ✅ |
Installation
pip install mclsp
# or
conda install -c conda-forge mclsp
Editor setup
VS Code
Install the McCode extension from the Marketplace (it bundles mclsp), or
point the generic LSP client extension at mclsp --stdio.
A minimal extension stub is provided in vscode-extension/.
Neovim (nvim-lspconfig)
require('lspconfig').mclsp.setup {}
A config will be submitted upstream to nvim-lspconfig once the server stabilises.
Helix
Add to ~/.config/helix/languages.toml:
[[language]]
name = "mccode"
scope = "source.mccode"
file-types = ["instr", "comp"]
language-servers = ["mclsp"]
[language-server.mclsp]
command = "mclsp"
args = ["--stdio"]
Running the server manually
mclsp --stdio # communicate over stdin/stdout (standard LSP mode)
mclsp --tcp 2087 # listen on TCP port 2087 (useful for debugging)
Development
git clone https://github.com/mcdotstar/mccode-language-server.git mclsp
cd mclsp
uv sync
uv run pytest
Metadata
Release files for mclsp 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mclsp-0.5.1.tar.gz | 100.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mclsp-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 133.6 kB
Release files / mclsp-0.5.1.tar.gz
| Download URL | mclsp-0.5.1.tar.gz |
|---|---|
| Size | 100.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db317745e52a5eda501e1a6e1e104b83cfa4c5db1a5eafc9e3d8f2ceba01ca29
|
|
BLAKE2b-256 checksum How to use checksums |
73ec0a06bce9c3a9a1cec88877a0d7ca6c50f98af869f45f4c38ce1f0bbaccdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logRelease files / mclsp-0.5.1-py3-none-any.whl
| Download URL | mclsp-0.5.1-py3-none-any.whl |
|---|---|
| Size | 32.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
649ca2afb725718f598c67c878bf8adbf053eadc1050cc19fea4665a3ea15d28
|
|
BLAKE2b-256 checksum How to use checksums |
8b8b82dcc675fcbde661f22f2ed2ed44e7a3c8bf139ce9c71a09c36bfd7c4ccb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logSecurity for mclsp 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mclsp-0.5.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.