- Shoonya MCP Server (Mock)
Content
Shoonya MCP Server (Mock)
Description
This project is a mock Market Connectivity Protocol (MCP) server designed to simulate interactions with a Shoonya-like trading API. It provides a basic framework for testing client applications that would connect to Shoonya for order placement and market data.
Note: This is a mock server. All interactions with the "Shoonya API" are simulated through placeholder functions. No actual trading or connection to live Shoonya systems occurs.
Key Features
- Authentication:
/connectendpoint for client authentication.- Simulates Shoonya login and returns an MCP-specific session token.
- Order Management:
/orderendpoint for placing trading orders.- Comprehensive validation of order parameters (data types, allowed values for exchange, order type, etc.).
- Basic pre-trade risk checks (maximum order quantity, maximum order value for LIMIT/SL orders).
- Returns mock responses from the "broker," including order status.
- Market Data (Mock):
/marketdata/subscribeendpoint to simulate subscribing to instrument data./marketdata/fetchendpoint to retrieve mock market data for subscribed instruments.- Simulated data includes LTP, volume, OHLC, and changes randomly on fetch to mimic a live feed.
- API Definition:
- A detailed API definition is available in
mcp_server_api_definition.md.
- A detailed API definition is available in
Setup and Running
-
Prerequisites:
- Python 3.x
- pip (Python package installer)
-
Installation:
- Clone the repository (if you haven't already).
- Navigate to the project directory.
- Install the required dependencies:
pip install -r requirements.txt
-
Running the Server:
- To start the Flask development server:
python mcp_server/app.py - The server will typically start on
http://127.0.0.1:5000/.
- To start the Flask development server:
API Endpoints Overview
POST /connect: Authenticate and get a session token.POST /order: Place a new order. Requires Bearer token.POST /marketdata/subscribe: Subscribe to mock market data. Requires Bearer token.GET /marketdata/fetch: Fetch mock market data for subscriptions. Requires Bearer token.
Refer to mcp_server_api_definition.md for detailed request/response formats.
Current Status
- The server is a mock implementation intended for development and testing of client applications.
- All interactions that would normally go to the Shoonya trading platform are handled by placeholder functions within
mcp_server/app.py. - No real financial transactions occur.
- Further development would be required to integrate with the actual Shoonya API.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Amap Maps高德地图官方 MCP Server
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Tavily Mcp
WindsurfThe new purpose-built IDE to harness magic
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.