Created
July 5, 2025 23:56
-
-
Save JosXa/f24c859f86da885c57c55c473e02b6b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "@johnlindquist/kit"; | |
metadata = { | |
name: "MCP Proxy Background Service", | |
background: true, | |
longRunning: true, | |
}; | |
const MCP_PROXY_EXECUTABLE = "C:/Users/josch/go/bin/mcp-proxy.exe"; | |
const CONFIG_PATH = home("mcp-proxy.json"); | |
// https://github.com/TBXark/mcp-proxy | |
const config = { | |
mcpProxy: { | |
baseURL: "http://localhost:9090", | |
addr: ":9090", | |
name: "MCP Proxy", | |
version: "1.0.0", | |
type: "sse", | |
options: { | |
panicIfInvalid: false, | |
logEnabled: true, | |
}, | |
}, | |
mcpServers: { | |
"youtube-transcript": { | |
"command": "npx", | |
"args": ["-y", "@kimtaeyoon83/mcp-server-youtube-transcript"] | |
}, | |
"fetch": { | |
"command": "uvx", | |
"args": ["mcp-server-fetch"] | |
}, | |
"hass-mcp": { | |
command: "docker", | |
args: [ | |
"run", | |
"-i", | |
"--rm", | |
"-e", | |
"HA_URL", | |
"-e", | |
"HA_TOKEN", | |
"voska/hass-mcp", | |
], | |
env: { | |
HA_URL: "http://homeassistant.local:8123", | |
HA_TOKEN: | |
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIxZWQ0NWZjZTFlMjg0MGQ1OTI4ZjU1OGQ5NzQ5M2QwYSIsImlhdCI6MTc1MDgwNDYxMiwiZXhwIjoyMDY2MTY0NjEyfQ.LWJlVFiVW6MhS6RjwlseblfvCDLW_fg3iiVY1BK7Mt4", | |
}, | |
}, | |
playwright: { | |
command: "npx", | |
args: ["@playwright/mcp@latest"], | |
}, | |
ticktick: { | |
command: "uv", | |
args: [ | |
"run", | |
"--directory", | |
"D:\\git\\ticktick-mcp", | |
"-m", | |
"ticktick_mcp.cli", | |
"run", | |
], | |
}, | |
"brave-search": { | |
"command": "docker", | |
"args": [ | |
"run", | |
"-i", | |
"--rm", | |
"-e", | |
"BRAVE_API_KEY", | |
"brave-search-mcp" | |
], | |
"env": { | |
"BRAVE_API_KEY": "BSA1msmGD5kzBvEc76x-aaYVDp3haZn" | |
} | |
}, | |
deepwiki: { | |
url: "https://mcp.deepwiki.com/mcp", | |
}, | |
"basic-memory": { | |
command: "uvx", | |
args: ["basic-memory", "mcp"], | |
}, | |
"everything-search": { | |
command: "uvx", | |
args: ["mcp-server-everything-search"], | |
env: { | |
EVERYTHING_SDK_PATH: | |
"C:\\Program Files\\Everything-SDK\\dll\\Everything64.dll", | |
}, | |
working_directory: null, | |
start_on_launch: true, | |
}, | |
}, | |
}; | |
await writeFile(CONFIG_PATH, JSON.stringify(config, null, 2)); | |
console.log("Spawning MCP Proxy..."); | |
const p = spawn( | |
MCP_PROXY_EXECUTABLE, | |
["--config", CONFIG_PATH], | |
{ shell: false, stdio: "pipe", detached: false }, | |
); | |
p.stdout!.on("data", (data) => { | |
console.log(data.toString().trim()); | |
}); | |
p.stderr!.on("data", (data) => { | |
console.log(data.toString().trim()); | |
}); | |
p.on("close", (code) => { | |
console.log(`MCP Proxy closed with code ${code}`); | |
}); | |
p.on("error", (error) => { | |
console.error(`MCP Proxy error: ${error}`); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment