mcp-gas-agent

An MCP-compatible AI-ready gas price agent built with Node.js, Express, and TailwindCSS, enabling users to monitor real-time gas prices on Ethereum, BNB, and Polygon.

Visit Server
Added on 3/28/2025

๐Ÿš€ MCP Gas Price Agent Dashboard ๐Ÿ›ฐ๏ธ

An MCP-compatible AI-ready gas price agent built with Node.js, Express, and TailwindCSS.
This dashboard enables users to monitor real-time gas prices on Ethereum, BNB, and Polygon, ask natural language questions, and receive smart recommendations on when to transact.


๐Ÿง  What This Project Delivers

From initial goals to full implementation, here's what has been achieved:

  • โœ… Multi-network support for Ethereum, BNB, and Polygon
  • โœ… Live gas price API for each network
  • โœ… Dashboard with interactive charts (Max Fee & Priority Fee over time)
  • โœ… Natural Language Processing Agent to interpret human questions like:
    • โ€œIs now a good time?โ€
    • โ€œWhatโ€™s the max gas fee?โ€
    • โ€œCompare between networksโ€
  • โœ… Real-time alerts when gas fee is extremely low
  • โœ… Export to CSV of gas history
  • โœ… Auto-refreshing UI (adjustable refresh rate)
  • โœ… Stylish dark-themed UI using Tailwind CSS
  • โœ… MCP-compatible plugin (mcp.json) so it can be connected directly to Claude or GPT

๐Ÿ”ง Features

| Endpoint | Description | | ---------------- | ------------------------------------------------ | | /api/gas-price | Returns live gas prices for selected network | | /api/nlp-agent | Returns intelligent replies to natural questions | | /dashboard | Displays live gas charts, NLP, export tools, etc | | / | Tailwind-based landing page | | mcp.json | Plugin schema for AI agents |


๐Ÿ“ธ Preview

Dashboard Screenshot
(Shows live chart, network selector, NLP agent input, CSV export)


๐Ÿ“ฆ Tech Stack

  • Node.js + Express
  • TailwindCSS
  • Chart.js
  • Blocknative, BscScan, PolygonScan APIs
  • MCP Plugin (Claude/GPT ready)

๐Ÿš€ How to Run Locally

  1. Install dependencies
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

---