关于 Gas Agent
Gas Agent 是兼容 MCP 的仪表板和自然语言 Agent,用于监测 Ethereum、BNB 和 Polygon 的 Gas 价格。它提供图表、低费用提醒,以及 Gas 历史记录的 CSV 导出。
主要功能
- 01监测三个网络的 Gas 价格
- 02查看费用历史图表
- 03用自然语言提问
- 04接收低费用提醒
- 05将 Gas 历史导出为 CSV
适用场景
- 01比较不同网络的 Gas 价格
- 02交易前查看当前费用
- 03查看费用变化趋势
- 04导出 Gas 历史记录
MCP 相关
项目在 `mcp.json` 中提供兼容 MCP 的插件架构,可连接 Claude 或 GPT。其 API 提供 Gas 价格数据和自然语言回复。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
服务地址
https://mcp-gas-agent-pro-final-pueyk67dg-samarabdelhameeds-projects.vercel.app一键复制安装命令
Claude CodeTerminal
claude mcp add --transport http gas-agent https://mcp-gas-agent-pro-final-pueyk67dg-samarabdelhameeds-projects.vercel.appCursor.cursor/mcp.json
{"mcpServers":{"gas-agent":{"type":"http","url":"https://mcp-gas-agent-pro-final-pueyk67dg-samarabdelhameeds-projects.vercel.app"}}}在 Cursor 中打开VS Code.vscode/mcp.json
{"servers":{"gas-agent":{"type":"http","url":"https://mcp-gas-agent-pro-final-pueyk67dg-samarabdelhameeds-projects.vercel.app"}}}在 VS Code 中打开Claude Desktopclaude_desktop_config.json
{"mcpServers":{"gas-agent":{"type":"http","url":"https://mcp-gas-agent-pro-final-pueyk67dg-samarabdelhameeds-projects.vercel.app"}}}Windsurf~/.codeium/windsurf/mcp_config.json
{"mcpServers":{"gas-agent":{"serverUrl":"https://mcp-gas-agent-pro-final-pueyk67dg-samarabdelhameeds-projects.vercel.app"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
🚀 MCP Gas Price Agent Dashboard 🛰️
基于 Node.js、Express 和 TailwindCSS 构建的 MCP 兼容型、面向 AI 的 Gas 价格 Agent。
此仪表板让用户能够监控 Ethereum、BNB 和 Polygon 的实时 Gas 价格,使用自然语言提问,并获取关于何时进行交易的智能建议。
🧠 本项目的成果
从最初的目标到完整实现,我们已完成以下内容:
- ✅ 支持 Ethereum、BNB 和 Polygon 的多网络功能
- ✅ 为各个网络提供 实时 Gas 价格 API
- ✅ 提供带交互式图表的 仪表板(随时间变化的 Max Fee 和 Priority Fee)
- ✅ 提供 自然语言处理 Agent,用于理解类似以下的人类提问:
- “现在是好时机吗?”
- “最高 Gas 费用是多少?”
- “比较不同网络”
- ✅ 在 Gas 费用极低时发送 实时提醒
- ✅ 将 Gas 历史记录导出为 CSV
- ✅ 自动刷新的 UI(可调整刷新频率)
- ✅ 使用 Tailwind CSS 构建的 时尚暗色主题 UI
- ✅ 兼容 MCP 的插件(
mcp.json),可直接连接到 Claude 或 GPT
🔧 功能
| Endpoint | 描述 |
|---|---|
/api/gas-price | 返回所选网络的实时 Gas 价格 |
/api/nlp-agent | 返回对自然语言问题的智能回复 |
/dashboard | 显示实时 Gas 图表、NLP、导出工具等 |
/ | 基于 Tailwind 的首页 |
mcp.json | 面向 AI Agent 的插件架构 |
📸 预览

(展示实时图表、网络选择器、NLP Agent 输入框、CSV 导出功能)
📦 技术栈
Node.js + ExpressTailwindCSSChart.jsBlocknative, BscScan, PolygonScan APIs- MCP 插件(适用于 Claude/GPT)
🚀 本地运行方法
- 安装依赖
npm install
2. **Build Tailwind CSS**
```bash
npm run build:css
```
3. **Start server**
```bash
npm start
```
4. **Visit the app**
Open your browser at:
[http://localhost:3000](http://localhost:3000)
---
## 🤖 Ask Anything!
The AI Agent supports questions like:
- "Is now a good time?"
- "What’s the gas fee?"
- "What's the average gas price?"
- "What’s the highest gas today?"
- "Which network is cheaper?"
- "Is BNB cheaper than Ethereum?"
---
## 🔌 AI Plugin (MCP)
You can connect this project directly to Claude/GPT via the `mcp.json` file.
Example usage:
```json
{
"schema_version": "v1",
"name_for_model": "mcp_gas_agent",
...
}
```
---
## 📁 Folder Structure
```
📦 MCP-Gas-Agent
├── public/
│ ├── index.html
│ ├── dashboard.html
│ └── styles.css
├── server.js
├── mcp.json
├── tailwind.config.js
├── package.json
└── README.md
```
---
## 📝 License
MIT © 2025 - MCP Gas Price Agent Team
---
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。