Skip to main content
Glama
KunihiroS

Google Patents MCP Server

by KunihiroS

Сервер Google Patents MCP ( google-patents-mcp )

значок кузнеца npm-версия

Этот проект предоставляет сервер Model Context Protocol (MCP), который позволяет осуществлять поиск информации о патентах Google через API SerpApi Google Patents .

Установка через Smithery

Чтобы автоматически установить Google Patents MCP Server для Claude Desktop через Smithery :

npx -y @smithery/cli install @KunihiroS/google-patents-mcp --client claude

Журнал изменений

v0.2.0 (2025-04-17)

  • Исправление: Реализованы пустые обработчики для методов MCP resources/list и prompts/list .

  • Исправление: Объявлена возможность prompts при инициализации сервера.

  • Задача: Обновление зависимостей.

Эти изменения направлены на улучшение совместимости с клиентами MCP, такими как Claude Desktop, которым могут потребоваться эти стандартные конечные точки, хотя прямое тестирование с Claude Desktop еще не проводилось.

Related MCP server: Serper MCP Server

Функции

  • Предоставляет инструмент MCP search_patents для поиска в Google Patents.

  • Использует SerpApi в качестве бэкэнда.

  • Можно запустить напрямую с помощью npx без локальной установки.

Предпосылки

  • Node.js: рекомендуется версия 18 или выше.

  • npm: Требуется для запуска команды npx .

  • Ключ API SerpApi: для использования API Google Patents вам понадобится действительный ключ API от SerpApi .

Быстрый старт (с использованием npx)

Самый простой способ запустить этот сервер — использовать npx . Эта команда загружает (при необходимости) и запускает сервер напрямую.

npx @kunihiros/google-patents-mcp

Примечание: замените @kunihiros/google-patents-mcp фактическим опубликованным именем пакета, если оно отличается.

Сервер запустится и будет прослушивать запросы MCP на стандартном вводе/выводе.

Конфигурация

Сервер требует ваш ключ API SerpApi. Вы можете предоставить его одним из следующих способов:

  1. Переменная среды (рекомендуется для хостов MCP): Установите переменную среды SERPAPI_API_KEY при запуске сервера. Конфигурации хоста MCP часто позволяют устанавливать переменные среды для серверов.

    Пример фрагмента конфигурации хоста MCP ( config.json или аналогичный):

    {
      "mcpServers": {
        "google-patents-mcp": {
          "command": "npx",
          "args": [
            "-y", // Skips confirmation if the package isn't installed locally
            "@kunihiros/google-patents-mcp" // Use the correct package name
          ],
          "env": {
            "SERPAPI_API_KEY": "YOUR_ACTUAL_SERPAPI_KEY"
            // Optional: Set log level
            // "LOG_LEVEL": "debug"
          }
        }
      }
    }
  2. Файл .env: создайте файл .env в каталоге, где вы запускаете команду npx (для локального тестирования или если не используется хост MCP), или в вашем домашнем каталоге ( ~/.google-patents-mcp.env ), со следующим содержимым:

    SERPAPI_API_KEY=YOUR_ACTUAL_SERPAPI_KEY
    # Optional: Set log level (e.g., debug, info, warn, error)
    # LOG_LEVEL=debug

    Примечание: Хотя использование файла .env удобно для локального тестирования, для производства или интеграции с хостами MCP, установка переменной среды напрямую через конфигурацию хоста является рекомендуемым и более безопасным подходом. Основной предполагаемый вариант использования — выполнение через npx , где переменные среды обычно управляются вызывающим процессом или хостом MCP.

Сервер ищет файлы .env в следующем порядке: * ./.env (относительно того места, где запущен npx ) * ~/.google-patents-mcp.env (в вашем домашнем каталоге)

Предоставленный инструмент MCP

search_patents

Поиск в Google Patents через SerpApi.

Схема ввода:

