Make your MCP token
Your MCP token is your email address and agent password joined with a colon, then encoded in base64, with no spaces. On Mac or Linux run the printf command below in Terminal; on Windows run the PowerShell command. Your assistant sends it as Authorization: Bearer <token>. Base64 is not encryption, so keep the token as secret as a password.
How to make your MCP token
- If you just created the agent, copy Token for AI apps from Your agent is ready and skip the rest.
- Otherwise, have your email address and agent password ready.
- Run the command for your computer, replacing the example address and AGENT_PASSWORD with yours.
- Copy the line it prints. That is your token.
- Paste the token into your AI client's settings where the setup guide says
<TOKEN>.
When to use it
Meera has created her agent password. She opens PowerShell, runs the command with her address and agent password, and copies the line it prints into her Cursor settings.
Commands
Mac or Linux (Terminal):
printf '%s' 'you@xgenplus.com:AGENT_PASSWORD' | base64 | tr -d '\n'
The tr part removes the line break Linux adds to long tokens.
Windows (PowerShell):
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('you@xgenplus.com:AGENT_PASSWORD'))
Example (sample values): you@xgenplus.com:AGENT_PASSWORD becomes eW91QHhnZW5wbHVzLmNvbTpBR0VOVF9QQVNTV09SRA==. A real token looks like this: letters, digits, maybe + or /, often ending in =.
Good to know
- Base64 is not encryption. Anyone with the token can use your agent password. Keep it as secret as a password.
- Do not use online base64 encoder websites. They would receive your agent password. The commands above run only on your own computer.
- Keep the colon between the address and the password, with no spaces.
- If your agent password contains a single quote (
'), the commands break. Create a new agent password without one. - If you change your agent password, make a new token.
- Use the whole address, such as you@yourcompany.com, not just your name.
Common questions
Is the token safe to share?
No. It is your agent password in another form. Never paste it into a chat with the AI, into shared files or into a code repository.
My client still asks me to sign in. What is wrong?
The token is missing or wrong, or the mailbox is blocked. Make the token again with no spaces or line breaks, and check the header reads Authorization, Bearer, a space, then the token.