Configuration
Environment Variables
VibeMCP needs OAuth credentials to access Gmail and Microsoft APIs. There are three ways to provide them:
Option 1: MCP Client Config (Recommended)
Pass credentials directly in your MCP client configuration. This is the simplest — no files to manage.
{
"mcpServers": {
"vibemcp": {
"command": "npx",
"args": ["-y", "@vibetensor/vibemcp"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"MICROSOFT_CLIENT_ID": "your-azure-client-id",
"MICROSOFT_TENANT_ID": "common"
}
}
}
}Option 2: .env File
Create a .env file in your working directory:
# Google OAuth 2.0 (for Gmail + Google Calendar)
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
# Microsoft Azure (for Outlook + Outlook Calendar)
MICROSOFT_CLIENT_ID=your-application-client-id
MICROSOFT_TENANT_ID=commonOption 3: Persistent .env in Config Dir
Place a .env file at ~/.vibemcp/.env. This is loaded automatically when no .env exists in the working directory.
Loading Order
VibeMCP checks for .env in this order:
- Current working directory —
$PWD/.env - Config directory —
~/.vibemcp/.env - Pre-set environment variables — from MCP client
envblock
MCP client env block variables are always available regardless of .env file loading.
All Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
GOOGLE_CLIENT_ID | For Gmail/Calendar | — | Google OAuth 2.0 Client ID |
GOOGLE_CLIENT_SECRET | For Gmail/Calendar | — | Google OAuth 2.0 Client Secret |
GOOGLE_OAUTH_PORT | No | 4100 | Port for Google OAuth callback server |
MICROSOFT_CLIENT_ID | For Outlook/Calendar | — | Azure App Registration Client ID |
MICROSOFT_TENANT_ID | No | common | Azure tenant ID |
VIBEMCP_OUTPUT_FORMAT | No | toon | Default output format: toon or json |
VIBEMCP_CONFIG_DIR | No | ~/.vibemcp/ | Override config directory location |
Google Cloud Setup
- Go to Google Cloud Console > Credentials
- Create a new OAuth 2.0 Client ID (Application type: Desktop)
- Add
http://localhost:4100/codeas an authorized redirect URI - Enable the Gmail API and Google Calendar API in API Library
- Copy the Client ID and Client Secret
Google Scopes
VibeMCP requests these scopes during OAuth:
| Scope | Purpose |
|---|---|
openid | OpenID Connect identity |
userinfo.email | User email address |
https://mail.google.com/ | Full Gmail access |
https://www.googleapis.com/auth/calendar | Calendar read/write |
Microsoft Azure Setup
- Go to Azure Portal > App Registrations
- Register a new application
- Set Supported account types to "Personal Microsoft accounts only" or "All account types"
- Under Authentication, enable "Allow public client flows" (required for Device Code)
- Copy the Application (client) ID
No Redirect URI Needed
VibeMCP uses the Device Code flow for Microsoft, which doesn't require a redirect URI. This makes it ideal for CLI and MCP server environments.
Microsoft Scopes
All accounts (personal + business):
| Scope | Purpose |
|---|---|
Mail.ReadWrite | Read and write emails |
Mail.Send | Send emails |
Calendars.ReadWrite | Calendar access |
User.Read | User profile |
Business accounts only (additional):
| Scope | Purpose |
|---|---|
Chat.ReadWrite | Teams chat access |
User.ReadBasic.All | Read basic user info |
ChannelMessage.Send | Post to Teams channels |
Team.ReadBasic.All | Read team info |
Channel.ReadBasic.All | Read channel info |
Personal accounts (hotmail/outlook/live) automatically use only the base scopes. Teams scopes are not supported by personal Microsoft accounts.
MCP Client Configuration
Claude Desktop
Config file location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"vibemcp": {
"command": "npx",
"args": ["-y", "@vibetensor/vibemcp"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"MICROSOFT_CLIENT_ID": "your-azure-client-id",
"MICROSOFT_TENANT_ID": "common"
}
}
}
}Claude Code
Add to ~/.claude.json:
{
"mcpServers": {
"vibemcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@vibetensor/vibemcp"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret",
"MICROSOFT_CLIENT_ID": "your-azure-client-id",
"MICROSOFT_TENANT_ID": "common"
}
}
}
}From Source
{
"mcpServers": {
"vibemcp": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/vibemcp/dist/cli.js"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}File Structure
VibeMCP stores all persistent data in ~/.vibemcp/:
| File | Purpose |
|---|---|
~/.vibemcp/accounts.json | Registry of connected accounts |
~/.vibemcp/.oauth2.{email}.json | Google OAuth tokens per account |
~/.vibemcp/ms-token-cache.json | Microsoft MSAL token cache |
~/.vibemcp/.env | (Optional) persistent environment config |
The config directory can be overridden with VIBEMCP_CONFIG_DIR.
Security
These files contain OAuth tokens. They should never be committed to version control. The ~/.vibemcp/ directory is in your home folder and is not part of any project.