Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/mcp-server/src/code-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ const localDenoHandler = async ({

const client = reqContext.client;
const baseURLHostname = new URL(client.baseURL).hostname;
const allowNetHosts = [baseURLHostname, 'upload.imagekit.io'];
const { code } = args as { code: string };

let denoPath: string;
Expand Down Expand Up @@ -212,7 +213,7 @@ const localDenoHandler = async ({
runFlags: [
`--node-modules-dir=manual`,
`--allow-read=${allowRead}`,
`--allow-net=${baseURLHostname}`,
`--allow-net=${allowNetHosts.join(',')}`,
// Allow environment variables because instantiating the client will try to read from them,
// even though they are not set. The subprocess env is curated above, so no host secrets
// are exposed even though read access is granted.
Expand Down
Loading