Back to Home
jpdutoit icon

mcp-gen

Verified Safe

by jpdutoit

Overview

Generates Model Context Protocol (MCP) servers from TypeScript functions annotated with JSDoc comments.

Installation

Run Command
mcp-gen <entry-file> -o <output-dir> [-n <server-name>]

Environment Variables

  • MCP_PORT

Security Notes

The mcp-gen tool itself appears reasonably secure for its intended purpose. It uses `child_process.spawn` to run the generated server, inheriting `stdio` and `process.env`, which could potentially expose sensitive environment variables if the generated server or its dependencies were compromised. It also uses `execSync` for running `npx tsc` during type declaration generation; while `tsc` is a trusted tool, synchronous external command execution generally carries inherent risks. The primary security risk lies with the user-provided TypeScript code that the tool processes, as this code will be executed as part of the generated MCP server. The tool does not appear to contain malicious patterns, obfuscation, or hardcoded secrets.

Similar Servers

Stats

Interest Score0
Security Score8
Cost ClassMedium
Avg Tokens25000
Stars0
Forks0
Last Update2026-01-18

Tags

MCPCode GenerationTypeScriptCLIServer Development