Get the FREE Ultimate OpenClaw Setup Guide →

dynamic

MCP server from PortlandKyGuy/dynamic-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio portlandkyguy-dynamic-mcp-server npx -y dynamic-mcp-server \
  --env DYNAMIC_MCP_LOG_LEVEL="info|debug|error|warn|trace" \
  --env DYNAMIC_MCP_LOG_FORMAT="json|pretty" \
  --env DYNAMIC_MCP_LOG_ENABLED="true|false" \
  --env DYNAMIC_MCP_LOG_CATEGORIES="requests|responses|steps|all" \
  --env DYNAMIC_MCP_LOG_DESTINATION="stderr|<file-path>" \
  --env DYNAMIC_MCP_LOG_PAYLOADS_ENABLED="true|false" \
  --env DYNAMIC_MCP_LOG_PAYLOAD_MAX_CHARS="number"

How to use

Dynamic MCP Server is a single executable that can power multiple MCP servers by loading a JSON configuration at startup. Each configuration defines a set of tools, prompts, and how to interact with model CLIs such as Claude, Codex, and Gemini. You can create many distinct MCP servers by placing different JSON config files in the server and launching with that config, enabling tailored toolchains, prompts, and workflows for different use cases like code review, documentation assistance, or custom CLI front-ends. To use, install or run the dynamic-mcp-server, then point it at a configuration file that specifies the desired model (claude/codex/gemini), a modelId if needed, and an array of tools with their prompts and inputs. When a tool is invoked, the server builds a final prompt by substituting arguments into the template and passes that to the chosen model’s CLI. Be mindful of the dangerous run flags mentioned in the documentation, and adjust them in src/main.js if you require stricter security in production.

How to install

Prerequisites:

  • Node.js (recommended LTS) and npm installed on your system
  • Git (optional, for cloning a repo)

Install steps:

  1. Clone the repository (or download the package): git clone <repository-url> cd <repo-directory>

  2. Install globally so the command is available on your PATH: npm install -g .

  3. Prepare a JSON configuration file (see the README for structure). Example path: /path/to/config.json

  4. Run the dynamic MCP server with your config: dynamic-mcp-server --config /path/to/config.json

  5. Optionally set up your MCP client configurations (Claude, Codex, Gemini) to point to this server’s endpoints or CLI interface.

Additional notes

Tips and notes:

  • The server loads a JSON configuration at startup to define tools, prompts, and model settings, so you can maintain multiple toolchains by keeping separate config files.
  • The README warns about dangerous run modes. Review src/main.js to understand and modify any flags like --dangerously-skip-permissions or --dangerously-bypass-approvals-and-sandbox before running in production.
  • Logging is highly configurable. You can enable JSON-formatted logs with serverName identifiers by setting the appropriate logging options in the config or via environment variables listed in the README.
  • CLI versions for models (Claude, Codex, Gemini) are specified in the docs; ensure the versions you rely on are installed and accessible from your environment.
  • If you plan to deploy multiple MCP servers from the same binary, consider the per-instance logging format (format: json) to easily distinguish logs across servers.
  • The server is designed to host many tools by referencing separate tool definitions within the configuration file; there is no per-tool shell execution unless you extend the code. The prompt generation logic uses the tool’s prompt (or promptFile) and replaces placeholders with incoming inputs.

Related MCP Servers

Sponsor this space

Reach thousands of developers