Skip to main content
Glama
mcp-data-analysis-agent

mcp-data-analysis-agent

by hassanvfx

MCP Data Analysis Agent

Safe, read-only SQLite and PostgreSQL analysis for coding agents.

Start with one instruction

Tell your agent:

Please install from https://github.com/hassanvfx/mcp-data-analysis-agent.

It installs MCP Data Analysis once as a credential-free global MCP server. It does not create a database, configure a source, or change your current project.

Then open the full guide: Getting started and project configuration.

Related MCP server: sql-explorer-mcp

The two-stage workflow

Once per machine

Once per data project folder

Install the executable and machine-local absolute MCP client entries.

Configure that folder’s private .mcp-data-source.

No database URL or credential is stored globally.

The file holds exactly one SQLite path/URL or PostgreSQL URL.

Reuse the MCP server across projects.

Run preflight, inspect schema, and analyze that project’s data.

Move into the separate folder containing the data you want to analyze before the next step.

cd /path/to/data-project

Choose one project action:

Tell your agent

Result

Please configure this folder.

Deterministically initializes .mcp-data-agent/, then creates or opens .mcp-data-source and runs preflight.

Please install demo in this folder.

Initializes the hidden workspace and creates the deterministic retail demo only in this folder.

Please enable MCP Data Analysis for this Cline project.

Activates Cline's visible runtime settings for this one project, then tells you to reload VS Code.

The canonical commands are:

# Real source: writes an ignored, mode-0600 .mcp-data-source file.
mcp-data-cli configure-source /absolute/path/to/analytics.sqlite --yes

# Or activate the deterministic retail demo for the current folder.
mcp-data-cli demo start --yes

# Confirm a bounded, read-only connection probe succeeds.
mcp-data-cli preflight

Supported databases and safety

  • SQLite: an absolute local path or local SQLite URL.

  • PostgreSQL: a postgres:// or postgresql:// URL using a dedicated database-level read-only account.

  • Not supported: MySQL and other database dialects.

.mcp-data-source is the project’s runtime connection secret. Keep it regular (not a symlink), one line only, mode 0600, and out of version control. Global MCP configuration never contains a database URL or MCP_DATA_SOURCE_URL.

The first project-specific configure or demo action creates .mcp-data-agent/: its empty versioned workspace, schema cache, managed demo, and durable observability ledger. If you created .mcp-data-source manually, run mcp-data-cli prepare-workspace --yes before preflight. The project root must be writable; workspace_initialization_required tells you to prepare it, while PROJECT_STATE_UNAVAILABLE tells you to choose a writable regular folder. MCP never runs a query without its task and receipt evidence. Legacy root-level observability/ and .mcp-data/ locations are not read, migrated, or removed.

After preflight returns ready, ask the agent to inspect schema or run a bounded governed query. For the demo:

mcp-data-cli schema data
mcp-data-cli query data 'SELECT id, name, stock FROM products ORDER BY id' --limit 10

Installation commands

Public install:

curl -fsSL https://raw.githubusercontent.com/hassanvfx/mcp-data-analysis-agent/main/install.sh | bash

If you already cloned this checkout:

./install.sh --local

The installer configures supported global client entries for Codex, Claude Code, Copilot, Cline, Cursor, Windsurf, and Continue. Each global entry uses the verified absolute path of this machine’s installed mcp-data-mcp, avoiding editor PATH issues while still containing no database secret. For complete client compatibility, demo cleanup, project-scoped fallback setup, Cline VS Code reload guidance, and operations details, use the hosted guide.

Cline in VS Code

Cline's visible MCP settings are global to the editor host, so activate one project explicitly after opening that folder:

mcp-data-cli cline activate --project-root /absolute/path/to/data-project
mcp-data-cli cline activate --project-root /absolute/path/to/data-project --apply --yes

This writes only the absolute MCP executable, --project-root, and .mcp-data-source to every detected Cline runtime file; it never writes a database URL or environment secret. Run Developer: Reload Window in VS Code, then open Cline → MCP Servers. Switching projects requires activation again. Use mcp-data-cli cline status to inspect the exact files and their managed state. .cline/mcp.json is a legacy project-local file and is not treated as Cline's active VS Code configuration.

