From 43fd1f9db0941b2b83cb62268e35970d4a67c202 Mon Sep 17 00:00:00 2001 From: ant-kurt Date: Tue, 10 Nov 2026 14:01:16 -0800 Subject: plugin-dev: use local servers in MCP examples (#7074) Co-authored-by: Claude --- .../skills/mcp-integration/references/server-types.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'plugins/plugin-dev/skills') diff --git a/plugins/plugin-dev/skills/mcp-integration/references/server-types.md b/plugins/plugin-dev/skills/mcp-integration/references/server-types.md index d2e48be8..b97a017a 100644 --- a/plugins/plugin-dev/skills/mcp-integration/references/server-types.md +++ b/plugins/plugin-dev/skills/mcp-integration/references/server-types.md @@ -14,8 +14,8 @@ Execute local MCP servers as child processes with communication via stdin/stdout ```json { "my-server": { - "command": "npx", - "args": ["-y", "my-mcp-server"] + "command": "node", + "args": ["${CLAUDE_PLUGIN_ROOT}/servers/my-server.js"] } } ``` @@ -463,8 +463,8 @@ Combine different types: ```json { "local-db": { - "command": "npx", - "args": ["-y", "mcp-server-sqlite", "./data.db"] + "command": "node", + "args": ["${CLAUDE_PLUGIN_ROOT}/servers/local-db.js", "--db-path", "${CLAUDE_PLUGIN_DATA}/data.db"] }, "cloud-api": { "type": "sse", @@ -480,6 +480,8 @@ Combine different types: } ``` +`${CLAUDE_PLUGIN_DATA}` is one folder per plugin, shared by all projects. It survives plugin updates; `${CLAUDE_PLUGIN_ROOT}` does not, so don't store data there. + ### Conditional Configuration Use environment variables to switch servers: @@ -498,7 +500,7 @@ Use environment variables to switch servers: Set different values for dev/prod: - Dev: `API_URL=http://localhost:8080/mcp` -- Prod: `API_URL=https://api.production.com/mcp` +- Prod: `API_URL=https://api.example.com/mcp` ## Security Considerations -- cgit