Skip to content

MCP Server Deployment Summary

Status: ✅ Development Deployed | ⏳ Production Configured (Ready to Deploy)

Deployed Services

Development Environment

  • URL: https://archety-mcp-server-development.up.railway.app
  • Health Check: https://archety-mcp-server-development.up.railway.app/health ✅ LIVE
  • Status: Successfully deployed and responding
  • Backend: https://archety-backend-dev.up.railway.app
  • Branch: dev (auto-deploy enabled)

Production Environment

  • URL: https://archety-mcp-server-production.up.railway.app (will be live after first deploy)
  • Health Check: https://archety-mcp-server-production.up.railway.app/health (pending deploy)
  • Status: Environment variables configured, ready for deployment
  • Backend: https://archety-backend-prod.up.railway.app (currently broken, being fixed)
  • Branch: master (manual deploy only)

Environment Variables

Development

ARCHETY_BACKEND_URL=https://archety-backend-dev.up.railway.app
ENVIRONMENT=development
MCP_PORT=8000
MCP_HOST=0.0.0.0
MCP_API_KEYS=sk_dev_engineer1_ykfPe_XYi0-HRMZ7ZdM-hQ,sk_dev_engineer2_Zl0btP2L3guc0WSDRNpyoQ,sk_dev_engineer3_JGdkZQHYkCmNo8XxjhD9ag
MCP_ADMIN_KEY=sk_admin_dev_AFoODhrWFeN92zcoMDYFbQ

Production

ARCHETY_BACKEND_URL=https://archety-backend-prod.up.railway.app
ENVIRONMENT=production
MCP_PORT=8000
MCP_HOST=0.0.0.0
MCP_API_KEYS=sk_admin_prod_yphHCa4CwxzkdH7k4RbmdQ
MCP_ADMIN_KEY=sk_admin_prod_yphHCa4CwxzkdH7k4RbmdQ

API Keys

Development Keys

  • Engineer 1: sk_dev_engineer1_ykfPe_XYi0-HRMZ7ZdM-hQ
  • Engineer 2: sk_dev_engineer2_Zl0btP2L3guc0WSDRNpyoQ
  • Engineer 3: sk_dev_engineer3_JGdkZQHYkCmNo8XxjhD9ag
  • Admin: sk_admin_dev_AFoODhrWFeN92zcoMDYFbQ

Production Keys

  • Admin Only: sk_admin_prod_yphHCa4CwxzkdH7k4RbmdQ

Note: Production has only one admin key for maximum security. Only trusted team members should have access.


Railway Configuration

Service Settings

  • Service Name: archety-mcp-server
  • Root Directory: /mcp_server
  • Builder: NIXPACKS (Python auto-detection)
  • Start Command: bash start.sh
  • Health Check Path: /health
  • Health Check Timeout: 100 seconds
  • Restart Policy: ON_FAILURE (max 10 retries)

Build Process

  1. Railway detects Python project
  2. Installs dependencies from requirements.txt
  3. Runs start.sh which executes uvicorn http_server:app
  4. Health check waits for /health to return 200

Client Configuration Files

Available Configs

  • mcp_server/configs/claude-code-dev.json - Dev environment only
  • mcp_server/configs/claude-code-prod.json - Prod environment only
  • mcp_server/configs/claude-code-both.json - Both (prod disabled by default)
  • mcp_server/configs/cursor-dev.json - Cursor IDE dev config

Installation Instructions

# For Claude Code users (development)
curl https://raw.githubusercontent.com/rawrjustin/archety/dev/mcp_server/configs/claude-code-dev.json \
  > ~/.config/claude/mcp_servers.json

# Edit and add your personal API key
code ~/.config/claude/mcp_servers.json

# Restart Claude Code

Critical Bug Fixes Applied

1. FastMCP API Correction

Problem: Code used non-existent mcp.get_starlette_app() method Solution: Changed to mcp.streamable_http_app property Impact: Server was crashing immediately on startup

2. Health Endpoint Routing

Problem: Health route added after CORS middleware wrapping Solution: Moved to proper Route definition before CORS Impact: Health checks were failing, preventing deployment

3. Startup Script

Problem: Complex uvicorn command wasn't working in Railway Solution: Created start.sh wrapper script Impact: Simplified deployment and added debugging output


Available MCP Tools (15 total)

  1. send_message - Send test messages through orchestrator
  2. get_memories - Retrieve user/persona memories
  3. get_relationship_state - Check trust/rapport scores
  4. trigger_workflow - Execute superpower workflows
  5. list_workflows - Show available workflows
  6. get_workflow_state - Check workflow execution status
  7. get_user_profile - Fetch user profile data
  8. get_conversation_history - View message history
  9. test_two_stage_pipeline - Test classification + generation
  10. get_user_traits - Get personalization traits
  11. check_session_state - Verify session and onboarding
  12. add_memory - Manually add memories
  13. delete_memory - Remove specific memories
  14. update_relationship_state - Adjust trust/rapport scores
  15. health_check - Backend health verification

Next Steps

Immediate (Development is Live)

  • Development MCP server deployed and working
  • Environment variables configured for both environments
  • Client configs updated with actual URLs
  • API keys generated and documented

When Backend Prod is Fixed

  1. Merge devmaster (or manually trigger production deploy)
  2. Railway will auto-deploy to production environment
  3. Test production health endpoint
  4. Enable production MCP in Claude Code for admin users
  5. Monitor production logs

Team Distribution

  1. Share this document with team
  2. Provide individual API keys securely (not in repo)
  3. Send client config files
  4. Share setup instructions from mcp_server/TEAM_SETUP.md

Troubleshooting

Dev Server Not Responding

  • Check Railway deployment status
  • Verify environment variables are set
  • Check health endpoint: curl https://archety-mcp-server-development.up.railway.app/health

Authentication Failing

  • Verify API key is correct (no extra spaces)
  • Check Authorization header format: Bearer <key>
  • Ensure key is for correct environment (dev vs prod)

Production Won't Deploy

  • Known Issue: Backend prod is currently broken
  • Wait for backend fix before deploying production MCP
  • All configuration is ready, just needs backend to be operational

Files Modified

Core Server

  • mcp_server/http_server.py - Fixed FastMCP API and health endpoint
  • mcp_server/railway.json - Railway deployment configuration
  • mcp_server/start.sh - Startup wrapper script (NEW)

Configuration

  • mcp_server/configs/claude-code-dev.json - Updated with real dev URL
  • mcp_server/configs/claude-code-prod.json - Updated with expected prod URL
  • mcp_server/configs/claude-code-both.json - Both environments configured

Documentation

  • RAILWAY_MCP_SETUP.md - Original setup guide
  • MCP_DEPLOYMENT_SUMMARY.md - This file (NEW)
  • .railway-mcp-keys.txt - Secure API keys storage (not committed)

Security Notes

  • ✅ Production uses single admin key (not distributed)
  • ✅ API keys stored in .railway-mcp-keys.txt (gitignored)
  • ✅ Client configs have placeholder keys (real keys distributed separately)
  • ✅ Production MCP disabled by default in client configs
  • ✅ Environment variables properly scoped (dev vs prod)

Last Updated: 2025-11-21 Deployment Status: Dev ✅ | Prod ⏳ Next Action: Wait for backend prod fix, then deploy production