Are you the author? Sign in to claim
KinetiFi MCP Server
kinetifi-mcp)A high-performance Model Context Protocol (MCP) server built with Python and FastMCP. This server coordinates cross-chain operations between the Casper Network and the Mantle Network, enabling agentic systems to scan yields, aggregate multi-chain portfolio balances, and generate intent-based execution strategies.
kinetifi-mcp/
├── .ai_rules # Local developer instructions
├── requirements.txt # Python dependencies
├── server.py # Server entrypoint and tool registration
├── models/ # Pydantic models defining standard schemas
│ ├── execution_intent.py # Strategy intent blueprint schema
│ ├── portfolio_state.py # Cross-chain asset balance schema
│ └── yield_state.py # Cross-chain pool yield schema
├── tools/ # Sub-modules implementing individual query logic
│ ├── __init__.py
│ ├── generate_strategy.py # Strategy formulation logic
│ ├── get_portfolio_state.py# Portfolio balancer logic
│ └── scan_yields.py # DefiLlama and CSPR.cloud scanners
└── tests/ # Offline unit and integration tests
├── test_smoke.py # Basic connection tests
├── test_phase2_yields.py # Yield scanner mock assertions
├── test_phase3_portfolio.py # Portfolio state mock tests
└── test_phase4_strategy.py # Intent strategy generator tests
Ensure you have the following installed:
venv)Navigate to the Directory:
cd /home/tmalone1250/KinetiFi_local/KinetiFi/kinetifi-mcp
Create and Activate a Virtual Environment:
python3 -m venv .venv
source .venv/bin/activate
Install Dependencies:
pip install --upgrade pip
pip install -r requirements.txt
Set up your .env file in the project root to authenticate with Casper APIs:
# KinetiFi MCP Environment Variables
CSPR_CLOUD_BASE_URL=https://api.testnet.cspr.cloud
CSPR_CLOUD_API_KEY=your_cspr_cloud_api_key_here
fastmcp dev server.py
python server.py
kinetifi-mcp exposes 4 tools to clients:
get_statusChecks the server health.
"KinetiFi MCP Server is operational."scan_yieldsAggregates live yield opportunities across Casper DEXs (e.g., Friendly Market) and Mantle L2 DEXs (e.g., Agni, Merchant Moe).
[
{
"network": "Mantle",
"dex_name": "merchant-moe",
"trading_pair": "WMNT-USDT",
"apy": 45.2,
"pool_hash": "0x365722f12ceb2063286a268B03c654Df81B7C00F"
},
{
"network": "Casper",
"dex_name": "Friendly Market",
"trading_pair": "CSPR-USDC",
"apy": 12.45,
"pool_hash": "hash-abcd..."
}
]
get_portfolio_stateAggregates portfolio balances from Casper and Mantle addresses, converting them into standardized decimal representation.
casper_account (string, required): The Casper public key or account hash.mantle_account (string, required): The Mantle EVM wallet address.{
"balances": [
{
"network": "Casper",
"asset_symbol": "CSPR",
"balance": "1500.2500",
"usd_value_estimate": null
},
{
"network": "Mantle",
"asset_symbol": "USDC",
"balance": "250.00",
"usd_value_estimate": null
}
]
}
generate_strategyAnalyzes the aggregated portfolio and yield conditions to design a non-binding execution plan that maximizes yields or balances risks.
user_goal (string, required): The user's goal (e.g. "Maximize yield on my Casper assets").portfolio_state (object, required): Output from get_portfolio_state.yield_state (array, required): Output from scan_yields.{
"action_type": "bridge_and_swap",
"source_network": "Casper",
"target_network": "Mantle",
"asset_to_deploy": "CSPR",
"estimated_amount": "1500.2500",
"target_protocol": "merchant-moe",
"expected_apy": 45.2,
"reasoning": "Matched highest available APY (45.2%) on merchant-moe by routing CSPR to Mantle L2."
}
Run the test suite offline (all external API calls are fully mocked):
.venv/bin/pytest -v
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows