Skip to main content

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

Automatic: Just login to https://stocxer.in in your browser!

The MCP server automatically detects your session from:

  • Chrome
  • Edge
  • Other Chromium browsers

How it works

  1. Login to stocxer.in in your browser (one time)
  2. Install and run MCP - it auto-detects your session
  3. Start using - no manual token copying needed!

Manual Token (Optional)

If auto-detection doesn't work, you can manually set the token:

{
  "mcpServers": {
    "stocxer": {
      "command": "python",
      "args": ["-m", "stocxer_mcp.server"],
      "env": {
        "STOCXER_AUTH_TOKEN": "your_token_here"
      }
    }
  }
}

To get token: F12 → Application → Local Storage → stocxer.in → copy sb-access-token

💬 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

Metadata

Release files for stocxer-mcp 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stocxer-mcp 1.0.5
File Size Uploaded
stocxer_mcp-1.0.5.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stocxer-mcp 1.0.5
File Interpreter ABI Platform
stocxer_mcp-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 19.1 kB

Release files / stocxer_mcp-1.0.5.tar.gz

Download URL stocxer_mcp-1.0.5.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d674689fe9a16816676ff37b47a730898a66d7697008ad2330b3adbca052746a
BLAKE2b-256 checksum
How to use checksums
f0d78fa5fc395d45eb93a1438b0537e0e1cf2ad7e402864cd8ad7653b15fec35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release files / stocxer_mcp-1.0.5-py3-none-any.whl

Download URL stocxer_mcp-1.0.5-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c866d74bd563ac351658b62f6f1c3b139807ba284ef4c1381e4f040e6a3c95c
BLAKE2b-256 checksum
How to use checksums
97a27fad6163defc896fdf7b24de4cbb6927d38c7aa8d03a57ee03c420aa0818
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page