Skip to content

Existing server configuration overwritten in mcp.json #107

@amadeann

Description

@amadeann

Laravel Package Version

1.0.11

Laravel Version

11.44.0

PHP Version

8.2.9

System Info

Windows 11 + WSL2 + Laravel Sail + VSCode (with devcontainer)

Description

Existing "servers" configuration such as:

{
	"servers": {
		"mysql": {
			"type": "stdio",
			"command": "npx",
			"args": [
				"@benborla29/[email protected]"
			],
			"env": {
				"MYSQL_HOST": "${input:mysql_host}",
				"MYSQL_PORT": "${input:mysql_port}",
				"MYSQL_USER": "${input:mysql_user}",
				"MYSQL_PASS": "${input:mysql_pass}",
				"MYSQL_DB": "${input:mysql_db}"
			}
		}
	},
	"inputs": [
		{
			"id": "mysql_host",
			"type": "promptString",
			"description": "MySQL Hostname"
		},
		{
			"id": "mysql_port",
			"type": "promptString",
			"description": "MySQL Port"
		},
		{
			"id": "mysql_user",
			"type": "promptString",a
			"description": "MySQL Username"
		},
		{
			"id": "mysql_pass",
			"type": "promptString",
			"description": "MySQL Password"
		},
		{
			"id": "mysql_db",
			"type": "promptString",
			"description": "MySQL Database Name (leave blank for multi-DB mode)"
		}
	]
}

gets overwritten on executing php artisan sail:install.

The culprit of this bug is likely here:

data_set($config, "{$mcpKey}.{$key}", collect([

Steps To Reproduce

  1. Create a new Laravel project in Laravel Sail on Windows 11 with WSL2
  2. Open the project in VS Code with GitHub copilot, in a devcontainer
  3. Add any MCP server, such as "@benborla29/[email protected]", and make sure the mcp.json file has an entry under "servers" key
  4. Run "php artisan boost:install", and select "VS Code" in the first step as your editor
  5. Previous value of "servers" in mcp.json gets replaced

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions