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

MCP Unhcrtheme

MCP Server

一个基于FastAPI的MCP服务器,用于生成matplotlib图表,适用于数据可视化和分析场景。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
数据可视化数据分析FastAPIClaude图表生成Claude DesktopClaude

安装说明

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

作者 / 组织

rvibek

提供方

rvibek

最后核验

2026/5/17 20:19

快速接入

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

命令预览

pip install -e .

详细介绍

MCP FastAPI图表服务器

一个MCP(模型上下文协议)服务器,与FastAPI服务交互以生成matplotlib图表。

概述

此MCP服务器提供以下工具:

  • 使用FastAPI图表生成服务生成图表
  • 检查您的FastAPI服务器的状态
  • 将图表图像直接返回给客户端

先决条件

  • Python 3.8+
  • 您的FastAPI服务器正在运行 localhost:8000 随着 /plot 端点

安装

  1. 安装软件包:
pip install -e .

配置

适用于克劳德桌面

将以下内容添加到您的Claude Desktop配置文件中:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json 窗户: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "fastapi-chart": {
      "command": "python",
      "args": ["-m", "mcp_fastapi_chart.server"]
    }
  }
}

对于其他MCP客户端

配置您的MCP客户端以运行:

python -m mcp_fastapi_chart.server

可用工具

1. generate_chart

使用FastAPI图表生成服务生成图表。

参数:

  • chart_type (字符串):要生成的图表类型-“直线”、“条形图”、“散点图”或“饼图”
  • title (string):图表的主标题
  • subtitle (string):图表的副标题
  • x_label (string):X轴标签
  • y_label (string):Y轴标签
  • data (对象):带标签和值的图表数据

- labels (字符串数组):数据点的标签 - values (数字数组):数据点的值

示例用法:

{
  "chart_type": "line",
  "title": "Asylum Applications Trend",
  "subtitle": "Monthly applications received (2023-2024)",
  "x_label": "Month",
  "y_label": "Applications Received",
  "data": {
    "labels": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
    "values": [15400, 16800, 14200, 18900, 17600, 19500, 20300, 18700, 17400, 16200, 15800, 14900]
  }
}

2. check_fastapi_status

检查FastAPI服务器是否正在运行且可访问。

参数:

FastAPI服务器要求

您的FastAPI服务器应该在以下位置有一个端点 /plot 它接受具有以下JSON结构的POST请求:

{
  "chart_type": "string",
  "title": "string", 
  "subtitle": "string",
  "data": {
    "labels": ["string"],
    "values": [number]
  },
  "x_label": "string",
  "y_label": "string"
}

并且应该返回一个PNG图像作为响应。

发展

要直接运行服务器进行测试,请执行以下操作:

python -m mcp_fastapi_chart.server

云部署

当您将FastAPI服务器迁移到云端时,请更新 fastapi_base_urlmcp_fastapi_chart/server.py:

self.fastapi_base_url = "https://your-cloud-domain.com"

故障排除

  1. 连接错误:确保您的FastAPI服务器正在运行 localhost:8000
  2. 图表生成错误:验证您的FastAPI /plot 端点工作正常
  3. MCP连接问题:检查您的Claude Desktop配置文件语法

许可证

麻省理工学院

目录标签

目录标签

数据可视化数据分析FastAPIClaude图表生成Python本地部署MCP服务器

支持客户端

Claude DesktopClaude

接入字段

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

stdio

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

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

stdionone部署方式未说明

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

安装前确认

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

来源信息

继续浏览同类 MCP