#
tokens: 2247/50000 7/7 files
lines: on (toggle) GitHub
raw markdown copy reset
# Directory Structure

```
├── .gitignore
├── glama.json
├── icon.png
├── LICENSE
├── manifest.json
├── package-lock.json
├── package.json
├── README.md
├── src
│   └── server.js
├── tsconfig.json
└── website-generator-mcp-server.dxt
```

# Files

--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------

```
1 | node_modules/
2 | dist/
3 | 
```

--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # @b12/website-generator-mcp-server
 2 | B12's model context protocol server for generating websites with AI
 3 | 
 4 | <a href="https://glama.ai/mcp/servers/@b12io/website-generator-mcp-server">
 5 |   <img width="380" height="200" src="https://glama.ai/mcp/servers/@b12io/website-generator-mcp-server/badge" alt="Website Generator MCP server" />
 6 | </a>
 7 | 
 8 | ## Usage with Claude Desktop
 9 | 
10 | ### Prerequisites
11 | 
12 | -   NodeJS
13 | -   MCP Client (like Claude Desktop App)
14 | 
15 | ### Installation
16 | 
17 | To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`:
18 | 
19 | ```json
20 | {
21 |     "mcpServers": {
22 |         "b12": {
23 |             "command": "npx",
24 |             "args": ["-y", "@b12/website-generator-mcp-server"]
25 |         }
26 |     }
27 | }
28 | ```
29 | ****
```

--------------------------------------------------------------------------------
/glama.json:
--------------------------------------------------------------------------------

```json
1 | {
2 |   "$schema": "https://glama.ai/mcp/schemas/server.json",
3 |   "maintainers": [
4 |     "thisisdhaas",
5 |     "adbharadwaj",
6 |     "zhadaev"
7 |   ]
8 | }
9 | 
```

--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "compilerOptions": {
 3 |     "target": "ES2022",
 4 |     "module": "Node16",
 5 |     "moduleResolution": "Node16",
 6 |     "strict": true,
 7 |     "esModuleInterop": true,
 8 |     "skipLibCheck": true,
 9 |     "forceConsistentCasingInFileNames": true,
10 |     "resolveJsonModule": true,
11 |     "outDir": "./dist",
12 |     "rootDir": "./src"
13 |   },
14 |   "include": [
15 |     "src/**/*",
16 |     "server.ts"
17 |   ],
18 |   "exclude": [
19 |     "node_modules"
20 |   ]
21 | }
22 | 
```

--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "name": "@b12/website-generator-mcp-server",
 3 |   "version": "1.0.3",
 4 |   "description": "Website generator MCP server by b12.io",
 5 |   "main": "dist/server.js",
 6 |   "files": ["dist"],
 7 |   "bin": {
 8 |     "b12-mcp-server": "dist/server.js"
 9 |   },
10 |   "dependencies": {
11 |     "@modelcontextprotocol/sdk": "^1.7.0"
12 |   },
13 |   "scripts": {
14 |     "start": "node server.js",
15 |     "build": "tsc && shx chmod +x dist/*.js"
16 |   },
17 |   "author": "b12io",
18 |   "license": "Apache-2.0",
19 |   "devDependencies": {
20 |     "@types/node": "^22.13.14",
21 |     "shx": "^0.4.0",
22 |     "typescript": "^5.8.2"
23 |   }
24 | }
25 | 
```

