Back to Home

MCP_NODE

by TechMaster1000

Overview

A Node.js gateway that connects AI models (AWS Bedrock) with external tools (Model Context Protocol servers) via a streaming SSE endpoint for real-time, agentic AI applications.

Installation

Run Command
docker run -d -p 3000:3000 -e AWS_REGION=us-east-1 -e AWS_ACCESS_KEY_ID=your_key -e AWS_SECRET_ACCESS_KEY=your_secret -e BEDROCK_MODEL_ID=anthropic.claude-3-5-sonnet-20241022-v2:0 -e MCP_SERVERS='[{"name":"test","type":"http","url":"http://localhost:8080"}]' mcp-gateway

Environment Variables

  • PORT
  • NODE_ENV
  • AWS_REGION
  • AWS_ROLE_ARN
  • AWS_SESSION_NAME
  • BEDROCK_MODEL_ID
  • MCP_SERVERS
  • LOG_LEVEL
  • CORS_ORIGIN

Security Notes

The gateway's `stdio-client` can execute arbitrary commands (`npx`, `command`, `args`) configured via the `MCP_SERVERS` environment variable. While `MCP_SERVERS` is intended for administrative configuration, any compromise of the environment or application could lead to arbitrary code execution on the host where the gateway runs. The `filesystem` MCP server, if configured, explicitly requires 'Full Disk Access' on macOS, exposing a broad attack surface. The gateway does not perform input validation on tool arguments against the tool's schema, relying entirely on individual MCP servers for this, which could be a vulnerability if an MCP server is misconfigured or a malicious prompt bypasses Bedrock's guardrails. No hardcoded secrets were found in the code, and AWS credentials are handled via IAM roles or Secrets Manager, which are good practices for secure credential management.

Similar Servers

Stats

Interest Score0
Security Score5
Cost ClassMedium
Avg Tokens2000
Stars0
Forks0
Last Update2025-11-25

Tags

AI GatewayAWS BedrockTool CallingSSENode.jsMCP