gmailql 1.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global gmailql --version 1.2.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local gmailql --version 1.2.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=gmailql&version=1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package gmailql --version 1.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GmailQL
Email operations via GraphQL -- CLI tool, MCP server, and API for Gmail and IMAP/SMTP providers.
Install
# Zero-install via .NET 10 dnx
dnx gmailql
# Or install as a global tool
dotnet tool install -g gmailql
Quick Start
# Log in to Gmail
gmailql login
# List inbox messages
gmailql messages list
# Read a message
gmailql messages read <id>
# Send a message
gmailql messages send --to alice@example.com --subject "Hello" --body "Hi there"
# Search messages
gmailql messages list --query "from:bob subject:meeting"
# Raw GraphQL query
gmailql query '{ messages(filter: { isUnread: true }) { items { subject from { email } } } }'
MCP Server
GmailQL includes an MCP server for AI agent integration with 3 tools:
gmailql_query, gmailql_mutate, gmailql_schema.
Auto-Install
# Interactive setup — detects Claude Code, VS Code, Cursor, Windsurf
gmailql install-mcp
# Install to user config for all detected agents
gmailql install-mcp --user --all
# Install to project config for a specific agent
gmailql install-mcp --project --agent claude-code
Manual Configuration
Claude Code (~/.claude.json) — Windows:
{
"mcpServers": {
"gmailql": {
"command": "cmd",
"args": ["/c", "dnx", "gmailql", "--", "--mcp"]
}
}
}
macOS/Linux:
{
"mcpServers": {
"gmailql": {
"command": "dnx",
"args": ["gmailql", "--", "--mcp"]
}
}
}
Note: On Windows,
dnx,npx, anduvxare.cmdscripts and needcmd /c.
HTTP GraphQL Server
cd src/GmailQL.Server
dotnet run
# GraphQL playground at http://localhost:5280/graphql
IMAP/SMTP Support
# Log in to any IMAP provider
gmailql login --provider imap --alias work
Features
- 32 CLI commands covering messages, drafts, labels, contacts, filters, attachments, setup
- GraphQL API with 10 queries, 18 mutations, and subscriptions for new mail
- MCP server with 3 coarse tools for minimal AI context usage
install-mcp/uninstall-mcpauto-setup for Claude Code, VS Code, Cursor, Windsurf- Multi-account with named accounts, switching, and per-query account selection via GraphQL
- Cross-platform credential storage — Windows Credential Manager, macOS Keychain, Linux libsecret, encrypted file fallback
- Gmail API optimizations — batch requests and exponential backoff on rate limits
- IMAP server-side search and proper attachment handling
- IMAP OAuth2 support (Microsoft 365 via XOAUTH2 SASL)
- OAuth token auto-refresh in long-running MCP sessions
- Interactive prompts when arguments are missing
- Output formats —
--json,--output-format graphql, table, plain text - GraphQL subscriptions for real-time new mail (polling + IMAP IDLE)
- Layered skill docs for AI agent context efficiency
Development
dotnet build gmailql.slnx
dotnet test gmailql.slnx
dotnet pack src/GmailQL.Tool/GmailQL.Tool.csproj -c Release
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.