msprof-mcp
Provides analysis of performance data collected by the Ascend PyTorch Profiler, enabling identification of bottlenecks, operator-level timing, communication overhead, and trace queries for PyTorch workloads on Ascend NPUs.
Click on "Install 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., "@msprof-mcp分析/path/to/kernel_details.csv,列出耗时最长的 10 个算子。"
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.
msprof mcp
简介
msprof mcp 是一个基于 Model Context Protocol (MCP) 的服务器,旨在为大语言模型 (LLM) 提供分析 Ascend PyTorch Profiler 采集性能数据的能力。通过一系列内置工具,它可以帮助用户快速定位性能瓶颈、分析算子耗时、查看通信开销以及进行 Trace 数据的深度查询。
Related MCP server: xtai-mcp-data-analysis
目录结构
msprof_mcp/
├── pyproject.toml # 项目配置文件 (build-system, dependencies)
├── src/
│ └── msprof_mcp/
│ ├── __init__.py
│ ├── server.py # MCP 服务器入口
│ └── tools/ # 工具包
│ ├── msprof_analyze_cmd.py
│ ├── csv_analyze.py
│ ├── json_analyze.py
│ └── trace_view/
└── README.mdMCP 能力说明
本服务提供以下核心能力,支持多维度性能数据分析。您可以直接在对话中使用自然语言(如示例 Prompt)来调用这些工具。
1. 总体分析 (msprof-analyze)
工具名称 | 描述 | 示例 Prompt |
| 调用 | "分析 |
2. TimeLine 分析 (trace_view)
工具名称 | 描述 | 示例 Prompt |
| 分析计算、通信与调度的重叠情况,判断负载特征(计算/通信密集型)。 | "分析 |
| 搜索 Trace 中的特定 Slice(算子/函数),支持模糊匹配和时间范围过滤。 | "在 |
| 根据时间范围获取 Flow 关联的 CPU/NPU 算子明细,支持按 | "获取 |
| 执行自定义 SQL 查询,支持 Slice/Thread/Process 等表的深度分析。 | "对 |
3. 算子性能分析 (CSV)
工具名称 | 描述 | 示例 Prompt |
| 分析 | "分析 |
| 查询特定算子(按名称或类型)的详细执行信息。 | "从 |
| 分析 | "统计 |
| 查询特定类型算子或 Core 类型算子的详细统计数据。 | "查看 |
| 通用 CSV 字段搜索工具,支持按列值过滤。 | "在 |
4. 通信性能分析 (JSON)
工具名称 | 描述 | 示例 Prompt |
| 分析 | "分析 |
| 分析 | "分析 |
5. 配置信息查询
工具名称 | 描述 | 示例 Prompt |
| 获取 | "读取 |
6. SQL执行
工具名称 | 描述 | 示例 Prompt |
| 执行只读 SQL 并返回结果,当结果行数/返回字符数超阈值时会返回失败并提示收敛查询。 | "对 |
| 执行只读 SQL 并将全量结果保存为 CSV,只返回导出状态、路径和行数,不返回查询结果内容。 | "将 |
快速开始
方式一:直接运行 (PyPI)
如果您已安装 uv,可以直接运行以下命令启动服务:
uvx msprof-mcp方式二:本地开发运行
# 1. 克隆代码仓库
git clone <repository_url>
cd msprof_mcp
# 2. 运行服务
uv run msprof-mcp集成方法
集成到 Cherry Studio / Claude Desktop
在 MCP 配置 JSON 中添加如下配置。建议优先使用 PyPI 版本。
1. 使用 PyPI 版本 (推荐)
{
"mcpServers": {
"msprof-mcp": {
"name": "msprof_mcp",
"description": "msprof mcp server",
"command": "uvx",
"args": [
"msprof-mcp"
],
"env": {},
"isActive": true,
"type": "stdio"
}
}
}2. 使用本地源码 (开发调试)
{
"mcpServers": {
"msprof-mcp-local": {
"name": "msprof_mcp_local",
"description": "msprof mcp server (local)",
"command": "uv",
"args": [
"run",
"msprof-mcp"
],
"cwd": "/absolute/path/to/msprof_mcp",
"env": {},
"isActive": true,
"type": "stdio"
}
}
}注意:使用本地源码时,请将
cwd修改为您的实际项目路径。
日志说明
msprof-mcp 默认使用 WARNING 日志级别,避免在 stdio 集成场景下把 mcp.server.lowlevel.server 的请求级 INFO 日志打印到 Agent CLI/Cherry Studio/Claude Desktop 终端中。
如果需要排查问题,可以在 MCP 配置的 env 中显式开启更详细日志,例如:
{
"MSPROF_MCP_LOG_LEVEL": "INFO"
}可选值包括 DEBUG、INFO、WARNING、ERROR。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server that enables Large Language Models to retrieve, analyze, and query metric data from Prometheus databases through pre-defined routes.34MIT
- Flicense-qualityDmaintenanceAn MCP server for data analysis and visualization supporting CSV and Excel files. It enables users to generate statistical summaries and create multi-dimensional charts like heatmaps and bar plots through natural language.
- Alicense-qualityBmaintenanceAn MCP server that converts Windows WPR .etl performance traces into structured JSON summaries and flamegraph-ready data for LLM analysis. It bridges Windows Performance Analyzer automation with LLM reasoning capabilities for performance troubleshooting.1MIT
- AlicenseAqualityBmaintenanceMCP server for querying and analyzing TensorBoard event files, enabling AI agents to extract scalar data, statistics, and correlations without a running TensorBoard server.611GPL 3.0
Related MCP Connectors
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for MiniMax H3 multimodal video generation
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Krusty84/msprof_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server