@agentic-survey/mcp-server 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +4 -0
  2. package/dist/cli.js +25 -5
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -47,6 +47,10 @@ The agent chains the tools for you: `create_survey` → `add_question` → `publ
47
47
 
48
48
  > Tip: `npm i -g @agentic-survey/mcp-server` gives you the shorter `agentic-survey init` command.
49
49
 
50
+ ### Do I need to enable RLS / anything in the Supabase dashboard?
51
+
52
+ No. The `init --print-sql` migration enables Row Level Security and the access policies for you, on all four tables. **Don't disable RLS:** it's what fences the publishable key (which travels in the share link) so it can *only* read **published** surveys and **insert** responses. It cannot read anyone's responses or your drafts. Your secret key, stored locally on your machine, bypasses RLS for authoring and analysis.
53
+
50
54
  ## How it works
51
55
 
52
56
  ```
package/dist/cli.js CHANGED
@@ -72,13 +72,30 @@ async function runInit(flags) {
72
72
  existing.secretKey ||
73
73
  '';
74
74
  const publishableKey = flags['publishable-key'] ||
75
- (await ask(`Supabase publishable key (sb_publishable_…, optional${existing.publishableKey ? ', set' : ''}): `)) ||
75
+ (await ask(`Supabase publishable key (sb_publishable_…, needed for share links${existing.publishableKey ? ', already set' : ''}): `)) ||
76
76
  existing.publishableKey ||
77
77
  '';
78
- const pageEndpoint = flags['page-endpoint'] ||
79
- (await ask(`Page-service endpoint [${existing.pageEndpoint ?? DEFAULT_PAGE_ENDPOINT}]: `)) ||
80
- existing.pageEndpoint ||
81
- DEFAULT_PAGE_ENDPOINT;
78
+ // Page-service: the domain published survey links point at. Default to the
79
+ // hosted instance; let people opt into their own self-hosted/custom domain.
80
+ let pageEndpoint = flags['page-endpoint'] || '';
81
+ if (!pageEndpoint) {
82
+ const current = existing.pageEndpoint ?? DEFAULT_PAGE_ENDPOINT;
83
+ console.log('\nWhich domain do you want your surveys to appear on?');
84
+ console.log(` 1. ${DEFAULT_PAGE_ENDPOINT}/s/your-survey (default, quick start)`);
85
+ console.log(' 2. A custom domain (your own self-hosted page-service)');
86
+ const choice = (await ask(`Choose 1 or 2 [keep ${current}]: `)).trim();
87
+ if (choice === '1') {
88
+ pageEndpoint = DEFAULT_PAGE_ENDPOINT;
89
+ }
90
+ else if (choice === '2') {
91
+ pageEndpoint =
92
+ (await ask('Your page-service base URL (e.g. https://surveys.example.com): ')).trim() ||
93
+ current;
94
+ }
95
+ else {
96
+ pageEndpoint = current; // Enter keeps the shown default
97
+ }
98
+ }
82
99
  if (!supabaseUrl || !secretKey) {
83
100
  console.error('\nA project URL and secret key are required. Aborting.');
84
101
  process.exitCode = 1;
@@ -107,6 +124,9 @@ async function runInit(flags) {
107
124
  else {
108
125
  console.log(`\n✓ Connected. Schema present (${probe.data.length} survey(s)).`);
109
126
  }
127
+ if (!publishableKey) {
128
+ console.log("\n⚠ No publishable key set. Share links and response collection won't work until you add one (re-run init).");
129
+ }
110
130
  printAgentSnippet();
111
131
  }
112
132
  async function main() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentic-survey/mcp-server",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server (stdio) exposing survey tools over core, plus the agentic-survey CLI.",
5
5
  "license": "MIT",
6
6
  "author": "Monty Daley <monty@daley.org.nz>",