https://github.com/harehare/mq-mcp
Model Context Protocol (MCP) server implementation for mq.
https://github.com/harehare/mq-mcp
markdown mcp mq query
Last synced: 6 days ago
JSON representation
Model Context Protocol (MCP) server implementation for mq.
- Host: GitHub
- URL: https://github.com/harehare/mq-mcp
- Owner: harehare
- License: mit
- Created: 2025-11-19T14:42:10.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-11-20T13:01:10.000Z (about 2 months ago)
- Last Synced: 2025-11-20T14:30:44.967Z (about 2 months ago)
- Topics: markdown, mcp, mq, query
- Language: Rust
- Homepage: https://mqlang.org
- Size: 26.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mq-mcp
[](https://github.com/harehare/mq-mcp/actions/workflows/ci.yml)
[](https://github.com/harehare/mq)
Model Context Protocol (MCP) server implementation for [mq](https://github.com/harehare/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:
```bash
curl -fsSL https://raw.githubusercontent.com/harehare/mq-mcp/main/bin/install.sh | bash
```
Or clone this repository and run the install script:
```bash
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:
```bash
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`:
```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:
```json
{
"mcpServers": {
"mq-mcp": {
"command": "mq-mcp",
"args": []
}
}
}
```
#### Using mq command
Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"mq-mcp": {
"command": "/Users/YOUR_USERNAME/.mq/bin/mq",
"args": ["mcp"]
}
}
}
```
Or simply use `mq` if `~/.mq/bin` is in your PATH:
```json
{
"mcpServers": {
"mq-mcp": {
"command": "mq",
"args": ["mcp"]
}
}
}
```
### VS Code with MCP Extension
#### Using mq-mcp binary directly
Add to `.vscode/settings.json`:
```json
{
"mcp": {
"servers": {
"mq-mcp": {
"type": "stdio",
"command": "mq-mcp",
"args": []
}
}
}
}
```
#### Using mq command
Add to `.vscode/settings.json`:
```json
{
"mcp": {
"servers": {
"mq-mcp": {
"type": "stdio",
"command": "mq",
"args": ["mcp"]
}
}
}
}
```
## License
This project is licensed under the MIT License