Token导航 LogoToken导航TokenDH.com
Rostaing MCP logo
数据服务stdio官方级别未说明来源级核验

Rostaing MCP

MCP Server

一个通用的模型内容协议(MCP),用于Pandas和Polars数据框架,设计为大型语言模型(LLMs)如GPT-4、Claude和Mistral的强大工具,支持数据交互、统计分析和可视化。

工具数

19

提示词数

0

GitHub Stars

1

资源数

0
数据分析数据可视化ClaudeLLM工具Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Rostaing

提供方

Rostaing

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install rostaing-mcp

详细介绍

Rostaing的模型内容协议(Rostaing-mcp)

通用模型内容协议(MCP) 熊猫波拉斯 DataFrames,旨在被GPT-4、Claude和Mistral等大型语言模型(LLM)用作强大的工具。

此软件包允许LLM安全地与数据交互,执行从简单过滤到 统计假设检验数据可视化 (返回可查看的图像)。

主要特点

  • 图书馆不可知论者: 无缝手柄 pandaspolars 数据框架。
  • 视觉智能: 生成返回的Plotly图表 Base64 PNG图像,允许LLM“查看”和生成图表。
  • 统计套件: 内置支持T检验、方差分析、卡方检验、正态性检验(Shapiro)和生存分析(Logrank)。
  • 智能NLU(模糊匹配): 自动纠正列名中的拼写错误(例如,理解“salary”指的是“salary_USD”)。
  • 状态分析: 过滤器和修改在代理的会话上下文中持续存在。

安装

pip install rostaing-mcp

*注意:这也将安装必要的依赖项,如 plotly, kaleido (用于图像生成), pingouin,以及 scipy.*

快速开始

import pandas as pd
from rostaing_mcp import DataFrameAgent, DataFrameToolHandler

# 1. Create a sample DataFrame
data = {
    'employee_name': ['Rostaing', 'Lucrèce', 'Isnard', 'Charline', 'Dacier', 'Nora'],
    'salary': [100000, 70000, 85000, 60000, 95000, 62000],
    'experience_level': ['Expert', 'Senior', 'Manager', 'Junior', 'Principal', 'Mid-Level'],
    'department': ['AI', 'Sales', 'AI', 'Sales', 'AI', 'Sales']
}
df = pd.DataFrame(data)

# 2. Initialize the core agent (Works with Polars too!)
data_agent = DataFrameAgent(df, source_description="Employee salary data")

# 3. Wrap it in the tool handler
df_tool = DataFrameToolHandler(data_agent)

# --- EXAMPLES OF DIRECT USAGE ---

# A. Inspect Data
print(df_tool.get_schema())

# B. Statistical Test (e.g., T-test between groups)
# Note: Handles fuzzy matching if you type 'Department' instead of 'department'
print(df_tool.perform_t_test(a='salary', group='department')) 

# C. Visualization (Returns Base64 Image string)
# The LLM can call this to generate a chart
image_data = df_tool.plot_bar_chart(x='employee_name', y='salary', color='department')
print("Chart generated successfully (Base64 data ready).")

与LLM代理(如Upsonic、LangChain)集成

为了让LLM使用所有可用的工具,您可以动态传递方法或将它们包装在代理类中。

from upsonic import Agent, Task

# Get the list of all callable tools for the LLM
tools_list = df_tool.get_all_tools() 

task = Task(
    description="Analyze the salary distribution and plot a bar chart by department.",
    tools=tools_list
)

agent = Agent(model="openai/gpt-4o", name="Data Analyst")
result = agent.do(task)
print(result)

可用工具

📊 可视化

  • plot_histogram, plot_bar_chart, plot_line_chart
  • plot_scatter_plot, plot_box_plot, plot_violin_plot
  • plot_heatmap, plot_pie_chart, plot_3d_scatter以及更多。

🧮 统计

  • get_summary_statistics, get_correlation_matrix
  • perform_normality_test (夏皮罗·威尔克)
  • perform_t_test (学生t检验)
  • perform_anova (单因素方差分析)
  • perform_chi2_test (独立)
  • perform_logrank_test (生存分析)

🛠 操纵

  • filter_rows (支持复杂条件)
  • sort_values
  • select_columns

实用链接

目录标签

目录标签

数据分析数据可视化ClaudeLLM工具本地部署统计测试PandasPolars

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

19

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP