← Back to Home

🚀 How to Use DGmcp MCP Server

Step-by-step guide for Claude Desktop & ChatGPT Desktop

📋 Prerequisites

  • ✅ Claude Desktop or ChatGPT Desktop installed
  • ✅ Node.js 18+ installed on your system
  • ✅ DGmcp API token (get one if you don't have it)
🔑 Get Your Free API Token

Setting Up DGmcp in Claude Desktop

1Get Your API Token

First, you need to obtain your authentication token from DGmcp:

2Locate Claude Desktop Config File

Find and open the configuration file based on your operating system:

%APPDATA%\Claude\claude_desktop_config.json

Quick access: Press Win + R, type %APPDATA%\Claude

~/Library/Application Support/Claude/claude_desktop_config.json

Quick access: Press Cmd + Shift + G in Finder, paste the path above

~/.config/Claude/claude_desktop_config.json

Quick access: Open terminal and type nano ~/.config/Claude/claude_desktop_config.json

⚠️ Note: If the file doesn't exist, create a new file named claude_desktop_config.json in the Claude directory.

3Add MCP Server Configuration

Open the config file in a text editor and add the following configuration:

For Windows:

{ "mcpServers": { "stockmcp": { "command": "cmd.exe", "args": [ "/C", "npx", "mcp-remote", "https://dgmcp.com/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE" ] } } }

For macOS/Linux:

{ "mcpServers": { "stockmcp": { "command": "npx", "args": [ "mcp-remote", "https://dgmcp.com/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE" ] } } }
🔑 Important: Replace YOUR_TOKEN_HERE with your actual API token from Step 1!

4Restart Claude Desktop

For the changes to take effect:

  • Completely close Claude Desktop and also quit from System Tray Overflow Menu.
  • Reopen Claude Desktop
  • Wait a few seconds for MCP servers to initialize

5Enable MCP Server in Claude

After restarting Claude Desktop, you need to enable the stockmcp connector:

Follow these steps in Claude Desktop:

  1. Click the ➕ (Plus icon) button in the message input area
  2. In the menu that appears, locate "Connectors" option
  3. Disable "Web search" (toggle it off)
  4. Enable "stockmcp" connector (toggle it on)

📸 Visual Guide:

Click ➕ → Find "Connectors"

🔍 Web search (Disable)

📊 stockmcp ✓ (Enable)

💡 Why disable Web search? For best results with stock analysis, disable web search to ensure Claude uses the MCP tools directly. You can re-enable it anytime if needed.

Now verify the connection:

💡 In Claude, type:
"Check if TCS symbol is available"

If successful, Claude will use the check_symbol_availability tool and return the result!

✅ Success! You now have access to 29 stock analysis tools in Claude Desktop!

🔧 Troubleshooting

If MCP server doesn't appear:

  • Verify Node.js is installed: Open terminal/cmd and run node --version
  • Check JSON syntax - use a JSON validator
  • Ensure token is correct (no extra spaces)
  • Check Claude Desktop logs in the same folder as config file

Setting Up DGmcp in ChatGPT Desktop

📢 Note: ChatGPT Desktop's MCP support is currently in beta. The configuration process is similar to Claude Desktop but may vary slightly based on the version.

1Get Your API Token

Obtain your authentication token from DGmcp:

2Locate ChatGPT Desktop Config File

Find the MCP configuration file:

%APPDATA%\OpenAI\ChatGPT\mcp_config.json

Quick access: Press Win + R, type %APPDATA%\OpenAI\ChatGPT

~/Library/Application Support/OpenAI/ChatGPT/mcp_config.json

Quick access: Press Cmd + Shift + G in Finder, paste the path above

~/.config/OpenAI/ChatGPT/mcp_config.json

Quick access: Open terminal and type nano ~/.config/OpenAI/ChatGPT/mcp_config.json

⚠️ Note: If the file doesn't exist, create it manually in the ChatGPT configuration directory.

3Add MCP Server Configuration

Edit the config file with your preferred text editor:

For Windows:

{ "mcpServers": { "stockmcp": { "command": "cmd.exe", "args": [ "/C", "npx", "mcp-remote", "https://dgmcp.com/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE" ] } } }

For macOS/Linux:

{ "mcpServers": { "stockmcp": { "command": "npx", "args": [ "mcp-remote", "https://dgmcp.com/mcp", "--header", "Authorization: Bearer YOUR_TOKEN_HERE" ] } } }
🔑 Important: Replace YOUR_TOKEN_HERE with your actual API token!

4Enable MCP in ChatGPT Settings

Ensure MCP is enabled in ChatGPT Desktop:

  • Open ChatGPT Desktop Settings
  • Navigate to "Beta Features" or "Advanced"
  • Enable "Model Context Protocol (MCP)" if available
  • Save settings

5Restart ChatGPT Desktop

Restart the application to load MCP servers:

  • Completely quit ChatGPT Desktop
  • Reopen the application
  • Wait for initialization (may take 10-15 seconds)

6Enable MCP Server in ChatGPT

After restarting ChatGPT Desktop, enable the stockmcp connector:

Follow these steps in ChatGPT Desktop:

  1. Look for the MCP/Extensions icon or ➕ button in the chat interface
  2. Open the "Extensions" or "MCP Servers" menu
  3. Find "stockmcp" in the available servers list
  4. Enable the stockmcp server (toggle it on)

📸 Visual Guide:

Find Extensions/MCP Menu

📊 stockmcp ✓ (Enable)

💡 Note: The exact location of MCP settings may vary based on your ChatGPT Desktop version. Look for "Extensions," "Plugins," or "MCP Servers" in the settings or chat interface.

Now test the connection:

💡 In ChatGPT, type:
"Use the stockmcp server to check if INFY symbol is available"
✅ Success! ChatGPT can now access real-time Indian stock market data!

🔧 Troubleshooting

Common issues and solutions:

  • Ensure you're using ChatGPT Desktop (not web version)
  • Verify MCP beta feature is enabled in settings
  • Check Node.js installation: node --version
  • Validate JSON syntax (no trailing commas, proper quotes)
  • Check application logs for error messages

🛠️ Available Tools (29 Total)

📊 Basic Tools

  • check_symbol_availability
  • get_symbol_from_company_name
  • get_historical_data
  • compare_stocks

📈 Technical Indicators

  • get_sma_analysis
  • get_ema_analysis
  • get_rsi_analysis
  • get_macd_analysis
  • get_atr_analysis
  • get_adx_14_analysis

💹 Volume & Price

  • get_volume_analysis
  • get_volume_avg_analysis
  • get_obv_analysis
  • get_mfi_14_analysis

🎯 Advanced Analysis

  • get_bollinger_bands_analysis
  • get_stochastic_analysis
  • get_multi_indicator_summary
  • get_trend_strength_analysis
  • get_top_stocks_by_category
💡 Pro Tip: You can ask Claude/ChatGPT to "list all available stockmcp tools" to see what's available in your session!

💬 Example Queries

🔍 Basic Query:

"Check if TCS symbol is available and get last 30 days historical data"

📊 Technical Analysis:

"Analyze TCS stock using RSI, MACD, and Bollinger Bands for the last 30 days"

🎯 Advanced:

"Give me the top 10 performing stocks in the banking sector on NSE for the last 30 days"

📈 Comparison:

"Compare TCS, INFY, and WIPRO stocks for the last 60 days with volume analysis"