QUICKSTART.md•3.29 kB
# 🚀 Quick Start: Deploy to Railway
## What You Have
A complete MCP server for stock data that:
- ✅ Uses Yahoo Finance (no API key needed)
- ✅ Provides 5 powerful stock tools
- ✅ Ready for Railway deployment
- ✅ Works with Claude Desktop
## Files Created
1. **stock_mcp.py** - Main MCP server implementation
2. **requirements.txt** - Python dependencies
3. **Dockerfile** - Railway container configuration
4. **README.md** - Complete documentation
5. **.gitignore** - Git exclusions
6. **.env.example** - Environment variable template
## Deploy in 3 Steps
### Step 1: Push to GitHub
```bash
# Initialize git repository
git init
git add .
git commit -m "Initial commit: Stock MCP server"
# Create a new repository on GitHub, then:
git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO.git
git branch -M main
git push -u origin main
```
### Step 2: Deploy to Railway
1. Go to https://railway.app
2. Click "New Project"
3. Select "Deploy from GitHub repo"
4. Choose your repository
5. Railway will automatically:
- Detect the Dockerfile
- Build the container
- Deploy the service
- Provide a public URL
### Step 3: Connect to Claude Desktop
1. Get your Railway URL from the deployment
2. Open Claude Desktop config:
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
3. Add this configuration:
```json
{
"mcpServers": {
"stock-data": {
"url": "https://your-app.railway.app",
"transport": "streamable-http"
}
}
}
```
4. Replace `your-app.railway.app` with your actual Railway URL
5. Restart Claude Desktop
## Test Locally First (Optional)
```bash
# Install dependencies
pip install -r requirements.txt
# Run with stdio transport
python stock_mcp.py --transport stdio
# Or test with MCP Inspector
npx @modelcontextprotocol/inspector python stock_mcp.py
```
## Available Tools
Once deployed, you can ask Claude to:
1. **Get stock quotes**: "What's Apple's current stock price?"
2. **Check historical data**: "Show me Tesla's performance over the last 6 months"
3. **Company info**: "Tell me about Microsoft's business and financials"
4. **Financial statements**: "Get Nvidia's latest income statement"
5. **Search tickers**: "What's the ticker symbol for Amazon?"
## Troubleshooting
**Railway build fails:**
- Check Railway logs in dashboard
- Ensure Dockerfile syntax is correct
**Claude Desktop won't connect:**
- Verify URL has no trailing slash
- Check `transport` is `"streamable-http"`
- Restart Claude Desktop
- View logs: Help → View Logs
**Stock data not found:**
- Verify ticker symbol spelling
- Use `search_ticker` tool first
- Some international stocks may be limited
## No API Keys Required! 🎉
This server uses public Yahoo Finance data through the yfinance library, so you don't need to sign up for any API services or manage API keys.
## Next Steps
- Test the tools in Claude Desktop
- Customize the response formats
- Add more financial tools as needed
- Share with your team!
## Support
- Read the full README.md for detailed documentation
- Check MCP docs: https://modelcontextprotocol.io
- Railway docs: https://docs.railway.app