MCP-RoCQ (Coq Reasoning Server)

MCP-RoCQ (Coq Reasoning Server)

By angrysky56 GitHub

RoCQ (Coq Reasoning Server)

coq claude
Overview

what is MCP-RoCQ?

MCP-RoCQ is a Model Context Protocol server that provides advanced logical reasoning capabilities through integration with the Coq proof assistant, enabling automated dependent type checking, inductive type definitions, and property proving.

how to use MCP-RoCQ?

To use MCP-RoCQ, install the Coq Platform, clone the repository, set up your environment, and use the provided JSON commands for type checking, defining inductive types, and proving properties.

key features of MCP-RoCQ?

  • Automated Dependent Type Checking
  • Inductive Type Definition
  • Property Proving
  • XML Protocol Integration
  • Rich Error Handling

use cases of MCP-RoCQ?

  1. Verifying complex mathematical proofs.
  2. Defining and checking custom data types in Coq.
  3. Automating logical property proofs in software verification.

FAQ from MCP-RoCQ?

  • What is the Coq proof assistant?

Coq is a formal proof management system that provides a formal language to write mathematical definitions and theorems.

  • How do I install MCP-RoCQ?

Follow the installation instructions in the documentation, including installing the Coq Platform and cloning the repository.

  • Can MCP-RoCQ handle all types of logical proofs?

Yes, it is designed to handle a wide range of logical proofs and type checking.

Content

MCP-RoCQ (Coq Reasoning Server)

Currently shows tools but Claude can't use it properly for some reason- invalid syntax generally seems the issue but there could be something else.

There may be a better way to set this up with the coq cli or something. Anyone want to try and fix it who knows what they are doing would be great.

MCP-RoCQ is a Model Context Protocol server that provides advanced logical reasoning capabilities through integration with the Coq proof assistant. It enables automated dependent type checking, inductive type definitions, and property proving with both custom tactics and automation.

Features

  • Automated Dependent Type Checking: Verify terms against complex dependent types
  • Inductive Type Definition: Define and automatically verify custom inductive data types
  • Property Proving: Prove logical properties using custom tactics and automation
  • XML Protocol Integration: Reliable structured communication with Coq
  • Rich Error Handling: Detailed feedback for type errors and failed proofs

Installation

  1. Install the Coq Platform 8.19 (2024.10)

Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs.

https://github.com/coq/platform

  1. Clone this repository:
git clone https://github.com/angrysky56/mcp-rocq.git

cd to the repo

uv venv
./venv/Scripts/activate
uv pip install -e .

JSON for the Claude App or mcphost config- set your paths according to how you installed coq and the repository.

    "mcp-rocq": {
      "command": "uv",
      "args": [
        "--directory",
        "F:/GithubRepos/mcp-rocq",
        "run",
        "mcp_rocq",
        "--coq-path",
        "F:/Coq-Platform~8.19~2024.10/bin/coqtop.exe",
        "--lib-path",
        "F:/Coq-Platform~8.19~2024.10/lib/coq"
      ]
    },

This might work- I got it going with uv and most of this could be hallucinatory though:

  1. Install dependencies:
pip install -r requirements.txt

Usage

The server provides three main capabilities:

1. Type Checking

{
    "tool": "type_check",
    "args": {
        "term": "<term to check>",
        "expected_type": "<type>",
        "context": ["relevant", "modules"] 
    }
}

2. Inductive Types

{
    "tool": "define_inductive",
    "args": {
        "name": "Tree",
        "constructors": [
            "Leaf : Tree",
            "Node : Tree -> Tree -> Tree"
        ],
        "verify": true
    }
}

3. Property Proving

{
    "tool": "prove_property",
    "args": {
        "property": "<statement>",
        "tactics": ["<tactic sequence>"],
        "use_automation": true
    }
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

No tools information available.

Atom of Thoughts (AoT) MCP is a server that decomposes complex problems into independent atomic units of thought, using the dependencies between these units to deliver more robust reasoning and validated insights.

mcp claude
View Details

Zonos MCP server modified for Linux and GPU optimizations.

tts claude
View Details

A Model Context Protocol (MCP) server for web content scanning and analysis. This server provides tools for fetching, analyzing, and extracting information from web pages.

mcp claude
View Details
Awesome MCP ZH
Awesome MCP ZH by vivekkeditz

MCP 资源精选, MCP指南,Claude MCP,MCP Servers, MCP Clients

mcp claude
View Details

Google Search Console Insights with Claude AI for SEOs

seo claude
View Details

MCP server for accessing geologic data with the Macrostrat API

geology claude
View Details