battery-analyzer-mcp
This MCP server enables battery analysis via two electrochemical methods (Dunn and GITT) on Excel files, exposing these capabilities to AI assistants like Cursor and Claude Desktop.
List available methods (
list_battery_methods): Discover supported analysis methods and their expected Excel input formats.List data files (
list_data_files_tool): Browse all.xlsxfiles in the server'sbattery-analyzer-mcp/data/folder to see what datasets are ready for analysis.Run Dunn method analysis (
calculate_dunn): Perform Dunn method calculations on cyclic voltammetry data, producing K1, K2, and b values.Run GITT method analysis (
calculate_gitt): Perform Galvanostatic Intermittent Titration Technique calculations on titration data to compute diffusion coefficients, with configurable parameters includingskip_rows, electrode thickness (L), pulse duration (tau),threshold,min_points, andmax_plot_points.Access results: Each calculation returns a compact JSON response with a path to a saved Excel results file, a preview of core data, plot metadata, and a summary.
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., "@battery-analyzer-mcp Run Dunn analysis on sample_data.xlsx"
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.
Battery Analyzer MCP Server
An MCP (Model Context Protocol) server that exposes Dunn and GITT battery analysis calculations to AI assistants like Cursor and Claude Desktop.
This package is fully standalone — calculation code is copied here and does not import from battery-analyzer/.
Tools
Tool | Description |
| List available methods and expected Excel input formats |
| List |
| Run Dunn method (K1, K2, b values) on cyclic voltammetry data |
| Run GITT method (diffusion coefficients) on titration data |
Related MCP server: MOF Tools MCP Server
Data folder
Place input Excel files in:
battery-analyzer-mcp/data/Tools take only the file name (not a full path), for example dunn_method_data.xlsx. The .xlsx extension is optional.
Results are saved in the same data/ folder next to the input file.
Override the data folder with the BATTERY_ANALYZER_DATA_DIR environment variable if needed.
Input file formats
Dunn method
No header row in the Excel file:
Col 1+ | ||
Row 0 | Scan rates (V/s) | |
Row 1 | (unused) | |
Row 2+ | Voltage (V) in col 0 | Current (A) per scan rate |
GITT method
Skip first
skip_rowsmetadata rows (default: 6)Column 0: time (s)
Column 1: voltage (V)
Install
Requires Python 3.10+ and uv:
cd battery-analyzer-mcp
uv syncRun locally(if needed in case of local mcp client)
uv run battery-analyzer-mcpOr with MCP Inspector for development:
uv run mcp dev src/battery_analyzer_mcp/server.pyCursor MCP configuration
Claude Desktop configuration
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"battery-analyzer": {
"command": "uv",
"args": [
"--directory",
"<absolute path to your directory>/battery-analyzer-mcp",
"run",
"battery-analyzer-mcp"
]
}
}
}Restart Claude Desktop after saving.
Troubleshooting
Failed to spawn process: No such file or directory
Claude Desktop / Cursor could not find the command binary. GUI apps use a limited PATH and usually cannot resolve bare uv. Fix:
Run
cd battery-analyzer-mcp && uv syncto create.venv/Use the full path to
.venv/bin/battery-analyzer-mcpas thecommand(see Option A above)Or use the full path to
uv(e.g./Users/pankaj/anaconda3/bin/uv) instead of just"uv"
Example tool calls
List methods:
list_battery_methods()List available input files:
list_data_files_tool()Dunn calculation:
calculate_dunn(file_name="dunn_method_data.xlsx")GITT calculation:
calculate_gitt(
file_name="GITT_67.xlsx",
skip_rows=6,
L=1e-4,
tau=1800
)Output
Each calculation tool returns a compact JSON response (under Claude Desktop's 1 MB MCP limit):
results_path— path to the saved Excel file (*_dunn_results.xlsxor*_gitt_results.xlsx)message— status messagepreview— first rows of core results (Dunn: Voltage, K1, K2, b only)plots— plot titles and series metadata only (no x/y coordinates)summary— method-specific metadatanote— explains that full data is in the Excel file
Full numeric results and all columns are always written to results_path. Open that Excel file for complete data and plotting.
Results Excel files are written to the data/ folder next to the input file.
Dependencies
mcp[cli]— MCP Python SDKpandas,numpy,scipy,openpyxl— calculation and Excel I/O
Available Tools
4 toolscalculate_dunnA
Run the Dunn method on a cyclic voltammetry Excel file from the data folder.
Args: file_name: File name in the data folder (e.g. dunn_method_data.xlsx). .xlsx is added if omitted. max_plot_points: Maximum number of points per plot series (default 5000).
Returns: JSON with results_path, preview table, plots, and summary.
Inputs: file_name (required), max_plot_points. Returns: result
calculate_gittA
Run the GITT method on a titration Excel file from the data folder.
Args: file_name: File name in the data folder (e.g. GITT_67.xlsx). .xlsx is added if omitted. skip_rows: Number of metadata rows to skip at the top (default 6). L: Electrode thickness in cm (default 1e-4). threshold: Minimum dV to classify segment direction in V (default 1e-4). min_points: Minimum points per voltage segment (default 5). tau: Pulse duration in seconds (default 1800). max_plot_points: Maximum number of points per plot series (default 5000).
Returns: JSON with results_path, preview table, plots, and summary.
Inputs: file_name (required), L, tau, skip_rows, +3 more. Returns: result
list_battery_methodsA
List available battery analysis methods and their expected Excel input formats.
Inputs: no named parameters. Returns: result
list_data_files_toolA
List .xlsx input files available in the MCP server data folder.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinct purpose: two specific calculation methods (Dunn, GITT) plus two listing tools (methods, data files). No ambiguity between them.
All tool names use snake_case with verb_noun pattern (calculate_, list_). Only minor inconsistency is 'list_data_files_tool' includes the word 'tool', but overall pattern is clear.
Four tools is appropriate for a specialized battery analyzer MCP. Not too few, not too many, covering core functionality without bloat.
Covers listing methods/data and running two major analysis methods. Missing a generic 'run analysis' tool that selects method, but list_battery_methods helps guide the agent. Minor gap.
Maintenance
Related MCP Connectors
QuLab MCP remote server (Streamable HTTP) for computational science and lab tools.
MCP server for the Seline Analytics API
MCP server for progressive tool usage at any scale (see https://klavis.ai)
OQMD (Open Quantum Materials Database) MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA FastMCP-based server that provides data analysis tools for processing, analyzing, and visualizing data with an intuitive Streamlit web interface.2MIT
- AlicenseNot gradedqualityDmaintenanceA specialized MCP server for Metal-Organic Framework research that provides tools for database searching, structural optimization, and energy calculations via ASE. It enables scientific workflows by allowing users to interact with MOF data and perform chemical simulations through a standard SSE interface.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for batch EIS analysis, enabling ECM fitting and DRT computation from impedance data.6MIT
- AlicenseBqualityDmaintenanceFits a lithium-ion full-cell dual-water-tank model from charge/discharge voltage-capacity data for battery aging mechanism identification, with parameter fitting, batch processing, and MCP server integration.34Apache 2.0