{
  "type": "object",
  "properties": {
    "q": {
      "type": "string",
      "description": "Search query (required). Although optional in SerpApi docs, a non-empty query is practically needed. Use semicolon (;) to separate multiple terms. Advanced syntax like '(Coffee) OR (Tea);(A47J)' is supported. See 'About Google Patents' for details."
    },
    "page": {
      "type": "integer",
      "description": "Page number for pagination (default: 1).",
      "default": 1
    },
    "num": {
      "type": "integer",
      "description": "Number of results per page (default: 10). **IMPORTANT: Must be 10 or greater (up to 100).**",
      "default": 10,
      "minimum": 10,
      "maximum": 100
    },
    "sort": {
      "type": "string",
      "enum": ["relevance", "new", "old"],
      "description": "Sorting method. 'relevance' (default), 'new' (newest by filing/publication date), 'old' (oldest by filing/publication date).",
      "default": "relevance"
    },
    "before": {
      "type": "string",
      "description": "Maximum date filter (e.g., 'publication:20231231', 'filing:20220101'). Format: type:YYYYMMDD where type is 'priority', 'filing', or 'publication'."
    },
    "after": {
      "type": "string",
      "description": "Minimum date filter (e.g., 'publication:20230101', 'filing:20220601'). Format: type:YYYYMMDD where type is 'priority', 'filing', or 'publication'."
    },
    "inventor": {
      "type": "string",
      "description": "Filter by inventor names. Separate multiple names with a comma (,)."
    },
    "assignee": {
      "type": "string",
      "description": "Filter by assignee names. Separate multiple names with a comma (,)."
    },
    "country": {
      "type": "string",
      "description": "Filter by country codes (e.g., 'US', 'WO,JP'). Separate multiple codes with a comma (,)."
    },
    "language": {
      "type": "string",
      "description": "Filter by language (e.g., 'ENGLISH', 'JAPANESE,GERMAN'). Separate multiple languages with a comma (,). Supported: ENGLISH, GERMAN, CHINESE, FRENCH, SPANISH, ARABIC, JAPANESE, KOREAN, PORTUGUESE, RUSSIAN, ITALIAN, DUTCH, SWEDISH, FINNISH, NORWEGIAN, DANISH."
    },
    "status": {
      "type": "string",
      "enum": ["GRANT", "APPLICATION"],
      "description": "Filter by patent status: 'GRANT' or 'APPLICATION'."
    },
    "type": {
      "type": "string",
      "enum": ["PATENT", "DESIGN"],
      "description": "Filter by patent type: 'PATENT' or 'DESIGN'."
    },
    "scholar": {
      "type": "boolean",
      "description": "Include Google Scholar results (default: false).",
      "default": false
    }
  },
  "required": ["q"]
}

Выход:

Возвращает объект JSON, содержащий результаты поиска из SerpApi. Структура соответствует формату ответа SerpApi.

Пример использования (запрос MCP):

{
  "mcp_version": "1.0",
  "type": "CallToolRequest",
  "id": "req-123",
  "server_name": "google-patents-mcp",
  "params": {
    "name": "search_patents",
    "arguments": {
      "q": "organic light emitting diode",
      "num": 10,
      "language": "ENGLISH",
      "status": "GRANT",
      "after": "publication:20230101"
    }
  }
}

Разработка

  1. Клонируйте репозиторий (если это необходимо для разработки):

    # git clone <repository-url>
    # cd google-patents-mcp
  2. Установите зависимости:

    npm install
  3. Создайте файл .env : скопируйте .env.example в .env и добавьте свой SERPAPI_API_KEY .

  4. Строить:

    npm run build
  5. Запустить локально:

    npm start

    Или для разработки с автоматической пересборкой:

    npm run dev

Ведение журнала

  • Журналы выводятся в стандартный поток ошибок.

  • Уровень журнала можно контролировать с помощью переменной среды LOG_LEVEL ( error , warn , info , http , verbose , debug , silly ). По умолчанию — info .

  • Предпринята попытка создать файл журнала в корне проекта ( google-patents-server.log ), домашнем каталоге пользователя ( ~/.google-patents-server.log ) или /tmp/google-patents-server.log .

Лицензия

Лицензия MIT (см. файл LICENSE)

Available Tools

1 tool
search_patentsC

