MCP Server - dathere/qsv GitHub Wiki

MCP Server

Tier: Intermediate

The qsv MCP Server exposes qsv as a Model Context Protocol server. Any MCP-aware client โ€” Claude Desktop, Claude Code, Gemini CLI, or any future MCP host โ€” can ask qsv to read, profile, transform, and query CSV / Parquet / Excel / JSONL files on your machine, without uploading anything.

Note

Canonical install guide: .claude/skills/docs/guides/START_HERE.md. This page is a workflow overview.

The MCP server is the backend that the Claude Cowork Plugin and the qsv MCP integration in Claude Code sit on top of. You can use the MCP server without the Cowork plugin โ€” that just gives you raw tool access from any MCP client.

Installation modes

Mode Best for Install path
Claude Desktop Extension (.mcpb bundle) Most users; auto-downloads the qsvmcp binary Double-click the .mcpb from releases
Legacy MCP server (claude_desktop_config.json) Power users; full control over env vars Edit Claude Desktop config โ€” see docs/guides/START_HERE.md
Claude Code (Anthropic CLI) Developers, terminal workflows Build qsvmcp from source โ€” see CLAUDE_CODE.md
Gemini CLI / other MCP hosts Multi-client setups Same as Claude Code โ€” point the client at the qsvmcp binary

Quickest install (Claude Desktop)

  1. Download the qsv-mcp-server-<version>.mcpb file from releases.
  2. Double-click it. Claude Desktop opens.
  3. Click Install โ†’ Install again to confirm.
  4. The .mcpb bundle auto-downloads the matching qsvmcp binary โ€” no manual binary install needed.
  5. Restart Claude Desktop. Ask: "List data files in my Downloads folder." If it returns a list, the MCP server is working.

Configure (optional)

Open Claude Desktop โ†’ Settings โ†’ Extensions โ†’ qsv. Sensible defaults work for most users. Common adjustments:

  • Working Directory โ€” where qsv looks for files by default (default: $HOME/Downloads)
  • Allowed Directories โ€” additional folders the server may access (security-critical)
  • qsv Binary Path โ€” auto-detected; only set if you have a custom build
  • Operation Timeout โ€” 10 minutes by default; bump for slow operations on huge files

See Environment Variables โ†’ MCP server for the full list (QSV_MCP_* namespace).

Tool surface

The qsvmcp binary carries 70 of qsv 24.0.0's 80 commands (see Binary Variants), of which 57 are exposed as skill-based MCP tools optimized for agent workflows.

Tip

New in 24.0.0: each skill's JSON tool definition can be printed by the binary itself โ€” qsvmcp <command> --help --format json โ€” and --export-tool-definitions <dir> writes them for every installed command plus a manifest.json. They are generated from the running binary's own usage text, so they always match its version and feature set. Also in the plain qsv binary; see AI & Documentation.

Warning

