This README assumes you are using pnpm, but you can replace pnpm with the package manager of your choice (yarn, npm, etc).
In src/inbox/Inbox.tsx and server/index.ts, replace any instances of REPLACE_WITH_YOUR_API_KEY with your API key and REPLACE_WITH_YOUR_BASE_URL with your SDK Endpoint, which can both be found on the App Settings page of the Braze dashboard.
Run the following commands from the root folder
To install dependencies:
pnpm installTo build:
pnpm run buildTo test the frontend component locally:
pnpm run serve # starts a server at http://localhost:4444Run the following commands from the server folder
To install dependencies:
pnpm installTo run:
pnpm startTo run with a custom port:
PORT=8008 pnpm startOptionally, host the MCP server so that ChatGPT can access it:
ngrok http 8000To inspect with the MCP inspector:
npx @modelcontextprotocol/inspector http://localhost:8000/mcpCopy the output URL with the proxy token into your browser and enter the following inputs to connect:
Transport Type: Streamable HTTP
URL: http://localhost:8000/mcp
You can then preview the UI widget under the Resources tab and the tool itself under the Tools tab. Note that ChatGPT is able to display the UI widget from the tool, but the MCP insepctor cannot.
To track events from your MCP server, use the Braze REST API
Note that ChatGPT apps are not currently enabled for Business accounts. This must be done on a Plus or Pro account.
- Click on your account on the bottom left and go to Settings
- Go to the Apps & Connectors section
- If you have not already done so, enable Developer Mode by scrolling to the bottom of this section and clicking on
Advanced settings - If you do not see a separate section for Apps on this panel, Apps may not be enabled for your account
- Click Create at the top right and enter the name, the
ngrokURL provided by the command above, and use no authentication
- Make sure you have Developer Mode enabled (the main ChatGPT input should have an orange outline)
- Click the
+button, expand theMoreoption, and choose the app you created above - Ask ChatGPT to invoke your tool (e.g.
Show me my current deals)