mcp-hub/ecosystem.config.js

51 lines
1.3 KiB
JavaScript

require('dotenv').config({ path: __dirname + '/.env' });
const HUB_SECRET = process.env.HUB_SECRET;
if (!HUB_SECRET) throw new Error('HUB_SECRET not set in .env');
module.exports = {
apps: [
{
name: 'mcp-hub',
script: 'src/index.js',
cwd: '/workspace',
env: {
NODE_ENV: 'development',
PORT: 3000,
HUB_AUTH: JSON.stringify({ 'sample-mcp': HUB_SECRET, 'memory-mcp': HUB_SECRET })
},
max_restarts: 10,
restart_delay: 1000,
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'sample-mcp',
script: 'sample-mcp/index.js',
cwd: '/workspace',
env: {
NODE_ENV: 'development',
MCP_SECRET: HUB_SECRET
},
max_restarts: 10,
restart_delay: 2000,
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
},
{
name: 'mcp-bridge-memory',
script: 'mcp-bridge/index.js',
cwd: '/workspace',
env: {
BRIDGE_SERVICE_ID: 'memory-mcp',
BRIDGE_SECRET: HUB_SECRET,
BRIDGE_HUB_URL: 'ws://localhost:3000/ws/register',
BRIDGE_UPSTREAM_URL: 'https://memory-mcp.dbchat.ai/mcp/sse'
},
max_restarts: 10,
restart_delay: 2000,
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
merge_logs: true
}
]
};