-
Environment Variables (set in
.envor deployment platform):# Required ORACLE_USER=your_oracle_user ORACLE_PASS=your_oracle_password ORACLE_CONN=host:port/service MCP_API_KEY=your-secure-api-key-here # REQUIRED in production # Recommended NODE_ENV=production PORT=3000 # CORS_ORIGIN=https://your-telnyx-domain.com # TODO: For future - restrict CORS to specific domains LOG_LEVEL=info
-
Security Settings:
- ✅ Set
MCP_API_KEY- Required in production - ⏳ Set
CORS_ORIGIN- TODO: For future - restrict to Telnyx domain(s) (currently allows all origins) - ✅ Set
NODE_ENV=production- Enables production security - ✅ Use HTTPS/TLS (via reverse proxy recommended)
- ✅ Set
-
Oracle Database:
- ✅ Ensure Oracle database is accessible from deployment environment
- ✅ Verify connection string format:
host:port/service - ✅ Test connection before deployment
-
TLS/HTTPS (Required for production):
- Use a reverse proxy (nginx, traefik, AWS ALB, etc.)
- Configure TLS termination at the proxy
- Forward HTTP requests to app on port 3000
-
API Key:
- Generate a strong, random API key (32+ characters)
- Store securely (environment variables, secrets manager)
- Never commit to version control
-
CORS (TODO: For future implementation):
- Currently allows all origins (
*) for easier deployment - Future: Set
CORS_ORIGINto specific Telnyx domain(s) for better security - Code is prepared for restriction but commented for now
- Currently allows all origins (
-
Network Security:
- Use firewall rules to restrict access
- Consider VPN or private network for Oracle DB
- Use database connection encryption if available
# Build and deploy
docker-compose up -d --build
# Or use Docker directly
docker build -t mcp-oracle-server .
docker run -d \
-p 3000:3000 \
-e ORACLE_USER=user \
-e ORACLE_PASS=pass \
-e ORACLE_CONN=host:1521/service \
-e MCP_API_KEY=your-key \
-e NODE_ENV=production \
-e CORS_ORIGIN=https://your-domain.com \
mcp-oracle-server- Use ECS task definition with environment variables
- Configure ALB for HTTPS termination
- Use Secrets Manager for sensitive values
- Deploy container with environment variables
- Configure Cloud Load Balancer for HTTPS
- Use Secret Manager for API keys
- Deploy container with environment variables
- Use Application Gateway for HTTPS
- Use Key Vault for secrets
# Install dependencies
npm ci --production
# Set environment variables
export NODE_ENV=production
export ORACLE_USER=...
export ORACLE_PASS=...
export ORACLE_CONN=...
export MCP_API_KEY=...
# Use PM2 for process management
npm install -g pm2
pm2 start src/server.js --name mcp-oracle
pm2 save
pm2 startup- Deploy server and get public URL (e.g.,
https://mcp.yourdomain.com) - Ensure HTTPS is enabled
In Telnyx AI Agent settings:
{
"mcp": {
"url": "https://mcp.yourdomain.com/mcp",
"apiKey": "your-mcp-api-key-here",
"transport": "http"
}
}Headers to send:
Content-Type: application/jsonx-mcp-api-key: your-mcp-api-key-here
curl -X POST https://mcp.yourdomain.com/mcp \
-H "Content-Type: application/json" \
-H "x-mcp-api-key: your-api-key" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'GET /health- Basic health checkGET /ready- Readiness check (verifies DB connection)GET /metrics- Prometheus metrics
- Logs written to
logs/directory - Rotating daily, 14-day retention
- Set
LOG_LEVEL=infofor production (orwarnfor less verbose)
-
Set up alerts for:
- Health check failures
- High error rates
- Database connection failures
- High response times
-
Monitor:
- Request rate
- Error rates
- Database connection pool usage
- Response times
-
"Endpoint not found":
- Verify server is running
- Check route registration in logs
- Verify URL includes
/mcppath
-
"Unauthorized":
- Verify
MCP_API_KEYmatches in Telnyx config - Check header name:
x-mcp-api-key - Verify API key is set in environment
- Verify
-
Database connection failures:
- Verify Oracle connection string format
- Check network connectivity
- Verify credentials
- Check Oracle Instant Client in Docker
-
CORS errors:
- Currently allows all origins - should work out of the box
- Future: If restricting CORS, set
CORS_ORIGINto Telnyx domain - Verify HTTPS is used
- ✅ Use reverse proxy for TLS termination
- ✅ Set strong API keys
- ✅ Restrict CORS to known domains
- ✅ Monitor logs and metrics
- ✅ Set up automated health checks
- ✅ Use secrets management for sensitive data
- ✅ Enable database connection encryption
- ✅ Set appropriate timeouts
- ✅ Use connection pooling (already configured)
- ✅ Implement rate limiting (consider adding)
- Deploy to your chosen platform
- Configure Telnyx with your server URL and API key
- Test the connection
- Monitor logs and metrics
- Set up alerts
For issues:
- Check logs in
logs/directory - Review health endpoint responses
- Verify environment variables
- Test Oracle connectivity independently