Skip to main content
Glama
Urazanev

Mantle Yield MCP

by Urazanev
README.md
# Mantle Yield MCP

Universal MCP server for Mantle yield data, backed by the Mantle Yield API at `https://mantle-yield.asterworks.cc`.

It is designed to work with any MCP client that can launch a local process over `stdio`, including terminal agents and editor-based MCP hosts.

## What it provides

- `mantle_get_health` — backend health status
- `mantle_get_summary` — dashboard summary
- `mantle_list_opportunities` — list opportunities with filters, sorting, and pagination
- `mantle_get_opportunity` — full details for a single opportunity
- `mantle_get_opportunity_chart` — APY / TVL chart data for one opportunity
- `mantle_compare_opportunities` — side-by-side comparison for 2–3 opportunities
- `mantle_refresh_data` — trigger backend refresh

## Requirements

- Node.js `>= 22`
- npm

## Install

```bash
git clone https://github.com/Urazanev/mantle-yield-mcp.git
cd mantle-yield-mcp
npm install
npm run build
```

No `.env` file is required for the default setup.

## Run locally

```bash
npm start
```

If the process stays open, the server is waiting for an MCP client on `stdin` / `stdout`.

## Universal MCP setup

Most MCP clients ultimately need the same runtime information:

- executable command
- absolute path to the built server entrypoint
- optional environment variables

Use this runtime shape in your MCP client configuration, adapting only the outer JSON structure to your client:

```json
{
  "name": "mantle-yield",
  "type": "stdio",
  "command": "node",
  "args": [
    "/ABSOLUTE/PATH/TO/mantle-yield-mcp/dist/index.js"
  ]
}
```

Replace `/ABSOLUTE/PATH/TO/mantle-yield-mcp/dist/index.js` with the real absolute path on your machine.

## Integration notes

- Use an absolute path to `dist/index.js`.
- Prefer launching `node` directly.
- Do not use `npm start`, `npx`, or other wrappers as the MCP command, because wrapper output can break the MCP handshake.
- The server supports both common local stdio framing styles used by MCP hosts:
  - `Content-Length` framed JSON-RPC
  - newline-delimited JSON-RPC

## Environment variables

All environment variables are optional.

| Variable | Default | Description |
|---|---|---|
| `MANTLE_YIELD_API_BASE_URL` | `https://mantle-yield.asterworks.cc` | Override backend API base URL |
| `MANTLE_YIELD_API_TOKEN` | unset | Optional bearer token |
| `MANTLE_YIELD_API_TIMEOUT_MS` | `10000` | HTTP timeout in milliseconds |

## Development

```bash
npm run dev
```

or

```bash
npm run dev:tsx
```

## Troubleshooting

- Rebuild after code changes: `npm run build`
- If a client hangs on `initialize`, verify it launches `node /absolute/path/to/dist/index.js` directly

## Notes

- Uses only the Mantle Yield backend API as its data source
- Does not call DefiLlama directly
- Does not parse HTML or read local snapshot files
- Does not execute on-chain transactions

TDQS

A4.4/5.0

Scored across 7 tools

Disambiguation5/5

Each tool serves a clearly distinct purpose: health checks, dashboard summary, individual opportunity details, historical charts, listing with filters, comparison, and manual refresh. There is no overlap or ambiguity between tool boundaries.

Naming Consistency5/5

All tool names follow the same 'mantle_verb_noun' pattern with snake_case throughout. The consistent use of get/list/compare/refresh clearly communicates the action and object for each tool.

Tool Count5/5

With 7 tools, the server is well-scoped for a yield data platform. Each tool covers a distinct aspect of the domain without redundancy or bloat, fitting the ideal 3-15 tool range.

Completeness5/5

The tool set covers the full read-only lifecycle of yield opportunities: listing, retrieving details, historical charts, comparison, and summary/health status. The included refresh action adds operational coverage, leaving no obvious gaps for the stated purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues