Use when working on the MCP server, MCP tools, MCP client integrations, or adding new MCP tools for Claude Desktop.
When this skill is loaded, announce it to the user by outputting:
🛠️✅ SKILL mcp-server loaded!
Load this skill when working on:
| File | Purpose |
|---|---|
mcp/src/server.py |
FastMCP server instance + tool registration |
mcp/src/main.py |
Entry point |
mcp/src/api_client.py |
Backend API connection pool (httpx async) |
mcp/src/tools/strategy_tools.py |
Strategy validation tools |
| File | Purpose |
|---|---|
mcp/src/clients/base.py |
BaseAPIClient (shared async HTTP) |
mcp/src/clients/data_client.py |
Market data queries |
mcp/src/clients/backtesting_client.py |
Backtest execution |
mcp/src/clients/training_client.py |
Model training operations |
mcp/src/clients/strategies_client.py |
Strategy management |
mcp/src/clients/operations_client.py |
Operation tracking |
mcp/src/clients/indicators_client.py |
Technical indicator queries |
mcp/src/clients/system_client.py |
System health/metadata |
Claude Desktop / MCP Client
│
▼ MCP Protocol (stdio)
FastMCP Server (mcp/src/server.py)
│
├── @mcp.tool() decorated functions
│
▼ Domain-specific async clients
Backend API (http://localhost:8000)
Framework: FastMCP (Python MCP SDK)
Safety: Research-only tools. No live trading or order execution.
@mcp.tool()
async def hello_ktrdr() -> str:
"""Health check / connectivity test."""
@mcp.tool()
async def check_backend_health() -> dict:
"""Backend connectivity + service status."""
@mcp.tool()
async def get_available_symbols() -> list[str]:
"""List configured trading symbols."""
@mcp.tool()
async def validate_strategy(path: str) -> dict:
"""Validate strategy YAML (v2/v3 format)."""
mcp/src/clients/mcp/src/server.py or a tools file:@mcp.tool()
@trace_mcp_tool()
async def my_tool(param: str) -> dict:
"""Tool description shown to Claude."""
client = get_api_client()
return await client.my_endpoint(param)
@mcp.tool() decoratorSupports multiple backend targets via environment:
http://localhost:8000Client pooling managed by get_api_client() factory using httpx async sessions.