diff --git a/README.md b/README.md index 5daf549..3580291 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,9 @@ pnpm run db:studio ``` https://local.drizzle.studio/ + +#### Try the MCP server + +To try the mcp server you can run `pnpm build:mcp`...the local `mpc.json` file it's already using the output of that folder so you can use it automatically in VSCode/Cursor. + +To try the MCP over HTTP and/or remotely, you can use Cloudflare tunnels to expose it via `cloudflared tunnel --url http://localhost:[port]` and then running the server with `pnpm tunnel` (pay attention as this will expose your dev server to the world wide web). diff --git a/package.json b/package.json index 29e2ce0..d9df0e4 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "scripts": { "start": "node src/index.js", "dev": "vite dev", + "tunnel": "vite dev -m tunnel", "build": "vite build", "build:mcp": "tsc --project tsconfig.build.json", "prepublishOnly": "pnpm build:mcp", diff --git a/vite.config.ts b/vite.config.ts index e93db04..c1aa932 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -8,6 +8,12 @@ export default defineConfig(({ mode }) => { return { plugins: [sveltekit(), devtoolsJson()], + server: + mode === 'tunnel' + ? { + allowedHosts: true, + } + : undefined, test: { expect: { requireAssertions: true }, projects: [