Skip to main content
Glama
crazyrabbitLTC

Morpho API MCP Server

README.md
# Morpho API MCP Server

A Model Context Protocol (MCP) server that provides tools for querying the Morpho API. This server enables Claude to interact with Morpho's GraphQL API, providing access to market data, vaults, positions, and more.

## Features

* Query Morpho markets data through GraphQL
* Full support for vaults, positions, and transactions
* Historical APY data and oracle information
* Comprehensive pagination, ordering, and filtering options
* Data validation using Zod schemas
* Error handling and type safety
* MCP-compliant server implementation

## Installation

1. Install the package:
```bash
npm install mcp-morpho-server
```

2. Add to your Claude Desktop configuration:
```json
{
  "tools": {
    "morpho": {
      "command": "node",
      "args": [
        "/path/to/node_modules/mcp-morpho-server/build/index.js"
      ]
    }
  }
}
```

## Available Tools

### Markets
- `get_markets`: Retrieve all markets with pagination and filtering
- `get_whitelisted_markets`: Get only whitelisted markets
- `get_market_positions`: Get positions for specific markets
- `get_historical_apy`: Get historical APY data
- `get_oracle_details`: Get oracle information

### Vaults
- `get_vaults`: Get all vaults with their current states
- `get_vault_positions`: Get positions for specific vaults
- `get_vault_transactions`: Get vault transaction history
- `get_vault_allocation`: Get vault market allocations
- `get_vault_reallocates`: Get vault reallocation history
- `get_vault_apy_history`: Get historical APY data for vaults

### Assets and Accounts
- `get_asset_price`: Get current price and yield information
- `get_account_overview`: Get account positions and transactions
- `get_liquidations`: Get liquidation events

## Development

The project is written in TypeScript and uses:
* @modelcontextprotocol/sdk for MCP server implementation
* axios for API requests
* zod for schema validation

To build from source:

1. Clone the repository
```bash
git clone https://github.com/crazyrabbitLTC/mcp-morpho-server.git
```

2. Install dependencies:
```bash
npm install
```

3. Build the project:
```bash
npm run build
```

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

ISC

## Author

Created by [Your Name] (<your@email>) 

TDQS

B3.2/5.0

Scored across 14 tools

Disambiguation4/5

Most tools have distinct purposes targeting different resources like accounts, markets, vaults, and specific data types (e.g., prices, APY, liquidations). However, some overlap exists between get_markets and get_whitelisted_markets, which could cause confusion as both retrieve market data with similar filtering capabilities.

Naming Consistency5/5

All tools follow a consistent snake_case naming pattern with a clear 'get_' prefix followed by a descriptive noun phrase (e.g., get_account_overview, get_historical_apy). This uniformity makes the toolset predictable and easy to navigate.

Tool Count5/5

With 14 tools, the server is well-scoped for its purpose of providing comprehensive data access to Morpho's DeFi platform. Each tool serves a specific, necessary function covering accounts, markets, vaults, and historical data without appearing bloated or sparse.

Completeness4/5

The toolset offers extensive read-only coverage for querying account details, market data, vault information, and historical metrics like APY and transactions. A minor gap exists in the lack of write or action-oriented tools (e.g., for interacting with positions or vaults), but this may be intentional for a data-focused server.

Maintenance

ActivityInactive
ResponsivenessNo issues