Skip to main content

MCP server for Stocxer AI Trading Platform - Connect your trading account to AI assistants

Project description

Stocxer MCP - AI Trading Assistant

Connect your Stocxer trading account to AI assistants like Claude Desktop, Cursor, and Windsurf. Get instant access to your portfolio, positions, orders, and powerful market analysis through natural conversation.

🌟 Features

  • 📊 Portfolio Access - View positions, orders, P&L in real-time
  • 🧠 Smart Analysis - ICT concepts, Order Blocks, Fair Value Gaps
  • 📈 Stock Screener - Technical analysis with BUY/SELL signals
  • 💬 Natural Language - Just ask your AI assistant
  • 🔐 Secure - No credentials stored locally, uses Stocxer backend

🚀 Quick Install

One-Line Installation (macOS/Linux)

curl -fsSL https://raw.githubusercontent.com/fdscoop/stocxer-mcp/main/install.sh | bash

Windows Installation

Download and run:

git clone https://github.com/fdscoop/stocxer-mcp.git
cd stocxer-mcp
install.bat

Or see detailed guide: WINDOWS_INSTALL.md

Manual Installation

  1. Clone or download this repository

    git clone https://github.com/fdscoop/stocxer-mcp.git
    cd stocxer-mcp
    
  2. Run installer

    chmod +x install.sh
    ./install.sh
    
  3. Restart Claude Desktop

    • Completely quit (Cmd+Q on Mac)
    • Reopen Claude Desktop
    • Look for 🔌 icon at bottom

pip Installation (Alternative)

pip install stocxer-mcp

Then configure manually or run install.sh.

🔐 Authentication

  1. Visit https://stocxer.in
  2. Login with your Fyers credentials
  3. MCP server automatically uses your authenticated session
  4. No need to copy tokens or configure credentials

💬 Example Conversations

Once installed, ask Claude:

Portfolio & Positions

  • "What are my current positions?"
  • "Show me today's P&L"
  • "Do I have any NIFTY positions open?"

Market Analysis

  • "Analyze NIFTY using ICT concepts"
  • "What's the market trend for BANKNIFTY?"
  • "Should I buy RELIANCE? Give me technical analysis"

Option Trading

  • "What strike should I trade for NIFTY calls?"
  • "Show me high OI strikes for BANKNIFTY"
  • "What's the PCR for FINNIFTY?"

Advanced Queries

  • "Based on my positions, should I hedge with options?"
  • "Compare my open positions with current market signals"
  • "What's the probability analysis for NIFTY today?"

🔧 Supported AI Assistants

✅ Claude Desktop (Auto-configured)

Just run install.sh and restart Claude.

Config:

{
  "mcpServers": {
    "stocxer": {
      "command": "stocxer-mcp"
    }
  }
}

✅ Cursor IDE

Add to settings:

{
  "mcp": {
    "servers": {
      "stocxer": {
        "command": "stocxer-mcp"
      }
    }
  }
}

✅ Windsurf

Same config as Cursor.

✅ Cline/Roo-Cline (VS Code)

Add to VS Code settings:

{
  "cline.mcpServers": {
    "stocxer": {
      "command": "stocxer-mcp"
    }
  }
}

🛠️ Advanced Configuration

Custom Backend URL

Create .env file in the stocxer-mcp directory:

STOCXER_API_URL=https://your-custom-backend.com

Default: https://stocxer-ai.onrender.com

Development Mode

For local testing:

STOCXER_API_URL=http://localhost:8000

📖 Available Tools

  • get_positions - Current open positions
  • get_orders - Order history
  • get_portfolio_summary - Complete portfolio overview
  • analyze_index - Multi-timeframe ICT analysis for indices
  • analyze_stock - Technical analysis for stocks
  • get_stock_quote - Live stock prices
  • search_symbol - Find stock symbols

🔒 Security & Privacy

  • No credentials stored - MCP client is just a thin wrapper
  • All logic on backend - Your trading algorithms stay private
  • Token-based auth - Secure session management via Supabase
  • Read-only by design - Cannot place orders (by design for safety)

🐛 Troubleshooting

MCP server not showing in Claude?

  1. Check config: cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
  2. Verify Python path: which python3
  3. Test server: python3 stocxer_mcp/server.py

Authentication errors?

  1. Login at https://stocxer.in
  2. Check if Fyers token is valid (check dashboard)
  3. Token expires after ~24 hours - just re-login

Connection errors?

  1. Check backend status: curl https://stocxer-ai.onrender.com/health
  2. Verify internet connection
  3. Check MCP logs in Claude

📝 License

MIT License - See LICENSE file

🤝 Support

⚠️ Disclaimer

This software is for educational and research purposes. Trading involves risk. Past performance is not indicative of future results. Always do your own research before trading.


Made with ❤️ by Stocxer AI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stocxer_mcp-1.0.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stocxer_mcp-1.0.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file stocxer_mcp-1.0.2.tar.gz.

File metadata

  • Download URL: stocxer_mcp-1.0.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for stocxer_mcp-1.0.2.tar.gz
Algorithm Hash digest
SHA256 0228b7204d6b9df622aed9d714f06f2d55f52414dd43bb0062f192858367cd25
MD5 704f681d772a0e9e74ebc4d592d1e7c3
BLAKE2b-256 0cc8569375234acea1f16cc340fd1bc3468c7aabf4a6b66c8e1840cff16c2243

See more details on using hashes here.

File details

Details for the file stocxer_mcp-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: stocxer_mcp-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for stocxer_mcp-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 813e543417aed10574d85e9b2a7468ed96ae567ae301f222e1490e3660212bd7
MD5 29b2213d85710904b260b63a577c7cf3
BLAKE2b-256 c08d40f4e164e18178b5fb7fa43ccb7205f91a1cb3a45c16d1aa0fe1f8bba8ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page