
mcp base setup
一个集成了 Gmail、Google Drive 和网络搜索功能的 Anthropic Claude AI 模型命令行工具。
Repository Info
About This Server
一个集成了 Gmail、Google Drive 和网络搜索功能的 Anthropic Claude AI 模型命令行工具。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
SimpleAnthropicCLI v4
A command-line interface for Anthropic's Claude AI models with Gmail, Google Drive integration and function calling/tool use capabilities.
Features
- Chat with Claude models with conversation history management
- Extended thinking mode for more thoughtful responses
- Tool use capabilities (function calling) for Claude to use external services
- Gmail integration for searching, reading, and sending emails
- Google Drive integration for file management
- Web search capabilities using Brave Search
- Configuration management with user profiles
- Session management to save and load conversations
- Support for all Claude 3 models
Installation
-
Clone this repository:
git clone <repository-url> cd simple-anthropic-cli -
Install required dependencies:
pip install -r requirements.txt -
Create a
.envfile in the project root with your API keys:ANTHROPIC_API_KEY=your_anthropic_api_key BRAVE_API_KEY=your_brave_search_api_key -
Set up Google OAuth credentials for Gmail and Drive (see Authentication below)
Usage
Start the CLI:
python simple_anthropic_cli.py
Command-line Arguments
usage: simple_anthropic_cli.py [-h] [--api-key API_KEY] [--model MODEL] [--setup]
[--gmail-creds GMAIL_CREDS] [--gmail-token GMAIL_TOKEN]
[--drive-creds DRIVE_CREDS] [--drive-token DRIVE_TOKEN]
[--brave-api-key BRAVE_API_KEY] [--no-thinking] [--no-tools]
[--extended-output] [--debug]
options:
-h, --help show this help message and exit
--api-key API_KEY Anthropic API key
--model MODEL Model to use
--setup Run setup wizard on startup
--gmail-creds GMAIL_CREDS
Path to Gmail credentials.json
--gmail-token GMAIL_TOKEN
Path to Gmail token.json
--drive-creds DRIVE_CREDS
Path to Drive credentials.json
--drive-token DRIVE_TOKEN
Path to Drive token.json
--brave-api-key BRAVE_API_KEY
Brave Search API key
--no-thinking Disable extended thinking
--no-tools Disable tool use
--extended-output Enable extended output (128k tokens)
--debug Enable debug logging
CLI Commands
Here are some of the available commands in the CLI:
chat <message>- Chat with Claudethinking [on|off|show|hide|budget <number>]- Configure extended thinkingtools [on|off|list]- Configure tool usemodel [model_name]- Set or view the current modelextended_output [on|off]- Configure extended output (128k tokens)clear- Clear the current conversationsave_conversation [filename]- Save the current conversationload_conversation <filename>- Load a saved conversationconfig [setting] [value]- View or change configurationstatus- Check service statusexitorquit- Exit the CLI
Type help to see all available commands, or help <command> for detailed help on a specific command.
Email Commands
email_list [query] # List emails, with optional search query
email_read <email_id> # Read a specific email
email_compose # Compose an email interactively
email_send <to> <subject> <body> # Send an email directly
email_drafts [view|send] [id] # Manage email drafts
Drive Commands
drive_list [query] # List Google Drive files
drive_download <file_id> [path] # Download a file
drive_create <type> <name> # Create a document, spreadsheet, or folder
drive_shared # List files shared with you
drive_share <id> <email> [role] # Share a file with someone
Search Commands
web_search <query> [count] # Search the web with Brave Search
local_search <query> [count] # Search for local businesses
Authentication
The CLI uses OAuth for Gmail and Google Drive. To set this up:
- Go to the Google Cloud Console
- Create a new project
- Enable the Gmail API and Drive API
- Create OAuth 2.0 credentials (Desktop application type)
- Download the credentials JSON file
- Use the CLI's setup wizard to configure the paths to your credentials:
simple-anthropic> setup - On first run, it will open a browser window for you to authorize access to your Google account
Project Structure
simple-anthropic-cli/
├── simple_anthropic_cli.py # Main CLI entry point
├── utils/ # Utility modules
│ ├── anthropic_client_v2.py # Enhanced Claude client
│ ├── config_utils.py # Configuration management
│ ├── history_utils.py # History management
│ ├── logging_utils.py # Logging functionality
│ ├── security_utils.py # Security utilities
│ └── cache.py # Caching utilities
├── commands/ # Command handlers
│ ├── chat_commands.py # Chat-related commands
│ └── ... # Other command modules
├── gmail_service.py # Gmail integration
├── drive_service.py # Google Drive integration
├── brave_service.py # Brave Search integration
└── README.md # Documentation
Configuration
Configuration is stored in ~/.simple_anthropic_cli/config.json. Key settings include:
model: The Claude model to usetemperature: Temperature setting (0.0 to 1.0)max_tokens: Maximum tokens in the responsethinking_enabled: Whether to enable Claude's extended thinkingthinking_budget: Token budget for extended thinkinguse_tools: Whether to enable tool use (function calling)extended_output: Whether to enable extended output (128k tokens)gmail_credentials_path: Path to Gmail credentials JSONgmail_token_path: Path to Gmail token JSONdrive_credentials_path: Path to Drive credentials JSONdrive_token_path: Path to Drive token JSONbrave_api_key: Brave Search API key
Requirements
- Python 3.7+
- Anthropic API key
- Google account (for Gmail and Drive integration)
- Brave Search API key (optional)
License
MIT License
Quick Start
Clone the repository
git clone https://github.com/cacticulturessecure/mcp-base-setupInstall dependencies
cd mcp-base-setup
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.