LocalData MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LocalData MCP ServerConnect to the PostgreSQL sales database and show me the top 5 products by revenue."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LocalData MCP Server
LocalData MCP gives LLM agents access to local and remote data — databases, files, graphs, and structured documents — along with a full data science toolkit for analysis and modeling. It exposes 52 MCP tools across 13 database types and 20+ file formats, with memory-bounded streaming so agents can work safely on large datasets without exceeding available RAM.
Quick Start
# Install permanently
uv tool install localdata-mcp
# Or run directly without installing
uvx localdata-mcpFirst-run note: Data science dependencies (scipy, scikit-learn, statsmodels, geopandas) total around 200 MB and are downloaded on first use. Subsequent starts reuse the cache. If your MCP client times out on the first launch, reconnect — the next start will be immediate.
Add to your MCP client configuration:
{
"mcpServers": {
"localdata": {
"command": "localdata-mcp"
}
}
}For uvx (no permanent install):
{
"mcpServers": {
"localdata": {
"command": "uvx",
"args": ["localdata-mcp"]
}
}
}Then connect to any supported source and start querying:
connect_database("sales", "postgresql", "postgresql://user:pass@localhost/db")
execute_query("sales", "SELECT product, SUM(amount) FROM orders GROUP BY product")
connect_database("data", "csv", "./records.csv")
analyze_hypothesis_test("data", "SELECT amount, region FROM data", column="amount", group_column="region")Feature Overview
Core Database (8 tools)
Connect, query, and inspect databases and files. All queries execute within configurable memory limits (default 2 GB) with automatic chunked streaming for large result sets.
Tool | Description |
| Open a connection to any supported database or file |
| Close a connection |
| List active connections |
| Run SQL with streaming, chunking, and preflight mode |
| Show schema and table list |
| Column types, indexes, row count |
| Locate a table across all active connections |
| Estimate query cost before execution |
Streaming and Memory (9 tools)
Tool | Description |
| Retrieve the next chunk of a streamed result |
| Fetch a specific chunk by row range |
| Batch-fetch multiple chunks in one call |
| View and configure memory limits |
| Check active streams and buffer usage |
| Free memory from a specific buffer |
| Rich metadata for a completed query |
| Cancel a running or buffered query |
| Column statistics, null rates, and quality metrics |
Tree / Structured Data (10 tools)
Navigate and edit TOML, JSON, and YAML files as navigable trees. Supports full CRUD with auto-creation of ancestor nodes and round-trip export to any supported format.
Tool | Description |
| Navigate the tree |
| Create or remove nodes |
| Read and write properties |
| List key-value pairs at a node |
| Relocate a node within the tree |
| Export as TOML, JSON, or YAML |
Graph (14 tools)
Work with DOT, GML, GraphML, and Mermaid files as directed multigraphs. Supports full CRUD on nodes and edges, shortest-path and all-paths queries, structural statistics, and multi-format export.
Tool | Description |
| Navigate the graph |
| Create or remove nodes |
| Manage edges |
| Node properties |
| Shortest or all paths between two nodes |
| Node/edge counts, density, DAG validation |
| Export as DOT, GML, GraphML, or Mermaid |
Search and Transform (2 tools)
Tool | Description |
| Regex search across query results |
| Apply column transformations to result sets |
Schema and Audit (3 tools)
Tool | Description |
| Export full schema as JSON |
| Recent query execution history |
| Recent error log |
System (2 tools)
Tool | Description |
| Verify API backward compatibility |
| Server performance and resource metrics |
Data Science (12 tools)
Run statistical analysis, modeling, and pattern detection directly on query results from any connected source.
Tool | Domain |
| Statistical Analysis |
| Statistical Analysis |
| Statistical Analysis |
| Regression and Modeling |
| Regression and Modeling |
| Pattern Recognition |
| Pattern Recognition |
| Pattern Recognition |
| Time Series |
| Time Series |
| Business Intelligence |
| Business Intelligence |
Supported Data Sources
Databases
Type | Engines |
SQL | SQLite, PostgreSQL, MySQL, DuckDB |
SQL (enterprise) | Oracle, MS SQL Server ( |
Document | MongoDB, CouchDB ( |
Key-value | Redis ( |
Search | Elasticsearch ( |
Time series | InfluxDB ( |
Graph | Neo4j ( |
RDF / SPARQL | Turtle (.ttl), N-Triples (.nt), remote SPARQL endpoints |
File Formats
Category | Formats |
Tabular | CSV, TSV |
Structured | JSON, JSONL, YAML, TOML, XML, INI |
Spreadsheet | Excel (.xlsx, .xls), LibreOffice Calc (.ods), Apple Numbers (.numbers) |
Analytical | Parquet, Feather, Arrow, HDF5 |
Graph | DOT (Graphviz), GML, GraphML, Mermaid |
RDF | Turtle (.ttl), N-Triples (.nt) |
Multi-sheet spreadsheets are fully supported: each sheet becomes a separately queryable table. Connect to a specific sheet with ?sheet=SheetName in the path.
Data Science Domains
Statistical Analysis — t-tests, chi-squared, Mann-Whitney, Kruskal-Wallis, and related hypothesis tests; one-way ANOVA with post-hoc tests; Cohen's d, eta-squared, and other effect size measures.
Regression and Modeling — linear, polynomial, logistic, ridge, lasso, and elastic net regression; model evaluation with R², RMSE, MAE, and classification metrics; automated feature selection.
Pattern Recognition — K-means, DBSCAN, and hierarchical clustering; anomaly detection via isolation forest, LOF, and one-class SVM; dimensionality reduction with PCA, t-SNE, and UMAP.
Time Series — decomposition, stationarity testing, autocorrelation analysis; ARIMA, SARIMA, and ETS forecasting; change point detection; multivariate analysis with VAR, Granger causality, and cointegration tests.
Business Intelligence — A/B test statistical analysis; RFM customer segmentation; cohort analysis, CLV modeling, and funnel analysis.
Geospatial — distance and coordinate calculations, spatial joins, interpolation, and network analysis.
Optimization — linear programming, constrained optimization, assignment problems, and network optimization.
Sampling and Estimation — bootstrap confidence intervals, Bayesian estimation, Monte Carlo simulation, and stratified sampling.
Architecture
Intention-driven interface — tools accept semantic parameters ("find strong correlations") rather than requiring statistical procedure names or threshold values
Progressive disclosure — simple calls return high-level insights with sensible defaults; advanced parameters are available when needed
Streaming-first execution — all operations are designed for chunked processing; tools automatically switch strategies based on data size, keeping memory usage within configured bounds
Composition metadata — every tool result includes metadata that downstream tools can use directly, enabling chained analysis without manual wiring
Configuration
LocalData MCP uses environment variables for optional settings. The defaults work for most cases.
Variable | Default | Description |
|
| Maximum memory per query result (MB) |
|
| Maximum concurrent database connections |
|
| Default rows per streaming chunk |
|
| Streaming buffer expiry in seconds |
| process cwd | Root directory for file access (file paths are restricted to this tree) |
Set in your MCP server configuration under "env", or in a .env file in the working directory.
Documentation
Database Connection Guide — connection strings, driver setup, and security practices
Docker Usage Guide — container deployment and configuration
Advanced Examples — production-ready usage patterns
Troubleshooting Guide — common issues and solutions
FAQ — frequently asked questions
API Reference — full tool and parameter reference
Development
git clone https://github.com/ChrisGVE/localdata-mcp.git
cd localdata-mcp
uv sync --all-extras
uv run pytestThe test suite includes 1,600+ unit tests, 234+ integration tests, and 62 enterprise-scale tests across 7 database types with 100K rows each.
Contributing
Contributions are welcome. Please read CONTRIBUTING.md before submitting a pull request.
License
Apache License 2.0 — see LICENSE for details.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChrisGVE/localdata-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server