Token导航 LogoToken导航TokenDH.com
Composio Google Workspace logo
安全风控未说明官方级别未说明来源级核验

Composio Google Workspace

MCP Server

一个生产就绪的Google Workspace MCP服务,提供84种专用工具,用于全面的Google Workspace自动化,支持与Rube MCP集成进行集中OAuth认证。

工具数

0

提示词数

0

GitHub Stars

3

资源数

0
TypeScriptClaude自动化Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

cfdude

提供方

cfdude

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

谷歌工作区MCP服务

生产就绪的Google Workspace MCP服务,为全面的Google Workspace自动化提供84个专用工具。旨在作为与Rube MCP集成的持久后台服务运行,以实现集中式OAuth身份验证。

🚀 特性

  • 84定制工具:完整的Google Workspace API覆盖范围(83个工具+1个通过Composio的授权)
  • MCP服务:具有PM2进程管理的持久后台服务
  • 集中式身份验证:OAuth由Composio/Rube处理(桌面上没有客户端机密)
  • TypeScript:具有现代ES2022功能的全型安全
  • ES模块:全程支持本地ES模块
  • 自动启动:可配置的启动时间服务激活
  • 健康监测:用于服务监控的内置健康端点
  • 符合PKCE标准:解决远程工作人员的安全合规问题

📋 先决条件

🛠️ 快速开始

1.安装

# Clone or download the project
git clone 
cd composio-google-workspace

# Install dependencies
npm install

2.环境设置

# Copy environment template
cp .env.example .env

# Edit .env with your API keys
COMPOSIO_API_KEY=your_composio_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here

3.发展

# Run in development mode
npm run dev

# Or build and run
npm run build
npm start

🏗️ 项目结构

src/
├── agents/                    # AI agent implementations
│   └── google-workspace-agent.ts
├── tools/                     # Custom tool definitions
│   └── custom-tools.ts
├── composio-client.ts         # Composio SDK initialization
└── index.ts                   # Main application entry

🤖 谷歌工作区代理

GoogleWorkspaceAgent 类为常见的工作区任务提供了高级方法:

import { GoogleWorkspaceAgent } from './src/agents/google-workspace-agent.js'

const agent = new GoogleWorkspaceAgent('user-123')
await agent.initialize(['gmail', 'googlecalendar'])

// Send emails
await agent.sendEmail('colleague@company.com', 'Project Update', 'Here is the status...')

// Create calendar events  
await agent.createCalendarEvent({
  title: 'Team Standup',
  start: '2024-01-15T09:00:00Z',
  end: '2024-01-15T09:30:00Z',
  attendees: ['team@company.com']
})

// Complex workflows
await agent.scheduleMeetingWithInvites({
  title: 'Q1 Planning',
  start: '2024-01-20T14:00:00Z', 
  end: '2024-01-20T15:00:00Z',
  attendees: ['stakeholder1@company.com', 'stakeholder2@company.com'],
  agenda: 'Q1 objectives and resource allocation'
})

🔧 自定义工具

为您的工作空间需求创建专用工具:

import { initializeCustomTools } from './src/tools/custom-tools.js'

// Initialize all custom tools
const tools = await initializeCustomTools()

// Available custom tools:
// - EMAIL_ANALYTICS: Analyze email patterns
// - MEETING_OPTIMIZER: Find optimal meeting times  
// - DOCUMENT_INTELLIGENCE: Extract insights from documents
// - WORKSPACE_WORKFLOW: Automate cross-app workflows

🔐 身份验证流程

选项1:交互式设置

import { setupAuthentication, waitForAuthentication } from './src/composio-client.js'

// Setup Gmail authentication
const connectionRequest = await setupAuthentication('user-123', 'gmail')
console.log('Visit this URL:', connectionRequest.redirectUrl)

// Wait for user to complete OAuth flow
const connectedAccount = await waitForAuthentication(connectionRequest.id)
console.log('Gmail connected:', connectedAccount.id)

选项2:预配置连接

通过配置连接 Composio仪表板 并通过ID引用它们。

📚 可用脚本

# Development
npm run dev          # Start development server
npm run build        # Build for production
npm run preview      # Preview production build
npm start           # Run built application

# Code Quality
npm run typecheck   # TypeScript type checking
npm run lint        # ESLint code linting
npm run lint:fix    # Fix ESLint issues automatically
npm run format      # Format code with Prettier
npm run format:check # Check code formatting

