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:
|
Or clone this repository and run the install script:
The script will:
- Install the
mqbinary to~/.mq/bin - Add
~/.mq/binto your PATH (if not already present) - Support macOS, Linux, and Windows
- Verify checksums for security
After installation, restart your terminal or run:
Implementation
The server implements four MCP tools:
html_to_markdown: Converts HTML to Markdown and executes mq queriesextract_markdown: Executes mq queries on Markdown contentavailable_functions: Returns available functions for mq queriesavailable_selectors: Returns available selectors for mq queries
Tool Parameters
html_to_markdown
html(string): HTML content to processquery(optional string): mq query to execute
extract_markdown
markdown(string): Markdown content to processquery(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:
Or simply use mq-mcp if ~/.mq/bin is in your PATH:
Using mq command
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Or simply use mq if ~/.mq/bin is in your PATH:
VS Code with MCP Extension
Using mq-mcp binary directly
Add to .vscode/settings.json:
Using mq command
Add to .vscode/settings.json:
License
This project is licensed under the MIT License