Skip to main content
Glama
marlonluo2018

Pandas-MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
read_metadata_toolA

Read file metadata (Excel or CSV) and return in MCP-compatible format.

Args: file_path: Absolute path to data file

Returns: dict: Structured metadata including: For Excel: - file_info: {type: "excel", sheet_count, sheet_names} - data: {sheets: [{sheet_name, rows, columns}]} For CSV: - file_info: {type: "csv", encoding, delimiter} - data: {rows, columns} Common: - status: SUCCESS/ERROR - columns contain: - name, type, examples - stats: null_count, unique_count - warnings, suggested_operations

interpret_column_dataA

Interpret column values and return their unique values.

This tool is most valuable for categorical fields with limited unique values, code fields that need interpretation, and fields with abbreviations or cryptic values.

Best use cases:

  • HIGH VALUE: Categorical fields (Region, Status, Category)

  • HIGH VALUE: Code fields (StatusCode "A", "B", "C")

  • HIGH VALUE: Fields with abbreviations or cryptic values

  • LOW VALUE: ID fields (usually unique values with no patterns)

  • LOW VALUE: Email fields (typically unique identifiers)

  • LOW VALUE: Numeric percentage fields (already self-explanatory)

  • CONDITIONAL: Time fields (useful for non-standard formats or categorical time)

Supported file types:

  • CSV (.csv) files

  • Excel (.xlsx, .xls) files (reads first sheet by default)

Args: file_path: Absolute path to data file column_names: List of column names to interpret sheet_name: Sheet name or index to read from Excel files (default: 0, first sheet)

Returns: dict: Structured interpretation including: - status: SUCCESS/ERROR - file_info: Basic file information - columns_interpretation: List of column interpretations with: - column_name: Name of the column - unique_values_with_counts: List of (value, count) tuples - unique_count: Total number of unique values - total_values: Total number of values in the column - null_count: Number of null values - data_type: Type of data in the column

run_pandas_code_toolA

Execute pandas code with smart suggestions and security checks.

Args: code: Python code string containing pandas operations

Returns: dict: Either the result or error information

Forbidden Operations: The following operations are blocked for security reasons: - 'os.', 'sys.', 'subprocess.' - System access operations - 'open(', 'exec(', 'eval(' - Code execution functions - 'import os', 'import sys' - Specific dangerous imports - 'document.', 'window.', 'XMLHttpRequest' - Browser/DOM access - 'fetch(', 'eval(', 'Function(' - JavaScript/remote operations - 'script', 'javascript:' - Script injection attempts

Requirements: - Must assign final result to 'result' variable - Code should contain necessary imports (pandas available as 'pd')

generate_chartjs_toolA

Generate interactive Chart.js visualizations from structured data.

Args: data: Structured data in MCP format with required structure: { "columns": [ { "name": str, # Column name "type": str, # "string" or "number" "examples": list # Array of values }, ... # Additional columns ] } Example: { "columns": [ { "name": "Category", "type": "string", "examples": ["A", "B", "C"] }, { "name": "Value", "type": "number", "examples": [10, 20, 30] } ] } chart_types: List of supported chart types to generate (first is used) title: Chart title string request_params: Additional visualization parameters (optional)

Returns: dict: Result with structure: { "status": "SUCCESS"|"ERROR", "chart_html": str, # Generated HTML content "chart_type": str, # Type of chart generated "html_path": str # Path to saved HTML file }

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/marlonluo2018/pandas-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server