MCP: connect an AI to EUnifyer
EUnifyer runs a Model Context Protocol server. An AI assistant or agent that speaks MCP can search and read the mail, files, calendar and contacts of one EUnifyer user, with exactly the access you give its token.
| Endpoint | https://api.eunifyer.com/api/v1/mcp/ (note the trailing slash) |
| Transport | Streamable HTTP, stateless, JSON responses |
| Authentication | Authorization: Bearer <token> |
1. Create a token
You need an administrator account.
- Go to Admin → API Access and open or create a service principal. The service principal must itself carry the scopes you want to give the token.
- Create a token under it. Choose the scopes from the table below, and set Act as user. The AI acts as that user and sees only what that user can see.
- Copy the token (
eu_sk_…). It is shown once.
A token that is not bound to a user is refused by the MCP server, because there is nobody for the tools to act as. Use a dedicated user for an AI integration, so its access and activity are easy to review.
See Personal Access Tokens for expiry dates and IP allowlists.
A token with an IP allowlist is currently refused by the MCP server, because the client address is not available at that point. Leave the allowlist empty for MCP tokens and use a short expiry instead.
2. Point your AI at the server
Most MCP clients take a server URL and a header:
{
"mcpServers": {
"eunifyer": {
"url": "https://api.eunifyer.com/api/v1/mcp/",
"headers": { "Authorization": "Bearer eu_sk_…" }
}
}
}With Claude Code, one command does the same:
claude mcp add --transport http eunifyer https://api.eunifyer.com/api/v1/mcp/ \
--header "Authorization: Bearer eu_sk_…"Other MCP clients need the same two things: the URL and the Authorization header.
To check the connection by hand:
curl -s https://api.eunifyer.com/api/v1/mcp/ \
-H "Authorization: Bearer $EUNIFYER_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'The tool list you get back depends on your token’s scopes and on the user’s role and plan.
If the list is empty or the call returns 401, see Errors.
Quick start checklist
- An administrator creates a service principal with the scopes you need, for example
drive:read,calendar:readandmail:read. - They create a token under it with Act as user set to a dedicated user, and send you the
eu_sk_…secret. - You add the server URL and the
Authorizationheader to your AI client. - Ask it something that uses one tool, for example:
- “What is on my calendar today?”
- “Find the latest document about the budget in Drive.”
- “Search my mail for messages from the finance team.”
- If a tool you expected is missing, the token lacks that scope or the organisation’s plan does not include that module.
Tools and scopes
A token only sees the tools its scopes allow. Tools that are not listed here are not available to tokens.
| Scope | Tools |
|---|---|
| (any token) | get_my_profile, get_my_organization |
mail:read | get_unread_emails, search_emails, get_email, summarize_email_thread, get_email_labels |
mail:send | draft_email, reply_to_email (drafts, see below) |
drive:read | search_files, list_recent_files, get_file_metadata, get_file_content, summarize_document, search_document_knowledge |
calendar:read | get_upcoming_events, get_today_schedule, get_event_details, find_free_time |
calendar:write | create_event |
contacts:read | search_contacts, get_contact |
Give an integration the smallest set that it needs. drive:read plus calendar:read is enough for an assistant that answers questions about documents and schedules.
A tool also requires that the user’s organisation has that module on its plan. A mail tool does nothing for an organisation without mail.
Writes are drafts by default
Tools that change data return a draft that describes what would happen. Nothing is sent or created.
draft_emailandreply_to_emailreturn a draft message.create_eventreturns a preview of the event.
An operator can allow the small set of tools that may actually execute (currently create_event) for a deployment. Even then, send_email and chat posting remain drafts. Every response carries a policy field that states which mode is active, so an agent can tell a draft from an executed action.
Ask your EUnifyer contact if you need execution turned on for your environment.
What the AI cannot reach
These are not available over MCP today:
- Chat, meetings and transcripts
- Administration and user management
- Spreadsheet and document editing. Drive files can be searched and read as text, but not edited through MCP. Use the Drive API to upload and download files.
- Sending mail. Use SMTP or JMAP, see Mail.
Limits and audit
- Tool calls are rate limited per user.
- Every call is recorded with the user, the tool, its arguments and how long it took. Message bodies, subjects and event titles in the arguments are replaced by their length. Results are not stored.
- Every request authenticated with a token is also recorded in the audit log as use of that token.
- Revoking the token or deactivating its user stops access immediately. Tokens are checked on every request.
Errors
| Response | Meaning |
|---|---|
401 | The token is missing, wrong, expired, revoked, not bound to a user, or has an IP allowlist |
| Tool error “Unknown or not permitted tool” | The tool is outside the token’s scopes, or not on the organisation’s plan |
| Tool error “Your organization is not active” | The organisation’s subscription is suspended |
Other token types
A Keycloak access token that belongs to a user is also accepted. Personal access tokens are the recommended way to connect an integration. Discovery metadata for OAuth clients is published at https://api.eunifyer.com/api/v1/mcp/.well-known/oauth-protected-resource; clients that use a personal access token do not need it.