Back to Home
Azure-Samples icon

mcp-container-ts

Verified Safe

by Azure-Samples

Overview

Provides a secure, extensible Model Context Protocol (MCP) server using Node.js and TypeScript, designed to expose custom tools to LLMs, deployable on Azure Container Apps with robust JWT and RBAC security.

Installation

Run Command
npm run dev

Environment Variables

  • JWT_SECRET
  • JWT_AUDIENCE
  • JWT_ISSUER
  • PORT
  • ALLOWED_ORIGINS
  • APPLICATIONINSIGHTS_CONNECTION_STRING
  • NODE_ENV
  • DEBUG
  • API_KEYS

Security Notes

The server implements JWT-based authentication and role-based access control (RBAC) with granular permissions for tools. It uses `helmet` for security headers, `cors` for origin control, `express.json` with payload limits, and `express-rate-limit` for DDoS protection. SQL operations use prepared statements to prevent injection. Logs redact sensitive data in non-development environments. The `generate-token` script explicitly warns about token management, which is crucial for production deployments. The JSON-RPC validation middleware is commented out by default, which could be a minor security oversight if not enabled in production.

Similar Servers

Stats

Interest Score41
Security Score8
Cost ClassLow
Avg Tokens50
Stars43
Forks35
Last Update2026-01-07

Tags

Model Context ProtocolMCP ServerAI ToolsTypeScriptNode.jsAzure Container AppsJWTRBACOpenTelemetry