Searches Google Patents using SerpApi. Allows filtering by date, inventor, assignee, country, language, status, type, and sorting.

ParametersJSON Schema
NameRequiredDescriptionDefault
afterNoMinimum date filter (e.g., 'publication:20230101', 'filing:20220601'). Format: type:YYYYMMDD where type is 'priority', 'filing', or 'publication'.
assigneeNoFilter by assignee names. Separate multiple names with a comma (,).
beforeNoMaximum date filter (e.g., 'publication:20231231', 'filing:20220101'). Format: type:YYYYMMDD where type is 'priority', 'filing', or 'publication'.
countryNoFilter by country codes (e.g., 'US', 'WO,JP'). Separate multiple codes with a comma (,).
inventorNoFilter by inventor names. Separate multiple names with a comma (,).
languageNoFilter by language (e.g., 'ENGLISH', 'JAPANESE,GERMAN'). Separate multiple languages with a comma (,). Supported: ENGLISH, GERMAN, CHINESE, FRENCH, SPANISH, ARABIC, JAPANESE, KOREAN, PORTUGUESE, RUSSIAN, ITALIAN, DUTCH, SWEDISH, FINNISH, NORWEGIAN, DANISH.
numNoNumber of results per page (default: 10). **IMPORTANT: Must be 10 or greater (up to 100).**
pageNoPage number for pagination (default: 1).
qYesSearch query (required). Although optional in SerpApi docs, a non-empty query is practically needed. Use semicolon (;) to separate multiple terms. Advanced syntax like '(Coffee) OR (Tea);(A47J)' is supported. See 'About Google Patents' for details.
scholarNoInclude Google Scholar results (default: false).
sortNoSorting method. 'relevance' (default), 'new' (newest by filing/publication date), 'old' (oldest by filing/publication date).relevance
statusNoFilter by patent status: 'GRANT' or 'APPLICATION'.
typeNoFilter by patent type: 'PATENT' or 'DESIGN'.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions filtering and sorting but omits critical details like rate limits, authentication needs, pagination behavior, error handling, or response format. For a search tool with 13 parameters, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and enumerates key capabilities without redundancy. Every word serves a purpose, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex search tool with 13 parameters, no annotations, and no output schema, the description is incomplete. It lacks behavioral context, usage guidelines, and details on results or errors, leaving significant gaps for agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 13 parameters. The description adds no additional parameter semantics beyond listing filter types, which are already covered in schema descriptions. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Searches Google Patents') and resource ('patents'), and mentions the service provider ('using SerpApi'). It lists key filtering capabilities, making the purpose specific and actionable. However, without sibling tools, it cannot differentiate from alternatives, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or typical use cases. It lists filtering options but lacks context on optimal scenarios or limitations, leaving the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedsearch_patents

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or confusion between tools. The single tool has a clear, distinct purpose focused on searching patents.

Naming Consistency5/5

The single tool name 'search_patents' follows a consistent verb_noun pattern. Since there is only one tool, naming consistency is inherently perfect with no deviations to assess.

Tool Count2/5

A single tool for a patents server feels thin and under-scoped. While search is a core function, the domain suggests potential for additional operations like retrieving patent details, analyzing trends, or filtering by categories, making the count too low for the apparent scope.

Completeness2/5

The tool surface is severely incomplete for a patents domain. It only provides search functionality, with obvious gaps such as retrieving full patent documents, getting metadata like citations or legal status, or managing saved searches, which limits agent workflows and causes dead ends.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol server that provides Google Jobs search capabilities through SerpAPI integration, featuring multi-language support, flexible search parameters, and rich job details.
    1
    14 npm
    23
    MIT
  • F
    license
    C
    quality
    C
    maintenance
    A Model Context Protocol server that enables LLMs to perform Google searches via the Serper API, allowing models to retrieve current information from the web.
    13
    39
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI assistants to perform web searches using Google Search API, returning up to 20 search results in JSON format.
    2
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    MCP server for patent search and prior art discovery powered by Google Patents public dataset on BigQuery. Supports searching patents, fetching full patent details with CPC codes and citations, and retrieving legal claims text.
    3
    6
    MIT