panini-connector-mcp 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Autoscreen (Panini)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,185 @@
1
+ # panini-connector-mcp
2
+
3
+ **MCP server that lets AI coding agents (Claude Desktop, Cursor, Windsurf, Claude Code, etc.) install and verify the [panini-connector](https://www.npmjs.com/package/panini-connector) SDK on a customer's self-hosted site — end-to-end, without human copy-pasting.**
4
+
5
+ Companion to the wizard at panini.autoscreen.ai — same code generation, same verify flow, exposed as MCP tools an agent can call.
6
+
7
+ ## What it does
8
+
9
+ Exposes 4 tools over the Model Context Protocol:
10
+
11
+ | Tool | What it does |
12
+ |---|---|
13
+ | `install_panini_connector` | Given `(language, framework, storage)`, returns the install command + files to write + env vars to set. Handles Next.js App/Pages, Express, FastAPI, Django, Flask. Storage: Supabase, Postgres, custom DB (MySQL/Mongo/etc.), or in-memory. |
14
+ | `verify_panini_connector` | Fires all 4 signed HTTP ops (`ping` / `create_post` / `update_post` / `delete_post`) at the deployed URL. Returns per-op status + diagnostics. Cleans up its own smoke-test post. |
15
+ | `generate_shared_secret` | Returns a cryptographically-random 32-byte hex secret for `SEO_CONNECTOR_SECRET`. |
16
+ | `get_envelope_schema` | Returns the raw HTTP envelope contract Panini uses. For agents implementing custom handlers in languages the SDK doesn't cover (Laravel, Rails, Go, .NET, etc.). |
17
+
18
+ ## Install (one line per client)
19
+
20
+ ### Claude Desktop
21
+
22
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%/Claude/claude_desktop_config.json` (Windows):
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "panini-connector": {
28
+ "command": "npx",
29
+ "args": ["-y", "panini-connector-mcp"]
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ **Windows note**: GUI apps don't inherit shell PATH. Use `cmd` as the command instead:
36
+ ```json
37
+ {
38
+ "mcpServers": {
39
+ "panini-connector": {
40
+ "command": "cmd",
41
+ "args": ["/c", "npx", "-y", "panini-connector-mcp"]
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ Restart Claude Desktop. You should see 4 new tools available.
48
+
49
+ ### Cursor
50
+
51
+ Settings → Cursor Settings → MCP → Add new MCP server:
52
+
53
+ ```json
54
+ {
55
+ "mcpServers": {
56
+ "panini-connector": {
57
+ "command": "npx",
58
+ "args": ["-y", "panini-connector-mcp"]
59
+ }
60
+ }
61
+ }
62
+ ```
63
+
64
+ ### Windsurf
65
+
66
+ Edit `~/.codeium/windsurf/mcp_config.json`:
67
+
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "panini-connector": {
72
+ "command": "npx",
73
+ "args": ["-y", "panini-connector-mcp"]
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ### Claude Code (CLI)
80
+
81
+ ```bash
82
+ claude mcp add panini-connector -- npx -y panini-connector-mcp
83
+ ```
84
+
85
+ ## Example agent workflow
86
+
87
+ Once registered, prompt your AI:
88
+
89
+ > "Install the panini-connector on this Next.js site. It uses Supabase — the table is `blog_posts` and posts render at `/blog/[slug]`."
90
+
91
+ The agent will:
92
+
93
+ 1. Call `install_panini_connector` with `language=node`, `framework=next_app`, `storage=supabase`, `existing_table=blog_posts`, `url_template=https://.../blog/{slug}`
94
+ 2. Read the returned `install_command` and run `npm install panini-connector` in your project
95
+ 3. Write `app/api/seo-connector/route.ts` with the returned file content
96
+ 4. Call `generate_shared_secret` and prompt you to add `SEO_CONNECTOR_SECRET=<value>` to your hosting env vars
97
+ 5. Prompt you to redeploy
98
+ 6. Once deployed, call `verify_panini_connector` with your URL + the secret
99
+ 7. Report the result: 4 green ✓s means the round-trip works and you're ready to paste URL+secret into the Panini dashboard
100
+
101
+ ## Tool reference
102
+
103
+ ### `install_panini_connector`
104
+
105
+ ```typescript
106
+ Input:
107
+ language: 'node' | 'python'
108
+ framework: 'next_app' | 'next_pages' | 'express' | 'fastapi' | 'django' | 'flask'
109
+ storage: 'supabase' | 'postgres' | 'custom_db' | 'memory'
110
+ existing_table?: string // default 'blog_posts'
111
+ url_template?: string // default 'https://yoursite.com/blog/{slug}'
112
+
113
+ Output:
114
+ install_command: string // shell command to run in project root
115
+ files: [{ path, content, language }] // files the agent writes
116
+ env_vars: string // env vars to set on hosting
117
+ post_install_note?: string // gotchas (bodyParser: false, etc.)
118
+ verify_command: string // manual CLI verification command
119
+ ```
120
+
121
+ Framework/language pairing:
122
+ - `node` → `next_app` | `next_pages` | `express`
123
+ - `python` → `fastapi` | `django` | `flask`
124
+
125
+ ### `verify_panini_connector`
126
+
127
+ ```typescript
128
+ Input:
129
+ url: string // https://mysite.com/api/seo-connector
130
+ secret: string // exact SEO_CONNECTOR_SECRET value
131
+ timeout_ms?: number // default 10000
132
+
133
+ Output:
134
+ ok: boolean
135
+ url: string
136
+ ops: [{
137
+ op: 'ping' | 'create_post' | 'update_post' | 'delete_post'
138
+ status: 'pass' | 'fail'
139
+ http_status?: number
140
+ response_body?: unknown
141
+ error?: string
142
+ }]
143
+ summary: string
144
+ ```
145
+
146
+ ### `generate_shared_secret`
147
+
148
+ ```typescript
149
+ Input: {}
150
+ Output: { secret: string, length_bytes: 32 }
151
+ ```
152
+
153
+ ### `get_envelope_schema`
154
+
155
+ ```typescript
156
+ Input: {}
157
+ Output: {
158
+ http_method: 'POST'
159
+ request_headers: { ... }
160
+ request_body_shape: { ... }
161
+ response_success: { ... }
162
+ response_ping: { ... }
163
+ response_errors: { ... }
164
+ replay_window_seconds: 300
165
+ hmac_pseudocode: string
166
+ laravel_example: string
167
+ }
168
+ ```
169
+
170
+ Use this when the customer's stack isn't Node or Python — the returned contract is enough for an agent to hand-implement the connector in any language.
171
+
172
+ ## Running locally / debugging
173
+
174
+ ```bash
175
+ # Test the server directly (JSON-RPC over stdio)
176
+ npx panini-connector-mcp
177
+ # then type an MCP initialize request; server responds on stdout, logs on stderr
178
+
179
+ # Or with the MCP inspector
180
+ npx @modelcontextprotocol/inspector npx panini-connector-mcp
181
+ ```
182
+
183
+ ## License
184
+
185
+ MIT.