
Pendle Finance MCP Server
Enables interaction with Pendle Finance DeFi protocol to fetch live yields, simulate staking and swaps, retrieve portfolio data, and get AI-based token recommendations. Provides comprehensive DeFi portfolio management and yield optimization through natural language.
README
Pendle Finance FastMCP Server 🚀
This repository contains a Model Context Protocol (MCP) Server built with FastMCP in Python.
It connects to Pendle Finance DeFi Protocol and exposes endpoints for AI agents or clients like MCP Inspector.
Features include:
- Fetching live yields from Pendle API
- Simulating staking and swaps
- Retrieving user DeFi portfolio
- AI-based token recommendations (simulated)
- AI future yield predictions (simulated)
⚙ Setup and Installation
- Prerequisites
Python 3.10+ installed on your system
Node.js 16+ if you want to use MCP Inspector
- Clone This Repo
git clone https://github.com/maneesa029/Pendle_mcp cd Pendle_mcp
- Create and Activate a Virtual Environment
Create virtual environment
python -m venv venv
Windows
.\venv\Scripts\activate
macOS/Linux
source venv/bin/activate
- Install Dependencies
pip install -r requirements.txt
- Configure .env
Create a .env file in the root folder and add your configuration:
FastAPI settings
FASTAPI_ENV=development HOST=127.0.0.1 PORT=8000
Pendle API (no secret key needed for public endpoints)
PENDLE_API_URL=https://api.pendle.finance/v1/yields
Ethereum testnet (if using staking simulation or swaps)
RPC_URL=https://sepolia.infura.io/v3/YOUR_INFURA_KEY PRIVATE_KEY=0xYOUR_TEST_PRIVATE_KEY
⚠ Security Warning: Do NOT use your main wallet private key with real funds. Always use a testnet key or a small segregated account for testing.
🔬 Running and Monitoring the Server
- Start the Pendle MCP Server
uvicorn server:app --reload --port 8000
You should see:
INFO: Uvicorn running on http://127.0.0.1:8000 INFO: Application startup complete.
- Open MCP Inspector (Optional)
If you want to test tools interactively:
npx @modelcontextprotocol/inspector
This will launch a local URL (e.g., http://127.0.0.1:6274)
Open the URL in your browser
In Tools tab, you’ll see all exposed Pendle MCP functions:
get_yield → fetch top yields
stake → simulate staking
swap → simulate swap
portfolio → user portfolio
predict_best_token → AI-recommended token
predict_future → future yield prediction
✅ 3. Test via Python Client
test_client.py
import requests
BASE = "http://127.0.0.1:8000"
print(requests.get(f"{BASE}/get_yield").json()) print(requests.post(f"{BASE}/stake", json={"user_address":"0x123","token":"PENDLE","amount":10}).json()) print(requests.get(f"{BASE}/predict_best_token").json())
🔹 Features
Fetch live Pendle yields from API
Simulate staking and swaps
Retrieve user DeFi portfolio
AI predicts best token to stake
AI predicts future yields for N days
Works seamlessly with MCP Inspector or any AI agent
🔹 Optional AI Improvements
Replace random predictions with historical yield ML model (scikit-learn / Prophet)
Include portfolio optimization for multiple tokens
Connect Ethereum testnet to simulate real transactions
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.