RocqSolid
An MCP server for Rocq proof development.
The MCP is deliberately small:
checkgenerates diagnostics for a given file. It tries to return errors from proofs throughout the file. Proof states are cached for efficiency.run_atruns a command at a given position in a file. This is useful for queries likeSearchorCheck, and for one-off debugging commands.
Requirements
RocqSolid appears to be more stable on OCaml 5 than on OCaml 4. Consider upgrading if you're experiencing crashes.
RocqSolid depends on a patched version
of coq-lsp. It improves the
stability and error reporting of coq-lsp, and RocqSolid does not work
without. It is compatible with Rocq 9.0, 9.1, and 9.2. It needs to be installed
in all opam switches RocqSolid should work with:
opam repo add rocq-solid https://github.com/bn-peters/rocq-solid-mcp-opam.git
opam install rocq-solid-mcp-lsp
You might be asked to uninstall coq-lsp. Don't worry, rocq-solid-mcp-lsp is compatible with standard coq-lsp.
Agent Setup
We recommend using uv, a Python packaging tool.
To teach your favorite agent about RocqSolid:
claude mcp add --scope user rocq-solid -- uvx rocq-solid-mcp
codex mcp add rocq-solid -- uvx rocq-solid-mcp
Project Setup
The MCP looks for _CoqProject and _RocqProject files to set up file
dependencies correctly. To generate them in a dune-based project, add
(generate_project_file) to your rocq.theory stanzas:
; in theories/dune
(rocq.theory
(name my-project)
(generate_project_file)
(theories Stdlib))
You need to link the right opam switch to your development so that RocqSolid knows which one to use:
opam switch link [switch] .
Timeouts
If you have files that compile very slowly, RocqSolid may time out. You can
raise this limit with ROCQ_LSP_TIMEOUT.
For Claude, re-register RocqSolid with a higher limit:
claude mcp remove --scope user rocq-solid
claude mcp add --scope user rocq-solid -e ROCQ_LSP_TIMEOUT=290 -- uvx rocq-solid-mcp
For Codex, add the last two options to the existing entry in
~/.codex/config.toml:
[mcp_servers.rocq-solid]
command = "uvx"
args = ["rocq-solid-mcp"]
# add these two options:
tool_timeout_sec = 300
env = { ROCQ_LSP_TIMEOUT = "290" } # slightly lower than tool_timeout_sec
Upgrading
To upgrade RocqSolid:
uvx rocq-solid-mcp@latest --help
To upgrade coq-lsp, run in your switch:
opam update && opam upgrade rocq-solid-mcp-lsp
Troubleshooting
RocqSolid needs Python 3.11 or newer. If your default python3 is older, uvx
reports that no solution was found. Use uvx --python 3.12 rocq-solid-mcp
instead.
You can check a single file from the command line, which prints the diagnostics as JSON:
uvx rocq-solid-mcp check path/to/file.v
Environment Variables
All optional; defaults in parentheses.
ROCQ_LSP_BINARY(coq-lsp): thecoq-lspexecutableROCQ_LSP_USE_OPAM(1): run viaopam exec --;0runs the binary directlyROCQ_LSP_WORKSPACE(unset): override the inferred workspace rootROCQ_LSP_TIMEOUT(55, max3600): deadline per call; set slightly below the MCP tool timeoutROCQ_LSP_HARD_TIMEOUT_GRACE(5): extra wait after cancellation before the session is killedROCQ_LSP_COMMAND_TIMEOUT(5): default per-sentence timeout;0disablesROCQ_LSP_TIMEOUT_AFTER_ERROR(10): overall deadline for the rest of a check after its first error;0disablesROCQ_LSP_MESSAGE_LIMIT(10, max50): max errors returned per checkROCQ_LSP_MAX_ERRORS(1000000): max errorscoq-lspcollectsROCQ_LSP_IDLE_TTL_SECONDS(1800): idle time before cached sessions are stoppedROCQ_LSP_DUNE_BUILD(1): build dune dependencies before checks;0disablesROCQ_LSP_DUNE_TIMEOUT(55, max3600): limit per dune detection or build command
Support
Join us on the Iris Mattermost!
- Go to the GitLab log-in page and select the "GitHub" button, then log in with your GitHub account.
- Log in to Mattermost; this should use your GitLab login.
- Join the RocqSolid channel.
If you notice that your agent misbehaves with this MCP, please let us know! It would be particularly helpful if you could share your transcripts.
Development
In a clone of this repository:
uv venv .venv && uv pip install -e ".[dev]"
make test
uv tool install -e . installs a development version of rocq-solid-mcp to
~/.local/bin/.
To release a new version, bump version in pyproject.toml and push a tag
vX.Y.Z. The release GitHub workflow builds the package and publishes it to
PyPI.
Metadata
Release files for rocq-solid-mcp 1.0.0
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 | Actions |
|---|---|---|---|---|
| rocq_solid_mcp-1.0.0.tar.gz | 34.4 kB | With provenance | Details for rocq_solid_mcp-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rocq_solid_mcp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for rocq_solid_mcp-1.0.0-py3-none-any.whl |
Total release size: 70.2 kB
Release files / rocq_solid_mcp-1.0.0.tar.gz
| Download URL | rocq_solid_mcp-1.0.0.tar.gz |
|---|---|
| Size | 34.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73c7df4791c9040586d84f225c82ecc651669dde9a94c36b4eb38fc7a6594f4e
|
|
BLAKE2b-256 checksum How to use checksums |
14f8dc63d8e905cef9810c4cabd97783cf1508c59501b61a5f85b7620a5bbf6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logRelease files / rocq_solid_mcp-1.0.0-py3-none-any.whl
| Download URL | rocq_solid_mcp-1.0.0-py3-none-any.whl |
|---|---|
| Size | 35.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0bbffdab3c93e8b4ed053a9b63a70fc39cd4181cd63fea4c3f0b693e9a25d995
|
|
BLAKE2b-256 checksum How to use checksums |
bac00c991e23be563ef9edc07d24b30355e47c34d7af1221cd984b60900b3238
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logSecurity for rocq-solid-mcp 1.0.0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for rocq_solid_mcp-1.0.0.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 Nov 13, 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.