RAILWAY_SETUP.mdā¢3.72 kB
# Quick Railway Setup Guide
## š Deploy in 5 Minutes
### Step 1: Get Your Data Commons API Key
1. Visit [apikeys.datacommons.org](https://apikeys.datacommons.org/)
2. Sign in with your Google account
3. Create a new API key
4. Copy the key (you'll need it in Step 3)
### Step 2: Deploy to Railway
1. **Click the Deploy Button**:
[](https://railway.app/template/new?template=https://github.com/ARJ999/Data-Commons-mcp-server)
2. **Login to Railway**:
- Use GitHub, Google, or email
3. **Configure the Template**:
- Repository Name: `Data-Commons-mcp-server` (or your choice)
- Make it public or private
### Step 3: Set Environment Variable
In the Railway deployment screen:
1. Find the **Environment Variables** section
2. Add variable:
- **Name**: `DC_API_KEY`
- **Value**: [paste your API key from Step 1]
3. Click **Deploy**
### Step 4: Get Your MCP Endpoint
1. Wait for deployment to complete (1-2 minutes)
2. Go to **Settings** ā **Networking**
3. Click **Generate Domain**
4. Your MCP endpoint is: `https://your-app.railway.app/mcp`
### Step 5: Test Your Server
```bash
curl -X POST https://your-app.railway.app/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/list",
"id": 1
}'
```
You should see a list of available MCP tools.
## š§ Configure MCP Clients
### For Manus
Add to your Manus configuration:
```json
{
"mcpServers": {
"datacommons": {
"url": "https://your-app.railway.app/mcp",
"transport": "http"
}
}
}
```
### For Claude Desktop
Add to `claude_desktop_config.json`:
```json
{
"mcpServers": {
"datacommons": {
"command": "curl",
"args": ["-X", "POST", "https://your-app.railway.app/mcp", "-H", "Content-Type: application/json", "-d", "@-"]
}
}
}
```
## š Available Tools
Your MCP server provides these tools:
1. **`search_indicators`**: Search for statistical variables
- Example: "population growth rate in USA"
2. **`get_observations`**: Get actual data for variables
- Example: Get population data for California
## š° Cost Estimate
**Railway Pricing**:
- **Hobby Plan**: $5/month (500 execution hours)
- **Estimated Usage**: ~$0.50-2/month for light use
- **Free Trial**: $5 credit for new users
## š Monitoring
1. **View Logs**: Railway Dashboard ā Deployments ā Logs
2. **Check Metrics**: Railway Dashboard ā Metrics
3. **Resource Usage**: Monitor CPU and memory
## āļø Advanced Options
### Custom Data Commons Instance
Add environment variable:
```
DC_API_ROOT=https://your-custom-instance.datacommons.org
```
### Enable Debug Logging
Add environment variable:
```
LOG_LEVEL=DEBUG
```
### Custom Domain
1. Railway Settings ā Networking ā Custom Domain
2. Add your domain (e.g., `mcp.yourdomain.com`)
3. Update DNS as instructed
## š Troubleshooting
### Deployment Failed
**Check**:
- API key is set correctly
- No typos in environment variable name
- View deployment logs for errors
### Can't Connect
**Verify**:
- Domain is generated and active
- URL ends with `/mcp`
- Test with curl command above
### Server Errors
**Common Fixes**:
- Regenerate API key
- Redeploy from Railway dashboard
- Check Railway status page
## š Full Documentation
For detailed information, see:
- [README.md](./README.md) - Complete documentation
- [DEPLOYMENT.md](./DEPLOYMENT.md) - Detailed deployment guide
## šÆ Next Steps
1. ā
Deploy to Railway
2. ā
Test the endpoint
3. ā
Configure your MCP client
4. š Start querying Data Commons!
---
**Questions?** Open an issue on [GitHub](https://github.com/ARJ999/Data-Commons-mcp-server/issues)