Back to MCP directory
publicPublicdnsLocal runtime

google-patents-mcp

该项目提供了一个基于SerpApi的Google专利搜索MCP服务器,允许用户通过MCP协议查询专利信息,支持多种搜索参数和过滤条件。

article

README

🚀 谷歌专利项目 MCP 服务器文档

这是一个用于访问 Google Patents 数据的服务器端工具。借助该服务器,你可以使用 SerpApi 接口开展专利搜索,还支持自定义参数和过滤器。

🚀 快速开始

安装

  1. 克隆仓库:
git clone <repository-url>
cd google-patents-mcp
  1. 安装依赖:
npm install
  1. 创建配置文件 .env(参考 .env.example)并添加 SERPAPI_API_KEY

运行

  1. 构建项目:
npm run build
  1. 启动服务:
npm start

或者在开发环境中使用自动重建功能:

npm run dev

✨ 主要特性

  • 支持使用 SerpApi 接口进行专利搜索。
  • 可自定义参数和过滤器。
  • 提供多种运行模式,支持开发环境的自动重建。

📦 安装指南

克隆仓库

git clone <repository-url>
cd google-patents-mcp

安装依赖

npm install

配置环境

创建配置文件 .env(参考 .env.example)并添加 SERPAPI_API_KEY

💻 使用示例

搜索接口示例

{
  "method": "POST",
  "path": "/api/search",
  "body": {
    "query": string,
    "num": integer,
    "language": string,
    "status": ["GRANT", "APPLICATION"],
    "after": string,
    "before": string,
    "inventor": string,
    "assignee": string,
    "country": string,
    "type": ["PATENT", "DESIGN"],
    "scholar": boolean
  }
}

搜索结果示例

{
  "organicResults": {
    "items": [
      {
        "title": string,
        "link": string,
        "snippet": string,
        "patentNumber": string,
        "publicationDate": string,
        "filingDate": string,
        "status": string,
        "type": string,
        "inventors": [string],
        "assignees": [string]
      }
    ],
    "totalResults": integer
  }
}

📚 详细文档

服务器配置

  • 端口:默认为 3000,可自定义。
  • 日志文件:尝试保存在项目根目录、用户主目录或 /tmp 目录下。

日志记录

  • 输出到标准错误。
  • 日志级别可通过 LOG_LEVEL 环境变量控制(默认为 info)。
  • 支持的级别:error, warn, info, http, verbose, debug, silly

依赖项

  • express:HTTP 服务框架。
  • dotenv:加载环境变量。
  • winston:日志库。

📄 许可证

本项目采用 MIT License(详见 LICENSE 文件)。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client