anyquery

anyquery

Universal SQL query engine for files, databases, apps, and LLM integration.

1,298
Stars
77
Forks
1,298
Watchers
7
Issues
Anyquery is a SQL query engine that enables users to run SQL queries on a wide array of data sources, including files, databases, and popular applications via plugins. It supports integrations with large language models (LLMs) through the Model Context Protocol (MCP), providing seamless access for AI models to query data. Built on SQLite, it extends functionality with a plugin system and can also function as a MySQL server for compatibility with conventional SQL clients. Its flexible installation options and broad plugin ecosystem allow extensive customization and integration.

Key Features

Run SQL queries on files, databases, and applications
Plugin-based extensibility
Integration with LLMs via Model Context Protocol (MCP)
Built on top of SQLite
MySQL server emulation for external client compatibility
Official and custom plugin registry
Installation support for major package managers
Supports direct connection to ChatGPT, Claude, TypingMind, etc.
Function calling integration for LLM clients
Supports loading SQLite extensions

Use Cases

Querying local and cloud files using SQL
Integrating LLMs to access and analyze private datasets
Connecting third-party apps like Notion, Apple Notes, and Todoist for data querying
Running SQL queries from popular MySQL-compatible clients
Extending data access through custom or community-developed plugins
Providing contextual data to LLMs for augmented intelligence workflows
Centralizing queries across heterogeneous data sources
Automating data retrieval for dashboards and business analytics
Leveraging LLMs for natural language querying of structured data
Securely exposing limited subsets of data to AI agents

README

Anyquery

GitHub Downloads (all assets, all releases) GitHub commit activity Documentation GitHub issues Dynamic JSON Badge Dynamic JSON Badge Go Reference

Anyquery is a SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying files, databases, and apps (e.g. Apple Notes, Notion, Chrome, Todoist, etc.). It's built on top of SQLite and uses plugins to extend its functionality.

It can also connect to LLMs (e.g. ChatGPT, Claude, Cursor, TypingMind, etc.) to allow them to access your data.

Finally, it can act as a MySQL server, allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. TablePlus, Metabase, etc.).

Anyquery header

Usage

Connecting LLM

LLMs can connect to Anyquery using the Model Context Protocol (MCP). This protocol provides context for LLMs that support it. You can start the MCP server with the following command:

bash
# To be started by the LLM client
anyquery mcp --stdio
# To connect using an HTTP and SSE tunnel
anyquery mcp --host 127.0.0.1 --port 8070

You can also connect to clients that supports function calling (e.g. ChatGPT, TypingMind). Refer to each connection guide in the documentation for more information.

bash
# Copy the ID returned by the command, and paste it in the LLM client (e.g. ChatGPT, TypingMind)
anyquery gpt

5ire example

Running SQL queries

The documentation provides detailed instructions on how to run queries with Anyquery. But let's see a quick example. Type anyquery in your terminal to open the shell mode. Then, run the following query:

Anyquery SQL examples

You can also launch the MySQL server with anyquery server and connect to it with your favorite MySQL-compatible client.

bash
anyquery server &
mysql -u root -h 127.0.0.1 -P 8070

Installation

The documentation provides detailed instructions on how to install Anyquery on your system. You can install anyquery from Homebrew, APT, YUM/DNF, Scoop, Winget and Chocolatey. You can also download the binary from the releases page.

Homebrew

zsh
brew install anyquery

APT

bash
echo "deb [trusted=yes] https://apt.julienc.me/ /" | sudo tee /etc/apt/sources.list.d/anyquery.list
sudo apt update
sudo apt install anyquery

YUM/DNF

bash
echo "[anyquery]
name=Anyquery
baseurl=https://yum.julienc.me/
enabled=1
gpgcheck=0" | sudo tee /etc/yum.repos.d/anyquery.repo
sudo dnf install anyquery

Scoop

powershell
scoop bucket add anyquery https://github.com/julien040/anyquery-scoop
scoop install anyquery

Winget

powershell
winget install JulienCagniart.anyquery

Chocolatey

powershell
choco install anyquery

Plugins

Anyquery is plugin-based, and you can install plugins to extend its functionality. You can install plugins from the official registry or create your own. Anyquery can also load any SQLite extension.

Integrations

License

Anyquery is licensed under the AGPLv3 license for the core engine. The RPC library is licensed under the MIT license so that anyone can reuse plugins in different projects.

The plugins are not subject to the AGPL license. Each plugins has its own license and the copyright is owned by the plugin author. See the LICENSE file for more information.

Contributing

If you want to contribute to Anyquery, please read the contributing guidelines. I currently only accept minor contributions, but I'm open to any suggestions or feedback.

