Skip to content

🐛 Default MCP listen addresses to localhost instead of 0.0.0.0#8686

Open
moktamd wants to merge 1 commit intopenpot:developfrom
moktamd:fix/mcp-listen-address-defaults
Open

🐛 Default MCP listen addresses to localhost instead of 0.0.0.0#8686
moktamd wants to merge 1 commit intopenpot:developfrom
moktamd:fix/mcp-listen-address-defaults

Conversation

@moktamd
Copy link

@moktamd moktamd commented Mar 19, 2026

Fixes #8683

The MCP server and plugin preview server were binding to 0.0.0.0 by default, exposing all network interfaces even in local-only mode. This contradicts the documented defaults and the security model described in the README.

Changes:

  • PenpotMcpServer.ts: Read PENPOT_MCP_SERVER_LISTEN_ADDRESS (matching the documented env var name) instead of the undocumented PENPOT_MCP_SERVER_HOST, and default to localhost
  • vite.config.ts: Use the PENPOT_MCP_PLUGIN_SERVER_LISTEN_ADDRESS env var with localhost fallback instead of hardcoded 0.0.0.0

The MCP server read PENPOT_MCP_SERVER_HOST (undocumented) and defaulted
to 0.0.0.0, exposing the server on all interfaces. The documented env
var is PENPOT_MCP_SERVER_LISTEN_ADDRESS and the expected default is
localhost. The plugin preview server also hardcoded 0.0.0.0.

Signed-off-by: moktamd <moktamd@users.noreply.github.com>
@moktamd moktamd force-pushed the fix/mcp-listen-address-defaults branch from 5dece8d to cab79f1 Compare March 19, 2026 11:57
@moktamd moktamd changed the title fix(mcp): default listen addresses to localhost instead of 0.0.0.0 🐛 Default MCP listen addresses to localhost instead of 0.0.0.0 Mar 19, 2026
@niwinz niwinz self-assigned this Mar 20, 2026
@niwinz
Copy link
Contributor

niwinz commented Mar 20, 2026

This change affects on how mcp server is running on the devenv so we need to look closer to properly make this change. I will look it Monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modified MCP listen address defaults are potentially problematic and undocumented

2 participants