- Home
- MCP servers
- Fyers
Fyers
- python
3
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"quantabox-fyers-mcp-server": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/fyers-mcp-server",
"python",
"fyers_mcp_complete.py"
],
"env": {
"PYTHONWARNINGS": "ignore"
}
}
}
}This MCP server lets Claude Desktop securely interact with the Fyers trading platform using an automated OAuth flow. It exposes a complete trading toolkit, including portfolio management, order handling, and real-time market data, all through a streamlined MCP connection.
How to use
You use this MCP server by running it locally and connecting it to your MCP client (such as Claude Desktop). Start the MCP server, authenticate with Fyers via the built-in OAuth flow, and then perform trading actions through the client. The server provides endpoints for authentication, profile data, funds and holdings, positions, placing and modifying orders, canceling orders, retrieving order history, and fetching real-time market quotes.
How to install
Prerequisites: Python 3.10 or higher and Claude Desktop installed. A Fyers Trading Account with API access is required.
# Clone the repository
git clone https://github.com/quantabox/fyers-mcp-server.git
cd fyers-mcp-server
# Install dependencies using uv (recommended)
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
# Or install with pip
pip install .
Claude Desktop configuration
Add the MCP server configuration to your Claude Desktop setup so it can launch and manage the server process.
{
"mcpServers": {
"fyers-mcp-server": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/fyers-mcp-server",
"python",
"fyers_mcp_complete.py"
],
"env": {
"PYTHONWARNINGS": "ignore"
}
}
}
}
First run
- Restart Claude Desktop. 2. In Claude, run the authentication flow by triggering the MCP server. 3. The browser opens for you to log in to Fyers; your token is captured automatically. 4. You’re ready to trade using all available tools.
Security and best practices
Keep your environment secure by storing credentials in a dedicated environment file and restricting access to your machine. Regularly rotate API keys and review OAuth scopes. Use the auto-refresh token flow to maintain sessions without exposing credentials.
Troubleshooting
If authentication fails, verify credentials in your environment and ensure your Fyers app is configured with the correct redirect URI. If Claude Desktop cannot connect to the MCP server, test the MCP server directly via the launcher and review log output. Enable detailed logging if needed to diagnose issues.
Notes
This server implementation mirrors common MCP patterns: a local stdio-based runner that launches a Python process and integrates with Claude Desktop for seamless command routing to trading capabilities.
Available tools
authenticate
Initiates the OAuth authentication flow to securely obtain and store access tokens.
check_auth_status
Verifies whether the current authentication session is valid and active.
get_profile
Retrieves user profile information associated with the Fyers account.
get_funds
Returns account balance, funds availability, and margin details.
get_holdings
Provides current holdings and related P&L information.
get_positions
Lists open trading positions.
place_order
Places a new order with specified symbol, quantity, and type.
modify_order
Modifies an existing order with updated quantity or price.
cancel_order
Cancels a pending order by its identifier.
get_orders
Fetches order history and current order statuses.
get_quotes
Fetches real-time market quotes for requested symbols.