docs / getting-started / local-development
npm installCopy the example environment file and fill in your values:
cp .env.example .envThe server encrypts OAuth tokens at rest with AES-256-GCM. Generate a 32-byte key:
npm run generate-keyPaste the output into TOKEN_ENCRYPTION_KEY in your .env.
At minimum, set these in .env:
SERVICENOW_INSTANCE_URL=https://yourorg.service-now.com
SERVICENOW_CLIENT_ID=<from SN OAuth app>
SERVICENOW_CLIENT_SECRET=<from SN OAuth app>
TOKEN_ENCRYPTION_KEY=<base64 32-byte key>
ALLOWED_ORIGINS=https://claude.aiSee Environment Variables for the full configuration reference.
npm run devThis runs the server with tsx in watch mode on port 8080 (or MCP_PORT).
curl -s http://localhost:8080/health | jqExpected response:
{
"status": "healthy",
"uptime": 1.234,
"redis": "connected",
"timestamp": "2026-03-11T..."
}If Redis shows "disconnected", check that Redis is running and REDIS_URL is correct. See Troubleshooting.
npm run build # TypeScript compilation
npm test # Run all testsSee also: Prerequisites · ServiceNow OAuth Setup · First Tool Call