Skip to main content
Glama

Data Commons MCP Server

by ARJ999
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**: [![Deploy on Railway](https://railway.app/button.svg)](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)

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ARJ999/Data-Commons-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server