aboutsummaryrefslogtreecommitdiff
path: root/mcp/server.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/server.mjs')
-rwxr-xr-xmcp/server.mjs6
1 files changed, 3 insertions, 3 deletions
diff --git a/mcp/server.mjs b/mcp/server.mjs
index 3554767..9c3bea4 100755
--- a/mcp/server.mjs
+++ b/mcp/server.mjs
@@ -255,8 +255,8 @@ async function instructionsWith(otherTools) {
}
const OTHER_BROWSER_TOOLS = process.env.PI_CHROME_OTHER_BROWSER_TOOLS?.trim();
const instructions = await instructionsWith(OTHER_BROWSER_TOOLS);
-// pi-mcp-adapter introduces itself as pi-mcp-<server name>; in pi, the other browser's tools are
-// pi's own, not another MCP server's.
+// pi's built-in MCP support introduces itself as pi, and pi-mcp-adapter as pi-mcp-<server name>;
+// in pi, the other browser's tools are pi's own, not another MCP server's.
const piInstructions = OTHER_BROWSER_TOOLS ? await instructionsWith("browser_*") : instructions;
// --- MCP --------------------------------------------------------------------------------------
@@ -533,7 +533,7 @@ async function serveHttp() {
enableDnsRebindingProtection: true,
allowedHosts: [`${HTTP.host}:${HTTP.port}`],
});
- conn.server = makeServer(conn, clientName.startsWith("pi-mcp") ? piInstructions : instructions);
+ conn.server = makeServer(conn, (clientName === "pi" || clientName.startsWith("pi-mcp")) ? piInstructions : instructions);
await conn.server.connect(conn.transport);
if (id) {
conn.transport._webStandardTransport._initialized = true;