Paychex MCP服务器

Paychex MCP服务器是一个与Paychex开发者API文档交互的演示项目,支持多种LLM提供商处理Paychex文档查询。

  • by ryanemitchell
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 ryanemitchell/paychex-mcp-server

使用说明

Paychex MCP服务器

该项目是一个演示MCP(机器上下文协议)服务器,与Paychex Developer API文档交互。它允许与各种LLM(语言学习模型)集成,以处理对Paychex文档的查询。

特性

  • 连接Paychex开发者API文档
  • 支持多个LLM提供商(OpenAI、Anthropic等)
  • 基于环境的安全密钥管理配置
  • 用于使用LLM查询Paychex数据的RESTful API端点

设置

  1. 克隆此存储库
  2. 安装依赖项
    npm install
    
  3. 创建一个 .env 文件基于 .env.example
    cp .env.example .env
    
  4. 编辑 .env 使用API密钥文件

环境变量

此项目使用环境变量进行配置。创建一个 .env 根目录中的文件,包含以下变量:

# Server configuration
PORT=3000

# Paychex API keys
PAYCHEX_API_KEY=your_api_key_here
PAYCHEX_CLIENT_ID=your_client_id_here
PAYCHEX_CLIENT_SECRET=your_client_secret_here

# LLM configuration
LLM_TYPE=openai  # Options: openai, anthropic, azure, etc.
LLM_API_KEY=your_llm_api_key_here
OPENAI_API_KEY=your_openai_key_here
ANTHROPIC_API_KEY=your_anthropic_key_here

用法

发展

npm run dev

生产

npm start

API终点

获取Paychex数据

GET /api/paychex/data?endpoint=optional_endpoint_path

返回Paychex API文档中的原始数据。

使用LLM查询

POST /api/paychex/query

主体:

{
  "query": "What are the available Paychex APIs?",
  "endpoint": "optional_endpoint_path"
}

使用配置的LLM处理对Paychex文档的查询。

延伸

添加新的LLM提供者

要添加对新LLM提供程序的支持,请执行以下操作:

  1. 在中添加新的服务类 services/llm.js
  2. 更新 getLLMService() 处理新提供者的函数
  3. 将必要的环境变量添加到 .env.example

免责声明

这只是一个示范项目。它与Paychex没有正式联系或认可。