|
10 | 10 | [](https://anyquery.dev/queries)
|
11 | 11 | [](https://pkg.go.dev/github.com/julien040/anyquery/namespace)
|
12 | 12 |
|
13 |
| -Anyquery is a SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying [JSON](https://anyquery.dev/docs/usage/querying-files/#json), [CSV](https://anyquery.dev/docs/usage/querying-files/#csv), [Parquet](https://anyquery.dev/docs/usage/querying-files/#parquet), SQLite, [Airtable bases](https://anyquery.dev/integrations/airtable/), [Google Sheets](https://anyquery.dev/integrations/google_sheets/), [Notion databases](https://anyquery.dev/integrations/notion/), and [log files](https://anyquery.dev/docs/usage/querying-log/) using [Grok](https://www.elastic.co/guide/en/elasticsearch/reference/current/grok.html), among others. It also supports running SQL queries on [remote files](https://anyquery.dev/docs/usage/querying-files/#remote-files) (HTTP, S3, GCS), local apps ([Apple Notes](https://anyquery.dev/integrations/notes/), [Apple Reminders](https://anyquery.dev/integrations/reminders/), [Google Chrome Tabs](https://anyquery.dev/integrations/chrome/), etc.), and databases ([MySQL](https://anyquery.dev/docs/database/mysql/) and [PostgreSQL](https://anyquery.dev/docs/database/postgresql/)). It's built on top of [SQLite](https://www.sqlite.org) and uses [plugins](https://anyquery.dev/integrations/) to extend its functionality. |
| 13 | +Anyquery is a SQL query engine that allows you to run SQL queries on pretty much anything. It supports querying [files](https://anyquery.dev/docs/usage/querying-files/), [databases](https://anyquery.dev/docs/database), and [apps](https://anyquery.dev/integrations) (e.g. Apple Notes, Notion, Chrome, Todoist, etc.). It's built on top of [SQLite](https://www.sqlite.org) and uses [plugins](https://anyquery.dev/integrations) to extend its functionality. |
14 | 14 |
|
15 |
| -Moreover, it can act as a [MySQL server](https://anyquery.dev/docs/usage/mysql-server/), allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. [Looker Studio](https://anyquery.dev/connection-guide/looker-studio/), [DBeaver](https://anyquery.dev/connection-guide/dbeaver/), [TablePlus](https://anyquery.dev/connection-guide/tableplus/), [Metabase](https://anyquery.dev/connection-guide/metabase/), etc.). |
| 15 | +It can also connect to [LLMs](https://anyquery.dev/llm) (e.g. ChatGPT, Claude, Cursor, TypingMind, etc.) to allow them to access your data. |
| 16 | + |
| 17 | +Finally, it can act as a [MySQL server](https://anyquery.dev/docs/usage/mysql-server/), allowing you to run SQL queries from your favorite MySQL-compatible client (e.g. [TablePlus](https://anyquery.dev/connection-guide/tableplus/), [Metabase](https://anyquery.dev/connection-guide/metabase/), etc.). |
16 | 18 |
|
17 | 19 | 
|
18 | 20 |
|
19 | 21 | ## Usage
|
20 | 22 |
|
21 |
| -The [documentation](https://anyquery.dev/docs/usage/running-queries) provides detailed instructions on how to run queries with Anyquery. |
22 |
| -But let's see a quick example. Type `anyquery` in your terminal to open the shell mode. Then, run the following query: |
| 23 | +### Connecting LLM |
23 | 24 |
|
24 |
| -```sql |
25 |
| --- List all repositories of asg017 related to SQLite |
26 |
| -SELECT full_name, stargazers_count, pushed_at FROM github_repositories_from_user('asg017') WHERE name LIKE '%sqlite%'; |
| 25 | +LLMs can connect to Anyquery using the [Model Context Protocol (MCP)](https://anyquery.dev/docs/reference/commands/anyquery_mcp). This protocol provides context for LLMs that support it. You can start the MCP server with the following command: |
27 | 26 |
|
28 |
| --- Count rows of a remote 75MB CSV file |
29 |
| -SELECT count(*) FROM read_csv('https://raw.githubusercontent.com/datadesk/california-coronavirus-data/master/latimes-place-totals.csv', header=true); |
| 27 | +```bash |
| 28 | +# To be started by the LLM client |
| 29 | +anyquery mcp |
| 30 | +# To connect using an HTTP and SSE tunnel |
| 31 | +anyquery mcp --tunnel |
| 32 | +``` |
30 | 33 |
|
31 |
| --- Insert into a Notion database all repositories of nalgeon related to SQLite |
32 |
| -INSERT INTO notion_database(repo, stars, last_push) SELECT full_name, stargazers_count, pushed_at FROM github_repositories_from_user('nalgeon') WHERE description LIKE '%sqlite%'; |
| 34 | +You can also connect to clients that supports function calling (e.g. ChatGPT, TypingMind). Refer to each [connection guide](https://anyquery.dev/integrations#llm) in the documentation for more information. |
33 | 35 |
|
34 |
| --- Close all tabs of the datasette documentation |
35 |
| -DELETE FROM chrome_tabs WHERE url LIKE '%datasette%'; |
36 |
| -``` |
| 36 | + |
| 37 | + |
| 38 | +### Running SQL queries |
| 39 | + |
| 40 | +The [documentation](https://anyquery.dev/docs/usage/running-queries) provides detailed instructions on how to run queries with Anyquery. |
| 41 | +But let's see a quick example. Type `anyquery` in your terminal to open the shell mode. Then, run the following query: |
| 42 | + |
| 43 | + |
37 | 44 |
|
38 | 45 | You can also launch the MySQL server with `anyquery server` and connect to it with your favorite MySQL-compatible client.
|
39 | 46 |
|
|
0 commit comments