add claude desktop bootstrap script
This commit is contained in:
@@ -19,11 +19,6 @@
|
|||||||
|
|
||||||
A production-ready MCP server that integrates all major Google Workspace services with AI assistants. Built with FastMCP for optimal performance, featuring advanced authentication handling, service caching, and streamlined development patterns.
|
A production-ready MCP server that integrates all major Google Workspace services with AI assistants. Built with FastMCP for optimal performance, featuring advanced authentication handling, service caching, and streamlined development patterns.
|
||||||
|
|
||||||
**Recent Improvements:**
|
|
||||||
- 🔧 **Authentication Decorator System**: Eliminated 87% of boilerplate code with centralized `@require_google_service()` decorators and 30-minute service caching
|
|
||||||
- ⚡ **FastMCP Native Responses**: Simplified architecture with native Python return values instead of manual `CallToolResult` construction
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ✨ Features
|
## ✨ Features
|
||||||
|
|
||||||
@@ -53,7 +48,7 @@ A production-ready MCP server that integrates all major Google Workspace service
|
|||||||
```bash
|
```bash
|
||||||
git clone https://github.com/taylorwilsdon/google_workspace_mcp.git
|
git clone https://github.com/taylorwilsdon/google_workspace_mcp.git
|
||||||
cd google_workspace_mcp
|
cd google_workspace_mcp
|
||||||
# That's it! uv handles everything automatically
|
uv run main.py
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|||||||
71
install_claude.py
Normal file
71
install_claude.py
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Auto-installer for Google Workspace MCP in Claude Desktop
|
||||||
|
"""
|
||||||
|
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def get_claude_config_path():
|
||||||
|
"""Get the Claude Desktop config file path for the current platform."""
|
||||||
|
system = platform.system()
|
||||||
|
if system == "Darwin": # macOS
|
||||||
|
return Path.home() / "Library/Application Support/Claude/claude_desktop_config.json"
|
||||||
|
elif system == "Windows":
|
||||||
|
appdata = os.environ.get("APPDATA")
|
||||||
|
if not appdata:
|
||||||
|
raise RuntimeError("APPDATA environment variable not found")
|
||||||
|
return Path(appdata) / "Claude/claude_desktop_config.json"
|
||||||
|
else:
|
||||||
|
raise RuntimeError(f"Unsupported platform: {system}")
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
try:
|
||||||
|
config_path = get_claude_config_path()
|
||||||
|
|
||||||
|
# Create directory if it doesn't exist
|
||||||
|
config_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
# Load existing config or create new one
|
||||||
|
if config_path.exists():
|
||||||
|
with open(config_path, 'r') as f:
|
||||||
|
config = json.load(f)
|
||||||
|
else:
|
||||||
|
config = {}
|
||||||
|
|
||||||
|
# Ensure mcpServers section exists
|
||||||
|
if "mcpServers" not in config:
|
||||||
|
config["mcpServers"] = {}
|
||||||
|
|
||||||
|
# Add Google Workspace MCP server
|
||||||
|
config["mcpServers"]["google_workspace"] = {
|
||||||
|
"command": "npx",
|
||||||
|
"args": ["mcp-remote", "http://localhost:8000/mcp"]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Write updated config
|
||||||
|
with open(config_path, 'w') as f:
|
||||||
|
json.dump(config, f, indent=2)
|
||||||
|
|
||||||
|
print(f"✅ Successfully added Google Workspace MCP to Claude Desktop config!")
|
||||||
|
print(f"📁 Config file: {config_path}")
|
||||||
|
print("\n🚀 Next steps:")
|
||||||
|
print("1. Start the MCP server: uv run main.py")
|
||||||
|
print("2. Restart Claude Desktop")
|
||||||
|
print("3. The Google Workspace tools will be available in your chats!")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Error: {e}")
|
||||||
|
print("\n📋 Manual installation:")
|
||||||
|
print("1. Open Claude Desktop Settings → Developer → Edit Config")
|
||||||
|
print("2. Add the server configuration shown in the README")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
Reference in New Issue
Block a user