Pipedrive MCP服务器
模型上下文协议(MCP)服务器,连接到Pipedrive API v2,向Claude等LLM应用程序公开PipedriveCRM数据。
特性
- 只读访问 到Pipedrive数据
- 全面实体支持 包括:
- 交易 - 人员(联系人) - 组织 - 管道和阶段 - 活动 - 备注
- 搜索功能 跨所有实体类型
- 自定义字段支持 -所有字段,包括自定义字段,均已公开
- 预定义提示 用于常见操作
先决条件
- Node.js(v16或更高版本)
- 具有API访问权限的Pipedrive帐户
- Pipedrive API令牌
安装
- 克隆存储库:
git clone https://github.com/yourusername/pipedrive-mcp-server.git
cd pipedrive-mcp-server- 安装依赖项:
npm install- 创建一个
.env根目录中的文件:
cp .env.example .env- 将您的Pipedrive API令牌添加到
.env文件:
PIPEDRIVE_API_TOKEN=your_pipedrive_api_token_here- 构建项目:
npm run build获取Pipedrive API代币
- 登录您的Pipedrive帐户
- 转到个人设置→ API
- 复制您的个人API令牌
用法
发展模式
运行服务器并自动重新加载以进行开发:
npm run dev生产模式
构建并运行编译后的服务器:
npm run build
npm start使用Claude Desktop进行配置
将以下内容添加到您的Claude Desktop配置文件中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json 视窗: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pipedrive": {
"command": "node",
"args": ["/path/to/pipedrive-mcp-server/dist/index.js"],
"env": {
"PIPEDRIVE_API_TOKEN": "your_pipedrive_api_token_here"
}
}
}
}可用工具
交易
get_deals-列表处理过滤选项get_deal-按ID获取特定交易search_deals-按术语搜索交易
人员(联系人)
get_persons-列出具有筛选选项的人员get_person-通过ID获取特定人员search_persons-按姓名搜索人员
组织
get_organizations-列出组织get_organization-按ID获取特定组织search_organizations-搜索组织
管道和阶段
get_pipelines-列出所有管道get_pipeline-获取特定的管道get_stages-列出管道阶段get_stage-获得特定阶段
活动
get_activities-使用筛选列出活动get_activity-获取特定活动
备注
get_notes-列出带有过滤功能的笔记get_note-获取特定注释
搜索
search_items-跨多个项目类型搜索
预定义提示
服务器包括几个用于常见操作的预定义提示:
list_all_deals-列出所有交易及其详细信息search_person-按姓名搜索某人get_organization_deals-获取特定组织的所有交易pipeline_overview-获取所有管道及其阶段的概述
发展
命令
npm run dev # Run with auto-reload for development
npm run build # Build TypeScript to JavaScript
npm run start # Run the compiled server
npm run lint # Run ESLint
npm run typecheck # Run TypeScript type checking
npm test # Run tests (when implemented)项目结构
pipedrive-mcp-server/
├── src/
│ ├── index.ts # Main MCP server entry point
│ ├── pipedrive-client.ts # Pipedrive API client
│ └── tools/ # Individual tool implementations
│ ├── deals.ts
│ ├── persons.ts
│ ├── organizations.ts
│ ├── pipelines.ts
│ ├── activities.ts
│ ├── notes.ts
│ └── search.ts
├── dist/ # Compiled JavaScript output
├── package.json
├── tsconfig.json
├── .eslintrc.json
└── .env.exampleAPI费率限制
Pipedrive API有速率限制。服务器适当地处理API响应,但要注意:
- 默认速率限制:每2秒80个请求
- 考虑对频繁访问的数据实施缓存
- 使用分页参数限制数据传输
错误处理
服务器提供详细的错误消息,包括:
- API身份验证失败
- 网络错误
- 无效参数
- 超出速率限制警告
贡献
欢迎投稿!请随时提交拉取请求。
许可证
MIT许可证-有关详细信息,请参阅许可证文件
支持
对于问题或疑问:
- 在GitHub上创建问题
- 检查Pipedrive API文档:https://developers.pipedrive.com/docs/api/v1
致谢
- 专为配合使用而设计 克劳德桌面
- 使用 模型上下文协议
- 与集成 Pipedrive CRM
