Skip to main content
Glama
phuihock

TA-Lib MCP Server

by phuihock
test_tool_call.py853 B
import asyncio from mcp import ClientSession, StdioServerParameters from mcp.client.stdio import stdio_client async def main(): server_params = StdioServerParameters( command="uv", args=["run", "mcp-talib"], ) async with stdio_client(server_params) as (reader, writer): async with ClientSession(reader, writer) as session: await session.initialize() # Call SMA tool result = await session.call_tool( "calculate_sma", arguments={ "close_prices": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "timeperiod": 10 } ) print("SMA calculation result:") print(result.content[0].text) if __name__ == "__main__": asyncio.run(main())

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/phuihock/mcp-talib'

If you have feedback or need assistance with the MCP directory API, please join our Discord server