Breaking in 23.0.1: qsvmcp no longer ships the get command, no longer accepts dc: disk-cache-prefix inputs, and no longer reads cloud (s3://, gs://, az://) sources. qsvdp and source builds with the get_cloud feature keep full cloud support; the prebuilt qsv never included get. Within qsvmcp, the http(s)://, dathere:// and ckan:// schemes still work, as does auto-decompression of compressed sources. See Get & Disk Cache.

Neither get nor fetch/fetchpost is present in qsvmcp at all โ€” an agent that needs to pull a remote file should be handed a local path, or an http(s):///ckan:// URL that the surviving schemes can resolve. Key tools:

Two naming conventions coexist, and they are not interchangeable:

  • Skill-based tools โ€” one per covered command, named qsv-<command> with a hyphen (qsv-stats, qsv-joinp, qsv-readstat). A command's subcommands are an argument, not separate tools: to, geocode and excel each get one tool whose subcommand arg carries the valid values.
  • Server tools โ€” the MCP server's own, named qsv_<name> with an underscore (qsv_list_files, qsv_set_working_dir, qsv_get_working_dir, qsv_search_tools, qsv_browse_directory, qsv_help, qsv_version, qsv_config).

The skill-based tools by area:

Area Commands exposed
Inspection count, headers, sniff, sample, slice, select, search, searchset, table
Stats & profiling stats, moarstats, frequency, pragmastat, describegpt
Transform datefmt, dedup, fill, replace, rename, sort, transpose, pseudo, safenames
Joins / set ops join, joinp, exclude, implode, explode
SQL sqlp
Validation & schema validate, schema, diff, sortcheck
Convert to, excel, json, jsonl, tojsonl, readstat (SAS/Stata/SPSS โ†’ CSV, new in 23.0.1), writestat (CSV โ†’ SAS/Stata/SPSS, new in 24.0.0)
Geospatial geocode
Visualization viz

Note

apply, fetch, fetchpost and get have no MCP tool โ€” those commands are not compiled into qsvmcp at all. scoresql is in the binary but is not exposed as a skill; reach for sqlp instead.

The MCP host enumerates these tools and presents them to the LLM for invocation.

Note

Deferred loading: Most MCP clients only load the core tools at startup and fetch additional tools on demand. Set QSV_MCP_EXPOSE_ALL_TOOLS=true to expose everything upfront (for clients without deferred-loading support).

Security model

The MCP server enforces directory access controls:

  • Working directory โ€” QSV_MCP_WORKING_DIR (default $HOME/Downloads). Templates supported: ${HOME}, ${DOWNLOADS}, ${DOCUMENTS}, ${PWD}, etc.
  • Allowed directories โ€” QSV_MCP_ALLOWED_DIRS (colon-separated on Unix, semicolon on Windows). Additional read/write locations.

Any file access outside the working directory + allowed directories is denied. This is a defense-in-depth layer on top of OS-level permissions.

For Claude Desktop Extension mode, an additional flag MCPB_EXTENSION_MODE=true enforces stricter checks (qsv binary must be fully qualified, version must be โ‰ฅ 17.0.0).

Concurrency & limits

  • Operation timeout: QSV_MCP_OPERATION_TIMEOUT_MS (default 600,000 ms = 10 min, max 30 min).
  • Max concurrent operations: QSV_MCP_MAX_CONCURRENT_OPERATIONS (default 3 in plugin mode, 1 in extension mode).
  • Concurrency-wait timeout: QSV_MCP_CONCURRENCY_WAIT_TIMEOUT_MS (default 2 min).
  • Max output size: QSV_MCP_MAX_OUTPUT_SIZE (default 50 MB). Bigger outputs auto-saved to disk.
  • Max files per directory listing: QSV_MCP_MAX_FILES_PER_LISTING (default 1000).

See Environment Variables โ†’ MCP server for the complete list.

Logging & audit

Two separate logs:

  • Tool audit log โ€” qsvmcp.log. Records every tool invocation (request + response). Controlled by QSV_MCP_LOG_LEVEL (info / error / off; default info).
  • Binary log โ€” qsv_rCURRENT.log. Standard qsv runtime log. Controlled by QSV_LOG_LEVEL.

Audit logs land in QSV_LOG_DIR (default: directory where the binary was started).

Update checks

The MCP server checks for new qsv releases at startup unless you disable it:

export QSV_MCP_CHECK_UPDATES_ON_STARTUP=false

When QSV_MCP_AUTO_REGENERATE_SKILLS=true, the server auto-regenerates skill definitions on version change via qsv --update-mcp-skills.

Use with Claude Code (CLI)

# 1. Install qsvmcp
cargo install qsv --locked --bin qsvmcp -F qsvmcp
# or download a prebuilt binary

# 2. Tell Claude Code about it (~/.claude/settings.json or similar)
#    Add an MCP server entry pointing at the qsvmcp binary.

See CLAUDE_CODE.md for the full Claude Code setup.

Use with Gemini CLI

Same shape as Claude Code: install qsvmcp, register it as an MCP server in your Gemini CLI config. The QSV_MCP_PLUGIN_MODE=true env var relaxes directory checks since Gemini CLI provides its own filesystem isolation.

End-to-end example

User: Profile the file ~/Downloads/customers.csv and tell me about the
      most-common values per column.

Claude: [calls qsv_stats with cardinality + infer-dates]
        [calls qsv_frequency with --limit 10 --json]
        [synthesizes results into narrative]

        Your file has 50,000 rows and 12 columns. The most variable
        column is "city" with 8,402 distinct values; "state" has only
        50 (all US states); "signup_date" spans 2018-01-01 to 2024-...
        ...

All file access stayed on your machine; only stats + frequency summaries went to Claude as LLM context.

Real-world demos

Concrete demonstrations of MCP-driven civic analysis โ€” published in the People's API Demos showcase:

  • Pittsburgh Parking Reform Analysis โ€” Claude, driven by the qsv MCP Server and the US Census MCP Server, FAIRifies municipal parking data and synthesizes a policy analysis. The "pure MCP" demo: no Cowork plugin involved โ€” just MCP tool calls.

For demos that build the Cowork plugin on top of the MCP server (NYC Snow, NYC Housing), see Claude Cowork Plugin โ†’ Real-world demos.

Browse the full showcase at https://dathere.github.io/peoples-api-demos/.

Troubleshooting

Symptom Fix
.mcpb install fails Verify Claude Desktop โ‰ฅ the version required in the release notes
Permission denied on a file Add the directory to QSV_MCP_ALLOWED_DIRS
qsv binary not found Set QSV_MCP_BIN_PATH to the qsvmcp binary path
Operation times out on huge file Bump QSV_MCP_OPERATION_TIMEOUT_MS (max 30 min)
MCP audit log fills disk Set QSV_MCP_LOG_LEVEL=error or off
qsvmcp exits with Illegal instruction on x86_64 Since 24.0.0, the MCPB bundle's x86_64 qsvmcp requires AVX2 โ€” see Installation. Build qsvmcp from source on a CPU without AVX2

For more, see Troubleshooting.

See also

โš ๏ธ **GitHub.com Fallback** โš ๏ธ