Portfolio Data Analytics MCP Server
Click on "Deploy 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., "@Portfolio Data Analytics MCP Server load the attached CSV and show me summary statistics"
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.
Python Portfolio — Data Analytics MCP Server
A self-contained demo portfolio project built to showcase Python skills relevant to a data-analytics / AI-assisted development role.
It is a working MCP (Model Context Protocol) server that exposes data analytics tools — load a CSV, compute summary statistics, filter rows, rank columns, compute correlations. An AI assistant (or any MCP client) can drive it over the standard protocol.
Why an MCP server? This is a real, production-shaped type of software: it connects AI agents to tools and data. I build MCP servers and AI agents as part of my daily work, and this project demonstrates those exact skills in a clean, self-contained way.
Features
load_csv— ingest a CSV dataset, get back its inferred schemalist_datasets— show all registered datasetssummary— pandasdescribe()statisticsfilter_rows— filter on a numeric column (>,<,>=, …)top_rows— top-N rows by a numeric columncorrelation— Pearson correlation between two columns
A built-in demo dataset (campaigns) lets it run immediately with no setup.
Related MCP server: DataBeak
Quickstart
# install deps + dev tools
uv sync --dev
# run tests (13 tests covering all tools)
uv run pytest -q
# run as an MCP server over stdio (used by MCP clients)
uv run portfolio_data_mcp.py
# run over SSE for local HTTP testing
uv run portfolio_data_mcp.py --transport sse --port 8765Test with the mcp CLI
# register the server so an MCP client can connect
uv run mcp install portfolio_data_mcp.py --name "portfolio-data"Example
echo 'channel,spend,conversions
social,3500,210
search,4200,330
display,3800,95
email,1100,180' | uv run python -c "
import asyncio, portfolio_data_mcp as m
asyncio.run(m.main()) # starts stdio server
"Then from an MCP client:
tools: load_csv(name="x", csv_text=...) -> schema
summary(name="x") -> statistics
top_rows(name="x", column="spend", n=3)Project layout
python-portfolio/
├── portfolio_data_mcp.py # the MCP server (tools + logic)
├── tests/
│ └── test_portfolio_mcp.py # 13 passing tests
├── pyproject.toml
└── README.mdTech
Python · MCP SDK (mcp) · pandas · pytest · type hints · uv
© Volodymyr — Vienna, Austria. Part of my job-search portfolio.
Available Tools
6 toolscorrelationA
Return the Pearson correlation between two numeric columns.
Args: name: the dataset name. col_a: first numeric column. col_b: second numeric column.
Inputs: name (required), col_a (required), col_b (required). Returns: result
filter_rowsA
Filter rows where column operator value, e.g. spend > 5000.
Args: name: the dataset name. column: the numeric column to filter on. operator: one of '>', '<', '>=', '<=', '==', '!='. value: the threshold.
Inputs: name (required), value (required), column (required), operator (required). Returns: result
list_datasetsA
List all registered datasets with their schema.
Inputs: no named parameters. Returns: result
load_csvA
Register a dataset from CSV text. Returns the inferred schema.
Args: name: a unique name for the dataset. csv_text: raw CSV content (comma-separated, first row is header).
Inputs: name (required), csv_text (required). Returns: result
summaryC
Return summary statistics for a numeric column or whole dataset.
Args: name: the dataset name.
Inputs: name (required). Returns: result
top_rowsA
Return the top-N rows sorted by column descending.
Args: name: the dataset name. column: the column to sort by. n: how many rows to return (default 5).
Inputs: name (required), column (required), n. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct data operation: loading, listing, summarizing, filtering, sorting, and correlation. There is a slight potential for overlap between summary and correlation, but they are clearly differentiated by scope (full dataset vs. pairwise columns).
All tool names follow a consistent verb_noun pattern (load_csv, list_datasets, summary, filter_rows, top_rows, correlation). The naming is clear, predictable, and uses lowercase with underscores uniformly.
With 6 tools, the server is well-scoped for a portfolio data analytics use case. Each tool serves a specific, essential analytic function without unnecessary bloat or redundancy.
The tool set covers basic data loading and exploration (summary, filtering, sorting, correlation) but lacks key operations such as grouping/aggregation, joining datasets, or data transformation (e.g., adding columns). This leaves notable gaps for a comprehensive analytics workflow.
Related MCP Connectors
Ask questions about a CSV in plain English and get answers, charts and cleaned data back.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
A statistical analyst in your AI chat: bring data and a question, get a citable, re-runnable report.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to perform statistical analysis and generate ML predictions on user data from databases or CSV files through a Model Context Protocol server.2-
- AlicenseBqualityDmaintenanceProvides 40+ specialized tools for AI assistants to load, transform, analyze, and validate CSV data from URLs and string content through the Model Context Protocol.413Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with local CSV and Parquet data files through natural language queries, facilitating tasks like summarizing datasets or retrieving specific information.4-
- AlicenseAqualityDmaintenanceEnables LLMs to safely execute pandas code for data analysis and generate interactive visualizations through the Model Context Protocol.444MIT