vp0-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 VP0
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,61 @@
1
+ # vp0-mcp
2
+
3
+ A free [Model Context Protocol](https://modelcontextprotocol.io) server for **VP0** — search and import iOS app design starters (Expo React Native) straight into your AI builder, with no copy-pasting and no API key.
4
+
5
+ Once added, you can just say:
6
+
7
+ > "Find a fitness dashboard design on VP0 and build it in my app."
8
+
9
+ …and your AI tool will search VP0, pull the complete source + dependencies + integration steps, and scaffold it into your Expo project.
10
+
11
+ ## Tools
12
+
13
+ | Tool | What it does |
14
+ |------|--------------|
15
+ | `search_vp0_designs(query, limit?)` | Search the free VP0 library; returns matching designs (name, slug, import link). |
16
+ | `get_vp0_design(slug)` | Fetch one design's complete manifest — inline source files, dependencies, the exact `npx expo install` command, and step-by-step `aiInstructions`. |
17
+
18
+ Only approved, public designs are exposed (the same surface as `https://vp0.com/source/:slug`). The design link is the key — there is no secret API key.
19
+
20
+ ## Install
21
+
22
+ **Claude Code**
23
+ ```bash
24
+ claude mcp add vp0 -- npx -y vp0-mcp
25
+ ```
26
+
27
+ **Cursor / Windsurf** — add to your MCP config (`~/.cursor/mcp.json` or the editor's MCP settings):
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "vp0": { "command": "npx", "args": ["-y", "vp0-mcp"] }
32
+ }
33
+ }
34
+ ```
35
+
36
+ Point at a different backend (e.g. local dev) with `VP0_API_URL`:
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "vp0": { "command": "npx", "args": ["-y", "vp0-mcp"], "env": { "VP0_API_URL": "http://localhost:3000" } }
41
+ }
42
+ }
43
+ ```
44
+
45
+ ## Publishing (maintainers)
46
+
47
+ ```bash
48
+ cd mcp
49
+ npm login # one-time
50
+ npm publish # prepublishOnly runs the build; publishConfig makes it public
51
+ ```
52
+
53
+ ## Develop
54
+
55
+ ```bash
56
+ npm install
57
+ npm run build # tsc → dist/
58
+ npm start # runs the stdio server
59
+ ```
60
+
61
+ VP0 is a free, forever-free library for the future of vibe-coded mobile apps.
package/dist/index.js ADDED
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * VP0 MCP server — lets an AI builder (Claude Code, Cursor, Windsurf, …) search
4
+ * VP0's free iOS-app-design library and pull a design's complete, import-ready
5
+ * source without the user ever copy-pasting a link.
6
+ *
7
+ * Two tools:
8
+ * search_vp0_designs(query) → matching designs (name, slug, import link)
9
+ * get_vp0_design(slug) → the full manifest: inline files, deps, the
10
+ * exact install command, and step-by-step
11
+ * integration instructions (manifest.aiInstructions)
12
+ *
13
+ * No API key. The design link is the key, and only approved/public designs are
14
+ * exposed — same surface as https://vp0.com/source/:slug.
15
+ */
16
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
17
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
18
+ import { z } from "zod";
19
+ const API_BASE = (process.env.VP0_API_URL || "https://api.vp0.com").replace(/\/+$/, "");
20
+ async function api(path) {
21
+ const res = await fetch(`${API_BASE}${path}`, {
22
+ headers: { Accept: "application/json", "User-Agent": "vp0-mcp" },
23
+ });
24
+ if (!res.ok) {
25
+ throw new Error(`VP0 API responded ${res.status} for ${path}`);
26
+ }
27
+ return (await res.json());
28
+ }
29
+ function asText(value) {
30
+ return { content: [{ type: "text", text: JSON.stringify(value, null, 2) }] };
31
+ }
32
+ const server = new McpServer({ name: "vp0", version: "0.1.0" });
33
+ server.tool("search_vp0_designs", "Search VP0's free library of iOS app design starters (Expo React Native). " +
34
+ "Returns matching designs with their slug and import link. " +
35
+ "Call get_vp0_design with a slug to fetch the full, import-ready source.", {
36
+ query: z.string().describe("keywords, e.g. 'fitness dark dashboard' or 'onboarding'"),
37
+ limit: z.number().int().min(1).max(30).optional().describe("max results (default 12)"),
38
+ }, async ({ query, limit }) => {
39
+ const data = await api(`/contents?search=${encodeURIComponent(query)}&limit=${limit ?? 12}`);
40
+ const designs = (data.data ?? []).map((c) => ({
41
+ name: c.name,
42
+ slug: c.slug,
43
+ description: c.description ?? null,
44
+ importUrl: `https://vp0.com/source/${c.slug}`,
45
+ }));
46
+ return asText({ count: designs.length, designs });
47
+ });
48
+ server.tool("get_vp0_design", "Fetch the complete import-ready manifest for one VP0 design by slug: inline " +
49
+ "source file(s), dependencies, the exact install command, and ordered " +
50
+ "integration steps. Follow manifest.aiInstructions verbatim to add the " +
51
+ "design to the user's Expo React Native project.", {
52
+ slug: z.string().describe("the design slug, e.g. 'gym-fits-design'"),
53
+ }, async ({ slug }) => {
54
+ const manifest = await api(`/designs/${encodeURIComponent(slug)}/manifest`);
55
+ return asText(manifest);
56
+ });
57
+ async function main() {
58
+ await server.connect(new StdioServerTransport());
59
+ // Log to stderr — stdout is reserved for the MCP protocol.
60
+ console.error(`vp0-mcp ready (API: ${API_BASE})`);
61
+ }
62
+ main().catch((err) => {
63
+ console.error("vp0-mcp failed to start:", err);
64
+ process.exit(1);
65
+ });
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "vp0-mcp",
3
+ "version": "0.1.0",
4
+ "description": "Model Context Protocol server for VP0 — search and import free iOS app design starters straight into your AI builder (Claude Code, Cursor, Windsurf).",
5
+ "type": "module",
6
+ "bin": {
7
+ "vp0-mcp": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
14
+ "engines": {
15
+ "node": ">=18"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/VP0COM/vp0com-official-site-2026.git",
20
+ "directory": "mcp"
21
+ },
22
+ "homepage": "https://vp0.com",
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "scripts": {
27
+ "build": "tsc",
28
+ "start": "node dist/index.js",
29
+ "prepublishOnly": "npm run build"
30
+ },
31
+ "keywords": [
32
+ "mcp",
33
+ "model-context-protocol",
34
+ "vp0",
35
+ "react-native",
36
+ "expo",
37
+ "ios",
38
+ "ai"
39
+ ],
40
+ "license": "MIT",
41
+ "dependencies": {
42
+ "@modelcontextprotocol/sdk": "^1.12.0",
43
+ "zod": "^3.23.8"
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "^20.14.0",
47
+ "typescript": "^5.5.0"
48
+ }
49
+ }