🔗 集成示例

Gmail集成

// Fetch recent emails
const emails = await agent.getRecentEmails(10, 'is:unread')

// Send email with attachments
await agent.sendEmail('client@company.com', 'Proposal', 'Please find attached...', {
  attachments: ['path/to/proposal.pdf']
})

日历集成

// Get upcoming events
const events = await agent.getUpcomingEvents(5)

// Create recurring meeting
await agent.createCalendarEvent({
  title: 'Weekly Sync',
  start: '2024-01-15T10:00:00Z',
  end: '2024-01-15T10:30:00Z',
  recurrence: ['RRULE:FREQ=WEEKLY;BYDAY=MO']
})

Google Drive集成

// Upload documents
await agent.uploadToDrive('report.md', reportContent)

// Search files
const files = await agent.searchDriveFiles('type:document modified:2024')

🚀 高级工作流

每日摘要生成

// Generate comprehensive daily summary
const summary = await agent.generateDailySummary('2024-01-15')
console.log(summary)
// Includes email activity, calendar events, and insights

会议编排

// Complete meeting workflow: schedule + invites + follow-up
await agent.scheduleMeetingWithInvites({
  title: 'Product Review',
  start: '2024-01-20T15:00:00Z',
  end: '2024-01-20T16:00:00Z', 
  attendees: ['product@company.com', 'engineering@company.com'],
  agenda: 'Q1 product roadmap review and prioritization',
  location: 'Conference Room A'
})

🛡️ 错误处理

该项目包括全面的错误处理:

try {
  await agent.sendEmail('invalid-email', 'Test', 'Body')
} catch (error) {
  console.error('Email failed:', error.message)
  // Handle specific error cases
}

📖 api参考

Composio客户端

  • initializeComposio() -初始化SDK连接
  • getAvailableTools(toolkits, userId) -列出可用工具
  • setupAuthentication(userId, toolkit) -启动OAuth流
  • waitForAuthentication(requestId) -等待身份验证完成
  • executeTool(toolSlug, userId, arguments) -执行任何工具

谷歌工作区代理

  • initialize(services) -安装具有所需服务的代理
  • sendEmail() -发送带有附件的电子邮件
  • getRecentEmails() -获取和过滤电子邮件
  • createCalendarEvent() -创建日历事件
  • getUpcomingEvents() -列出即将举行的活动
  • uploadToDrive() -将文件上传到驱动器
  • searchDriveFiles() -搜索驱动器内容
  • generateDailySummary() -生成每日活动摘要

🔧 配置

TypeScript配置

该项目使用现代TypeScript设置 tsconfig.json:

  • 目标:ES2022
  • 模块:ESNext
  • 严格模式已启用
  • 支持路径别名(@/src/)

快速配置

针对Node.js开发进行了优化:

  • ES模块输出
  • 源映射已启用
  • 正确的外部处理
  • 路径别名解析

代码质量

  • ESLint:支持TypeScript的linting和推荐规则
  • 更漂亮:一致的代码格式
  • 预提交挂钩:自动格式化和linting

🤝 贡献

  1. 分叉存储库
  2. 创建要素分支: git checkout -b feature/amazing-feature
  3. 进行更改并添加测试
  4. 运行质量检查: npm run lint && npm run typecheck
  5. 提交您的更改: git commit -m 'Add amazing feature'
  6. 推到分支: git push origin feature/amazing-feature
  7. 打开拉取请求

📄 许可证

该项目根据ISC许可证获得许可。有关详细信息,请参阅LICENSE文件。

🆘 故障排除

常见问题

身份验证错误

# Verify API keys are set
npm run dev
# Check console for authentication status

TypeScript错误

# Run type checking
npm run typecheck

# Check for missing dependencies
npm install

构建问题

# Clear cache and rebuild
rm -rf dist node_modules
npm install
npm run build

获取帮助

🔮 接下来是什么?

  • 添加Anthropic-Claude集成,用于人工智能电子邮件回复
  • 实施工作流调度和自动化
  • 添加对Google表格数据处理的支持
  • 创建用于监视代理活动的仪表板
  • 添加单元测试和CI/CD管道

______________________________________________________________________

内置于❤️ 使用 公司开发 -AI代理在现实世界中采取行动的平台。

目录标签

目录标签

TypeScriptClaude自动化GoogleWorkspace本地部署自动化工具OAuth认证ES模块

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauthremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP