Files
mcp-moex/mcp-moex.py
2025-09-23 17:56:39 +03:00

27 lines
753 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from starlette.applications import Starlette
from starlette.routing import Mount
from mcp.server.fastmcp import FastMCP
from typing import TypedDict, List
from moex import bond_sequrities
mcp = FastMCP("mcp-moex - Данные с московской биржы.", port=8021)
@mcp.tool()
def get_bond_securities(bond_ticker: str, board: str) -> dict:
"""
Возвращает данные облигации по
Args:
bond_ticker (str): Тикер облигации (например, "SU26230RMFS1").
board (str): Доска торговли (например, "TQOB").
"""
return bond_sequrities(bond_ticker, board)
if __name__ == "__main__":
mcp.run(transport="streamable-http", mount_path="/mcp")