--------------------------------------------------------------------------------
/manifest.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 |   "dxt_version": "0.1",
 3 |   "name": "website-generator",
 4 |   "display_name": "B12 Website Generator",
 5 |   "version": "1.0.3",
 6 |   "description": "Create a website in seconds! Generate, design, write code, and write copy for your website. Powered by B12. Contact: [email protected]",
 7 |   "long_description": "This extension allows you to create a professional, engaging, and user-friendly website in seconds using AI. To create a website, you need to provide a name for your project/business, along with a description of the project/business (goals, structure, etc.).",
 8 |   "author": {
 9 |     "name": "B12.io",
10 |     "email": "[email protected]",
11 |     "url": "https://b12.io/"
12 |   },
13 |   "homepage": "https://b12.io/",
14 |   "icon": "icon.png",
15 |   "server": {
16 |     "type": "node",
17 |     "entry_point": "src/server.js",
18 |     "mcp_config": {
19 |       "command": "node",
20 |       "args": [
21 |         "${__dirname}/src/server.js"
22 |       ],
23 |       "env": {}
24 |     }
25 |   },
26 |   "tools": [
27 |     {
28 |       "name": "generate_website",
29 |       "description": "Generates a website from a business/project name and short description, then presents a link (in markdown format) to sign up and see the website."
30 |     }
31 |   ],
32 |   "keywords": [
33 |     "website",
34 |     "business",
35 |     "marketing",
36 |     "write code",
37 |     "write copy",
38 |     "site"
39 |   ],
40 |   "license": "Apache-2.0"
41 | }
42 | 
```

--------------------------------------------------------------------------------
/src/server.js:
--------------------------------------------------------------------------------

```javascript
 1 | #!/usr/bin/env node
 2 | 
 3 | import { Server } from '@modelcontextprotocol/sdk/server/index.js'
 4 | import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
 5 | import {
 6 |   CallToolRequestSchema,
 7 |   ListToolsRequestSchema,
 8 | } from '@modelcontextprotocol/sdk/types.js'
 9 | 
10 | const server = new Server(
11 |   {
12 |     name: 'b12-website-generator',
13 |     version: '0.1.0',
14 |   },
15 |   {
16 |     capabilities: {
17 |       tools: {},
18 |     },
19 |   },
20 | )
21 | 
22 | const WEBSITE_GENERATION_TOOL = {
23 |   name: 'generate_website',
24 |   // Make sure the description is in sync with tool description in manifest.json
25 |   description: 'Generates a website from a business/project name and short description, then presents a link (in markdown format) to sign up and see the website.',
26 |   annotations: {
27 |     readOnlyHint: false,
28 |     destructiveHint: false,
29 |     idempotentHint: false,
30 |     openWorldHint: true,
31 |     title: 'Generate Website',
32 |   },
33 |   inputSchema: {
34 |     type: 'object',
35 |     properties: {
36 |       name: {
37 |         type: 'string',
38 |         description: 'The name of the business.'
39 |       },
40 |       description: {
41 |         type: 'string',
42 |         description: 'The short description of the business in less than 1000 characters.'
43 |       },
44 |     },
45 |     required: ['name', 'description']
46 |   }
47 | }
48 | 
49 | server.setRequestHandler(ListToolsRequestSchema, async () => ({
50 |   tools: [WEBSITE_GENERATION_TOOL],
51 | }))
52 | 
53 | server.setRequestHandler(CallToolRequestSchema, request => {
54 |   try {
55 |     const { name: toolName, arguments: args } = request.params
56 | 
57 |     if (!args) {
58 |       throw new Error('Business name and description are not provided')
59 |     }
60 | 
61 |     if (toolName === 'generate_website') {
62 |       const { name, description } = args
63 |       return {
64 |         content: [{
65 |           type: 'text',
66 |           text: `https://b12.io/signup/?utm_medium=chat&utm_source=mcp-server&intent=ai-websites&utm_content=website-generator&business_name=${encodeURIComponent(String(name))}&business_description=${encodeURIComponent(String(description))}`
67 |         }],
68 |         isError: false,
69 |       }
70 |     }
71 |     return {
72 |       content: [{ type: 'text', text: `Unknown tool: ${toolName}` }],
73 |       isError: true,
74 |     }
75 |   } catch (error) {
76 |     return {
77 |       content: [
78 |         {
79 |           type: 'text',
80 |           text: `Error: ${error instanceof Error ? error.message : String(error)}`,
81 |         },
82 |       ],
83 |       isError: true,
84 |     }
85 |   }
86 | })
87 | 
88 | async function runServer() {
89 |   const transport = new StdioServerTransport()
90 |   await server.connect(transport)
91 |   console.error('B12 Website generator MCP Server running on stdio')
92 | }
93 | 
94 | runServer().catch((error) => {
95 |   console.error('Fatal error running server:', error)
96 |   process.exit(1)
97 | })
98 | 
```