You can have a brief overview of the project in the architecture documentation.

Star History

Star History Chart

Repository Owner

julien040
julien040

User

Repository Details

Language Go
Default Branch main
Size 86,958 KB
Contributors 5
License Other
MCP Verified Sep 1, 2025

Programming Languages

Go
84.44%
Yacc
6.66%
Astro
5.2%
MDX
0.96%
Shell
0.65%
JavaScript
0.49%
Makefile
0.36%
TypeScript
0.35%
AppleScript
0.3%
CSS
0.26%
Python
0.22%
HTML
0.12%

Tags

Topics

ai analytics api business-intelligence chatgpt claude csv data-visualization database github go json llm mcp mysql notion parquet salesforce sql sqlite

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • XiYan MCP Server

    XiYan MCP Server

    A server enabling natural language queries to SQL databases via the Model Context Protocol.

    XiYan MCP Server is a Model Context Protocol (MCP) compliant server that allows users to query SQL databases such as MySQL and PostgreSQL using natural language. It leverages the XiYanSQL model, providing state-of-the-art text-to-SQL translation and supports both general LLMs and local deployment for enhanced security. The server lists available database tables as resources and can read table contents, making it simple to integrate with different applications.

    • 218
    • MCP
    • XGenerationLab/xiyan_mcp_server
  • BigQuery MCP Server

    BigQuery MCP Server

    Enables LLMs to securely converse with BigQuery data using natural language.

    BigQuery MCP Server acts as a bridge between large language models and Google BigQuery, allowing natural language interactions with database data through the Model Context Protocol. Designed for integration with Claude Desktop, it securely processes user queries and translates them into SQL, streamlining data access and minimizing manual query writing. The tool ensures safe and read-only data operations, supports both tables and materialized views, and labels resource types for easier exploration. Installation is possible via Smithery or manual setup, with a focus on developer-friendliness and robust authentication options.

    • 129
    • MCP
    • ergut/mcp-bigquery-server
  • SQLite Explorer MCP Server

    SQLite Explorer MCP Server

    Secure, read-only access to SQLite databases for LLMs via the Model Context Protocol.

    SQLite Explorer MCP Server provides a safe, read-only interface to SQLite databases using the Model Context Protocol (MCP). Built with the FastMCP framework, it enables large language models to explore, query, and retrieve database schema information with robust safety and validation mechanisms. The server exposes structured tools such as read_query, list_tables, and describe_table, ensuring secure and reliable access to database contents. Designed for integration with platforms like Claude Desktop and Cline VSCode Plugin.

    • 93
    • MCP
    • hannesrudolph/sqlite-explorer-fastmcp-mcp-server
  • BigQuery MCP Server

    BigQuery MCP Server

    MCP server enabling LLMs to access and interact with BigQuery databases.

    BigQuery MCP Server provides a Model Context Protocol-compliant interface that allows large language models to inspect database schemas and execute SQL queries on BigQuery. It exposes tools for executing queries, listing tables, and describing table schemas, supporting both CLI and environment-based configuration. The server integrates with Claude Desktop and can be easily installed via Smithery, facilitating seamless interaction between LLMs and BigQuery data sources.

    • 120
    • MCP
    • LucasHild/mcp-server-bigquery
  • MCP 数据库工具 (MCP Database Utilities)

    MCP 数据库工具 (MCP Database Utilities)

    A secure bridge enabling AI systems safe, read-only access to multiple databases via unified configuration.

    MCP Database Utilities provides a secure, standardized service for AI systems to access and analyze databases like SQLite, MySQL, and PostgreSQL using a unified YAML-based configuration. It enforces strict read-only operations, local processing, and credential protection to ensure data privacy and integrity. The tool is suitable for entities focused on data privacy and minimizes risks by isolating database connections and masking sensitive data. Designed for easy integration, it supports multiple installation options and advanced capabilities such as schema analysis and table browsing.

    • 85
    • MCP
    • donghao1393/mcp-dbutils
  • Multi-Database MCP Server (by Legion AI)

    Multi-Database MCP Server (by Legion AI)

    Unified multi-database access and AI interaction server with MCP integration.

    Multi-Database MCP Server enables seamless access and querying of diverse databases via a unified API, with native support for the Model Context Protocol (MCP). It supports popular databases such as PostgreSQL, MySQL, SQL Server, and more, and is built for integration with AI assistants and agents. Leveraging the MCP Python SDK, it exposes databases as resources, tools, and prompts for intelligent, context-aware interactions, while delivering zero-configuration schema discovery and secure credential management.

    • 76
    • MCP
    • TheRaLabs/legion-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results