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.
You can install mq-mcp using the installation script:
curl -fsSL https://raw.githubusercontent.com/harehare/mq-mcp/main/bin/install.sh | bashOr clone this repository and run the install script:
git clone https://github.com/harehare/mq-mcp.git
cd mq-mcp
./bin/install.shThe 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:
source ~/.zshrc # or ~/.bashrc for bash usersThe 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
html(string): HTML content to processquery(optional string): mq query to execute
markdown(string): Markdown content to processquery(string): mq query to execute
No parameters. Returns JSON with function names, descriptions, parameters, and example queries.
No parameters. Returns JSON with selector names, descriptions, and parameters.
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"]
}
}
}Add to .vscode/settings.json:
{
"mcp": {
"servers": {
"mq-mcp": {
"type": "stdio",
"command": "mq",
"args": ["mcp"]
}
}
}
}This project is licensed under the MIT License