An Model Context Protocol (MCP) server that helps PWA Storefront developers with development.
The Model Context Protocol (MCP) is an open protocol that enables secure connections between host applications (like Claude Desktop or other AI assistants) and external data sources and tools.
This MCP server provides:
create_new_component: Help developers to create a new PWA Storefront component
- Install dependencies:
npm installnpm testThis will:
- Start the MCP server
- Connect to it as a client
- List available tools
- Call the
create_new_componenttool - Display the results
- Add this server to your Claude Desktop configuration:
{
"mcpServers": {
"pwa-storefront-server": {
"command": "node",
"args": ["server.js"],
"cwd": "{{$parent_dir_to_mcp}}/pwa-storefront-mcp"
}
}
}The server runs on stdio, so you can test it with any MCP-compatible client.
You can also test directly by running the server and sending JSON-RPC messages:
# Start the server
node server.js
# Then send JSON-RPC requests to stdin:
{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}
{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "create_new_component", "arguments": {}}}server.js- Main MCP server implementationtest-mcp.js- Automated test scriptmcp.json- MCP configuration file for clientspackage.json- Node.js dependencies and scripts
To run the server in development mode:
npm startThe server will output debug information to stderr and handle MCP protocol messages via stdio.
/ (root)
- package.json
- package-lock.json
- README.md
- mcp.json
- claude_desktop_config.json
/src
/components
- index.js
- PrimaryButton.jsx
... (other components)
/server
- server.js
- server-old-fashioned.js
/utils
- AddComponentTool.js
/scripts
- create-button.js
- demo.js
/tests
- test-mcp.js
/docs
- cursor-integration-guide.md
/node_modules
/.cursor
- All React components are in
src/components/. - Server code is in
src/server/. - Utilities/tools are in
src/utils/. - Scripts are in
src/scripts/. - Tests are in
src/tests/. - Documentation is in
docs/.
Update your import paths accordingly.