Remove it from all agents

Tell your agent: “Please uninstall MCP Data Analysis from all agents.” It previews exact managed global entries and managed demos first. After you confirm the preview, it runs:

mcp-data-cli uninstall --all
mcp-data-cli uninstall --all --apply --yes

Add --project-root /absolute/path/to/project for every project-scoped fallback entry you also want removed. Cleanup never deletes custom sources, databases, governance files, observability evidence, or unrelated client settings.

More information

Available Tools

20 tools
begin_analysis_taskD

Inputs: title (required), objective (required). Returns: object

cancel_analysis_taskD

Inputs: task_id (required). Returns: object

compare_periodsD

Inputs: sql (required), source_alias (required), current_parameters_json (required), previous_parameters_json (required), +1 more. Returns: object

complete_analysis_taskD

Inputs: task_id (required), findings (required), next_steps. Returns: object

configure_demoA

Create a seeded retail demo only after the user explicitly approves it.

Inputs: confirmed. Returns: object

detect_changeD

Inputs: sql (required), source_alias (required), current_parameters_json (required), baseline_parameters_json (required), +1 more. Returns: object

evaluate_analysis_taskD

Inputs: task_id (required). Returns: object

explain_sqlD

Inputs: sql (required), source_alias (required), parameters_json. Returns: object

get_schemaD

Inputs: source_alias (required). Returns: result

list_recipesD

Inputs: no named parameters. Returns: result

list_sourcesD

Inputs: no named parameters. Returns: result

preflightA

Validate this project's source configuration without revealing its URL.

Inputs: no named parameters. Returns: object

run_metricD

Inputs: name (required), task_id. Returns: object

schema_stateD

Inputs: source_alias (required). Returns: object

suggest_joinsD

Inputs: source_alias (required). Returns: result

task_timelineD

Inputs: task_id (required). Returns: result

validate_and_executeD

Inputs: sql (required), source_alias (required), limit, offset, +2 more. Returns: object

validate_sqlD

Inputs: sql (required), source_alias (required), parameters_json. Returns: object

verify_observabilityD

Inputs: no named parameters. Returns: object

welcomeB

Explain the project source-file configuration requirement.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    D1.8/5.0

    Scored across 20 tools

    Disambiguation3/5

    Many tools have clear distinct responsibilities, but some pairs overlap in intent (get_schema vs schema_state, validate_sql vs validate_and_execute) and task lifecycle tools (begin/complete/evaluate) could be confused without descriptions. The boundaries are mostly inferable but not consistently crisp.

    Naming Consistency2/5

    Tool names mix verb-first actions (verify_observability, get_schema, run_metric) with noun-only states (schema_state, task_timeline) and one-word commands (preflight, welcome). The pattern is inconsistent, though most names are readable.

    Tool Count3/5

    20 tools is on the higher side but not unreasonable for a data-analysis agent covering tasks, schema, SQL, metrics, and recipes. Several tools could be consolidated (e.g., schema_state into get_schema, validate_and_execute with validate_sql), which would make the count more focused.

    Completeness4/5

    The set covers core data-analysis workflows: task lifecycle, schema introspection, SQL validation, metric execution, comparisons, and change detection. It lacks explicit data fetching/result retrieval endpoints, but the metric and SQL tools likely fill that role; onboarding tools are extra rather than essential.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A production-ready MCP server that enables safe, read-only SQL SELECT queries against PostgreSQL databases with built-in security validation. It features connection pooling, automatic row limits, and structured logging to ensure secure and reliable database interactions.
      32 npm
      ISC
    • A
      license
      Not graded
      quality
      F
      maintenance
      Read-only MCP server for SQL databases (SQL Server, Postgres, SQLite) with multi-server support and three-layer safety using AST validation and linting.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Read-only MCP server that lets AI agents safely query SQLite, PostgreSQL, and MySQL/MariaDB. Enforces read-only transactions with column masking, row caps, query timeouts, EXPLAIN-based cost rejection, and rate limiting.
      7
      50 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Read-only MCP server for SQL databases (SQLite/PostgreSQL) that enables listing tables, describing schemas, and executing SELECT queries with safety guardrails.
      MIT