mq-mcp

Crates.iomq-mcp
lib.rsmq-mcp
version0.1.4
created_at2026-01-03 02:02:29.157808+00
updated_at2026-01-03 02:02:29.157808+00
descriptionMarkdown Query - MCP server implementation
homepagehttps://mqlang.org/
repositoryhttps://github.com/harehare/mq
max_upload_size
id2019464
size91,912
Takahiro Sato (harehare)

documentation

README

mq-mcp

ci mq language

Model Context Protocol (MCP) server implementation for mq. This crate provides an MCP server that allows AI assistants to process Markdown and HTML content using mq's query language.

Installation

You can install mq-mcp using the installation script:

curl -fsSL https://raw.githubusercontent.com/harehare/mq-mcp/main/bin/install.sh | bash

Or clone this repository and run the install script:

git clone https://github.com/harehare/mq-mcp.git
cd mq-mcp
./bin/install.sh

The script will:

  • Install the mq binary to ~/.mq/bin
  • Add ~/.mq/bin to your PATH (if not already present)
  • Support macOS, Linux, and Windows
  • Verify checksums for security

After installation, restart your terminal or run:

source ~/.zshrc  # or ~/.bashrc for bash users

Implementation

The server implements four MCP tools:

  • html_to_markdown: Converts HTML to Markdown and executes mq queries
  • extract_markdown: Executes mq queries on Markdown content
  • available_functions: Returns available functions for mq queries
  • available_selectors: Returns available selectors for mq queries

Tool Parameters

html_to_markdown

  • html (string): HTML content to process
  • query (optional string): mq query to execute

extract_markdown

  • markdown (string): Markdown content to process
  • query (string): mq query to execute

available_functions

No parameters. Returns JSON with function names, descriptions, parameters, and example queries.

available_selectors

No parameters. Returns JSON with selector names, descriptions, and parameters.

Configuration

Claude Desktop

Using mq-mcp binary directly

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "mq-mcp": {
      "command": "/Users/YOUR_USERNAME/.mq/bin/mq-mcp",
      "args": []
    }
  }
}

Or simply use mq-mcp if ~/.mq/bin is in your PATH:

{
  "mcpServers": {
    "mq-mcp": {
      "command": "mq-mcp",
      "args": []
    }
  }
}

Using mq command

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "mq-mcp": {
      "command": "/Users/YOUR_USERNAME/.mq/bin/mq",
      "args": ["mcp"]
    }
  }
}

Or simply use mq if ~/.mq/bin is in your PATH:

{
  "mcpServers": {
    "mq-mcp": {
      "command": "mq",
      "args": ["mcp"]
    }
  }
}

VS Code with MCP Extension

Using mq-mcp binary directly

Add to .vscode/settings.json:

{
  "mcp": {
    "servers": {
      "mq-mcp": {
        "type": "stdio",
        "command": "mq-mcp",
        "args": []
      }
    }
  }
}

Using mq command

Add to .vscode/settings.json:

{
  "mcp": {
    "servers": {
      "mq-mcp": {
        "type": "stdio",
        "command": "mq",
        "args": ["mcp"]
      }
    }
  }
}

License

This project is licensed under the MIT License

Commit count: 3487

cargo fmt