devil-app-builder-mcp 1.0.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.
Files changed (3) hide show
  1. package/README.md +68 -0
  2. package/index.js +83 -0
  3. package/package.json +30 -0
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # Devil App Builder MCP Server
2
+
3
+ This is an MCP (Model Context Protocol) server for the Devil App Builder.
4
+
5
+ ## Installation
6
+
7
+ To use this server with Claude Desktop, you can run it directly using `npx` or install it globally.
8
+
9
+ ### Prerequisites
10
+
11
+ - Node.js (v18 or higher)
12
+ - npm
13
+
14
+ ### Usage with Claude Desktop
15
+
16
+ Add the following configuration to your Claude Desktop configuration file:
17
+
18
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
19
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
20
+
21
+ ```json
22
+ {
23
+ "mcpServers": {
24
+ "devil-app-builder": {
25
+ "command": "npx",
26
+ "args": ["-y", "devil-app-builder-mcp"],
27
+ "env": {
28
+ "DEVIL_API_KEY": "your_api_key_here"
29
+ }
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ **Note:** Since this package is not yet published to npm under `@your-scope/devil-mcp-server`, you will need to publish it first or use `npm link` for local development.
36
+
37
+ #### Local Development
38
+
39
+ 1. Clone the repository.
40
+ 2. Install dependencies: `npm install`
41
+ 3. Build the project: `npm run build`
42
+ 4. Run in development mode (watch changes): `npm run dev`
43
+ 5. Link the package locally: `npm link`
44
+ 6. Update your Claude Desktop configuration to use the linked package name or run from source.
45
+
46
+ For local testing without publishing, you can point directly to the built file:
47
+
48
+ ```json
49
+ {
50
+ "mcpServers": {
51
+ "devil-app-builder": {
52
+ "command": "node",
53
+ "args": ["/absolute/path/to/devil-app-builder-mcp/build/index.js"],
54
+ "env": {
55
+ "DEVIL_API_KEY": "your_api_key_here"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ ## Features
63
+
64
+ - **build_app**: A tool to build a new application with a given name and description.
65
+
66
+ ## License
67
+
68
+ ISC
package/index.js ADDED
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env node
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import {
5
+ CallToolRequestSchema,
6
+ ListToolsRequestSchema,
7
+ } from "@modelcontextprotocol/sdk/types.js";
8
+
9
+ const server = new Server(
10
+ {
11
+ name: "devil-app-builder-mcp",
12
+ version: "1.0.0",
13
+ },
14
+ {
15
+ capabilities: {
16
+ tools: {},
17
+ },
18
+ }
19
+ );
20
+
21
+ const DEVIL_API_KEY = process.env.DEVIL_API_KEY || 'test-api-key';
22
+ console.log('DEVIL_API_KEY', DEVIL_API_KEY);
23
+
24
+ if (!DEVIL_API_KEY) {
25
+ console.error("Error: DEVIL_API_KEY environment variable is required.");
26
+ process.exit(1);
27
+ }
28
+
29
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
30
+ return {
31
+ tools: [
32
+ {
33
+ name: "build_app",
34
+ description: "Build a new application using the Devil App Builder",
35
+ inputSchema: {
36
+ type: "object",
37
+ properties: {
38
+ appName: {
39
+ type: "string",
40
+ description: "The name of the application to build",
41
+ },
42
+ description: {
43
+ type: "string",
44
+ description: "A description of what the application should do",
45
+ },
46
+ },
47
+ required: ["appName", "description"],
48
+ },
49
+ },
50
+ ],
51
+ };
52
+ });
53
+
54
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
55
+ if (request.params.name === "build_app") {
56
+ const { appName, description } = request.params.arguments;
57
+
58
+ // implementation logic here
59
+ // For now, we'll just return a success message with the details
60
+
61
+ return {
62
+ content: [
63
+ {
64
+ type: "text",
65
+ text: `Building app '${appName}' with description: ${description}. Using API Key: ${DEVIL_API_KEY.substring(0, 4)}...`,
66
+ },
67
+ ],
68
+ };
69
+ }
70
+
71
+ throw new Error("Tool not found");
72
+ });
73
+
74
+ async function main() {
75
+ const transport = new StdioServerTransport();
76
+ await server.connect(transport);
77
+ console.error("Devil App Builder MCP Server running on stdio");
78
+ }
79
+
80
+ main().catch((error) => {
81
+ console.error("Server error:", error);
82
+ process.exit(1);
83
+ });
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "devil-app-builder-mcp",
3
+ "version": "1.0.0",
4
+ "description": "Devil App Builder MCP Server",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "bin": {
8
+ "devil-app-builder-mcp": "./index.js"
9
+ },
10
+ "scripts": {
11
+ "start": "node index.js",
12
+ "dev": "node --watch index.js"
13
+ },
14
+ "keywords": [
15
+ "mcp",
16
+ "model-context-protocol",
17
+ "devil-app-builder"
18
+ ],
19
+ "files": [
20
+ "index.js"
21
+ ],
22
+ "author": "",
23
+ "license": "ISC",
24
+ "dependencies": {
25
+ "@modelcontextprotocol/sdk": "^1.27.1",
26
+ "zod": "^4.3.6"
27
+ },
28
+ "devDependencies": {
29
+ }
30
+ }