An email thingy.
-
Install
bun
: docs -
Set up a project in Google Cloud and then follow these directions to enable the Gmail API and get a
credentials.json
file, stopping short of all the python stuff. Some notes as you follow these directions:- It says to choose "internal" however this is only possible w/in a Google Workspace domain, so choose "External" if you're doing this for your personal email.
- Give it any old logo, this is just a test app. lucide.dev has an email icon you can use.
- Make sure to add the gmail address you'd like to test with as a test user.
The end result should be a
credentials.json
file that you can download and use locally to pull stuff from the Gmail API. Put this file inpackages/auth/credentials.json
. -
Generate a
token.json
file by running this script:cd packages/auth bun install bun run index.ts
Once you have a packages/auth/token.json
you have a few options:
-
You can chat with the gmail MCP server in Claude Desktop via
cd packages/tools bun install bun run chat-with gmail
If you inspect the output of this command it will have a general command you can plug in to other MCP Clients, e.g. Cursor, if you want to chat with it elsewhere.
-
You can inspect the gmail MCP server in the MCP inspector, which is a visual testing tool for MCP servers:
cd packages/tools bun install bun run inspect gmail
Add the google cloud speech-to-text API to the google cloud project being used for email access: https://cloud.google.com/speech-to-text?hl=en.
Then create a service account by
- Go to "IAM & Admin" > "IAM"
- Find your service account
- Add the "Cloud Speech-to-Text API User" role
- Create a new key for the service account, and download it as json
- Move it to packages/cli/speech-credentials.json.
Next you'll need to get langfuse credentials since prompts for the CLI are stored there.
Once you have those you can copy packages/cli/.env.example
to packages/cli/.env
and fill it out, and then run:
cd packages/cli
bun install
rm -rf dist && bun run --env-file .env src/index.ts
Open up localhost:3000/ alongside the CLI. If you select "Speak" in the CLI, you need to switch focus to the web app for the web app to record, and then switch back to the CLI to hit a key to stop recording.