Problem
After running ./install.sh successfully (MCP server builds, status shows green), the MCP tools are not available when Claude Code opens a different project (e.g., a WordPress theme repo). The preflight shows Connection Failed.
Root cause
.mcp.json in the AI-DDTK repo root uses a relative path:
{
"mcpServers": {
"ai-ddtk": {
"command": "bash",
"args": ["tools/mcp-server/start.sh"]
}
}
}
Claude Code auto-detects .mcp.json from the currently open project directory. When the user opens a WordPress theme or plugin repo (not AI-DDTK itself), Claude Code doesn't see this config and has no way to start the MCP server.
Where the instructions fail
The install flow (issue #725 and install.sh) tells users to:
- Clone and install AI-DDTK at
~/bin/ai-ddtk
- Open their project repo in VS Code with Claude Code
- Run a preflight that probes MCP tools like
wpcc_list_features and local_wp_list_sites
Step 3 fails because there's no step between 1 and 2 that wires MCP into the project repo. The setup-mcp output shows client configuration snippets, but doesn't make it clear that the user needs to create a .mcp.json in each project they want to use AI-DDTK from.
What works today (but isn't documented in the install flow)
experimental/wire-project exists and does exactly this:
~/bin/ai-ddtk/experimental/wire-project /path/to/my-project
It creates .mcp.local.json in the target project with absolute paths to the MCP server. But this script is:
- In
experimental/ — not mentioned in install.sh output or next-steps
- Not referenced in the preflight instructions
- Not mentioned in the README quick-start
Suggested fix
After setup-mcp completes, install.sh should either:
Option A — Add a clear next-step to the output:
To use AI-DDTK MCP tools from other projects, run:
~/bin/ai-ddtk/experimental/wire-project /path/to/your-project
Option B — Add a new install.sh subcommand:
./install.sh wire /path/to/your-project
This would be a thin wrapper around wire-project with the same validation.
Option C — Document it prominently in the preflight/onboarding flow so that when MCP fails, the user knows exactly what to do.
Expected MCP config for a wired project
{
"mcpServers": {
"ai-ddtk": {
"command": "bash",
"args": ["/Users/<you>/bin/ai-ddtk/tools/mcp-server/start.sh"],
"cwd": "/Users/<you>/bin/ai-ddtk"
}
}
}
Reproduction
- Fresh clone:
git clone -b development ... ~/bin/ai-ddtk
cd ~/bin/ai-ddtk && ./install.sh — MCP builds successfully
- Open a different project in VS Code with Claude Code
- Ask Claude to call
wpcc_list_features — fails, MCP not connected
🤖 Generated with Claude Code
Problem
After running
./install.shsuccessfully (MCP server builds, status shows green), the MCP tools are not available when Claude Code opens a different project (e.g., a WordPress theme repo). The preflight showsConnection Failed.Root cause
.mcp.jsonin the AI-DDTK repo root uses a relative path:{ "mcpServers": { "ai-ddtk": { "command": "bash", "args": ["tools/mcp-server/start.sh"] } } }Claude Code auto-detects
.mcp.jsonfrom the currently open project directory. When the user opens a WordPress theme or plugin repo (not AI-DDTK itself), Claude Code doesn't see this config and has no way to start the MCP server.Where the instructions fail
The install flow (issue #725 and
install.sh) tells users to:~/bin/ai-ddtkwpcc_list_featuresandlocal_wp_list_sitesStep 3 fails because there's no step between 1 and 2 that wires MCP into the project repo. The
setup-mcpoutput shows client configuration snippets, but doesn't make it clear that the user needs to create a.mcp.jsonin each project they want to use AI-DDTK from.What works today (but isn't documented in the install flow)
experimental/wire-projectexists and does exactly this:~/bin/ai-ddtk/experimental/wire-project /path/to/my-projectIt creates
.mcp.local.jsonin the target project with absolute paths to the MCP server. But this script is:experimental/— not mentioned ininstall.shoutput or next-stepsSuggested fix
After
setup-mcpcompletes,install.shshould either:Option A — Add a clear next-step to the output:
Option B — Add a new install.sh subcommand:
This would be a thin wrapper around
wire-projectwith the same validation.Option C — Document it prominently in the preflight/onboarding flow so that when MCP fails, the user knows exactly what to do.
Expected MCP config for a wired project
{ "mcpServers": { "ai-ddtk": { "command": "bash", "args": ["/Users/<you>/bin/ai-ddtk/tools/mcp-server/start.sh"], "cwd": "/Users/<you>/bin/ai-ddtk" } } }Reproduction
git clone -b development ... ~/bin/ai-ddtkcd ~/bin/ai-ddtk && ./install.sh— MCP builds successfullywpcc_list_features— fails, MCP not connected🤖 Generated with Claude Code