Skip to main content

MCP server for microquery.dev — SQL over FDA, SEC, PubMed, blockchain, and more

Project description

microquery-mcp

MCP server for Microquery — ask research questions about real-world data and get actual database records back. Works in Claude Desktop, Cursor, or any MCP-compatible AI host. Claude handles the SQL; you just ask the question.

No wallet required. Auto-registers on first query and runs on $0.10 trial credit (~1,600 typical queries).

See also

microquery-agent — autonomous agent for pipelines and cron jobs: register → deposit USDC → query → auto top-up. Use this if you want to run microquery unattended without an AI host.

Prerequisites

  • Python 3.9+
  • No third-party packages — stdlib only

Installation

Claude Desktop (recommended)

The easiest paths, in order of friction:

1. Registry install Find microquery in the Claude Desktop MCP marketplace or on smithery.ai and click Install. No config editing needed.

2. uvx install Add one entry to ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "microquery": {
      "command": "uvx",
      "args": ["microquery-mcp"]
    }
  }
}

uvx requires uv to be installed separately (astral.sh/uv). Once installed, Claude Desktop will pick it up automatically.

3. Manual install (developers) Download microquery_mcp.py from this repo and point your host at it:

{
  "mcpServers": {
    "microquery": {
      "command": "python3",
      "args": ["/path/to/microquery_mcp.py"]
    }
  }
}

Restart Claude Desktop after editing. The server appears in Settings → Developer with a green dot when connected.

Other MCP hosts (Cursor, etc.)

Use the same command / args pattern above. Consult your host's MCP documentation for the exact config format.

Tools

Tool Description
query(database, sql) Run SQL against a microquery dataset. Auto-registers on first call.
authenticate(name, wallet_addr?) Manually register or link a wallet address.
list_databases() Show all available datasets and field schemas.
get_quickstart() Sneller SQL notes and multi-dataset example recipes.

How it works

  1. On the first query() call the server registers an account using your OS username (getpass.getuser()) via POST /v1/register and stores the API key in ~/.microquery/token.
  2. Subsequent calls use the stored key — no configuration needed.
  3. The new account starts with 100,000 µUSDC ($0.10) trial credit, covering roughly 1,600 typical queries.
  4. When trial credit runs low the server automatically tops up the account (up to 10 times, $2 each). Once the free allowance is exhausted a checkout URL is returned — visit it to add USDC and continue querying.

Available datasets

FDA adverse events · SEC EDGAR · clinical trials · ClinVar · arXiv · PubMed · Ethereum · Bitcoin · Base · DeFi TVL · FEC contributions · FRED economic series · NVD/CVE · OSV advisories · sanctions · FHFA house prices · GWAS · ClinPGx · malware samples · open food facts · world bank commodities · and more — call list_databases() for the full live schema.

Example

User:    What were the top adverse events reported for metformin last year?
         And how does that compare to 2022 and 2023?
Claude:  [queries fda.faers for each year, builds trend table]
         GI events (diarrhoea, nausea, vomiting) were flat 2022→2024,
         then spiked sharply in 2025 — consistent with the longevity/
         obesity wave hitting FAERS with a lag. Lactic acidosis stayed
         nearly flat across all four years despite overall volume growth.

User:    Can you cross-reference that with genomic profiles?
Claude:  [queries clinpgx, clinvar, gwas — no SQL needed from user]
         SLC22A1 rs628031 has a direct ClinPGx annotation for GI toxicity —
         the strongest known genomic explanation for why diarrhoea and nausea
         dominate the FAERS signal for metformin.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microquery_mcp-1.0.1.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microquery_mcp-1.0.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file microquery_mcp-1.0.1.tar.gz.

File metadata

  • Download URL: microquery_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for microquery_mcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1523bff1d514fed921ddf902c06b6ab964950e1b5d797bfcf500fe759f984917
MD5 6b890de3067ba96e53119a9a8ed22cc6
BLAKE2b-256 dd7ee6cf68dcb39d288642689af22358b85578db24ddc3541f0637f2df9014c8

See more details on using hashes here.

File details

Details for the file microquery_mcp-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: microquery_mcp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for microquery_mcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 184fd802106bd417319b87cb9b54d0d5c315cd1402b352d1e556977c9a1d7ecc
MD5 8c53dfc54be20baecfa6aa80f8dd5566
BLAKE2b-256 d02ac803740a830be41cc6744d7e1fc301ca9573fc1d4337ba32c537563d1d20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page