Skip to main content
Glama

gBizINFO MCP Server

by koizumikento

gBizINFO MCP

gBizINFO 情報提供 API を TypeScript ライブラリおよび Model Context Protocol サーバーとして提供します。サービス層で gBizINFO を呼び出し、MCP では各種取得・検索機能をツールとして公開します。

要件

  • Node.js 18+(fetch を使用)

セットアップ

  1. 依存関係をインストール
    npm i
  2. .env をプロジェクトルートに作成し、以下を設定
    GBIZINFO_API_TOKEN=あなたのAPIトークン # 任意(デフォルト: https://info.gbiz.go.jp/hojin/v1/hojin) GBIZINFO_BASE_URL=https://info.gbiz.go.jp/hojin/v1/hojin # 任意(ミリ秒, 既定 15000) REQUEST_TIMEOUT_MS=15000 # 任意(リトライ回数, 既定 1) GBIZINFO_RETRIES=1

メモ:

  • 認証ヘッダは仕様通り X-hojinInfo-api-token が自動付与されます(src/services/http.ts)。

OpenAPI スキーマとクライアント生成(任意)

公式 Swagger UI からスキーマを取得し、必要に応じて TypeScript クライアントを生成できます。

  1. Swagger UI から JSON を取得し openapi/raw/gbizinfo-openapi.json へ保存
  2. YAML に変換し openapi/gbizinfo-openapi.yaml へ保存
  3. クライアント生成
    npm run generate:client
    生成先: src/clients/gbizinfo

ライブラリの使い方

GbizinfoService を直接利用できます。

import { GbizinfoService } from "gbixnfo-mcp"; const service = new GbizinfoService(); // 企業検索(複合条件) const result = await service.searchCompanies({ name: "テスト", prefecture: "東京都", page: 1, limit: 20, }); // 法人番号で詳細取得 const basic = await service.getBasicInfo("0000000000000");

エクスポートは src/index.ts を参照(GbizinfoService, HttpClient, presenters, models など)。

MCP サーバーの使い方

ローカル実行(Cursor 連携)

  1. ビルド
    npm run build
  2. Cursor 設定(Settings → MCP → Add Server)
    • Type: Command
    • Command: node
    • Args: dist/mcp/server.js
    • Working Directory: プロジェクトルート
    • Environment: GBIZINFO_API_TOKEN=...

npx で起動(公開後)

npx --yes -p gbixnfo-mcp gbizinfo-mcp

提供ツール

  • search: 企業検索(複合条件: name/corporateNumber/corporateType/existFlg/prefecture/city/address/industry/capitalStockFrom/capitalStockTo/employeeNumberFrom/employeeNumberTo/establishmentFrom/establishmentTo/from/size
  • get_basic_info: 基本情報取得(法人番号)
  • get_certification: 届出・認定情報
  • get_commendation: 表彰情報
  • get_finance: 財務情報
  • get_patent: 特許情報
  • get_procurement: 調達情報
  • get_subsidy: 補助金情報
  • get_workplace: 職場情報

開発

  • ウォッチ実行(簡易ランナー)
    npm run dev
  • ビルド
    npm run build

設計(MCP アーキテクチャ)

  • エントリポイント: src/index.ts
  • 環境/設定: src/config.ts
  • MCP サーバー: src/mcp/server.ts
  • 層構造:
    • Model: src/model
    • Controller: src/controller
    • Presenter: src/presenter
    • Service: src/services

セキュリティ/設定、OpenAPI クライアント生成の詳細は .cursor/rules のルール(openapi-client など)を参照してください。

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Enables users to search and retrieve Japanese corporate information from the gBizINFO API. Supports company searches by name, corporate number, industry, location, and other criteria, plus access to detailed business data including financials, certifications, and workplace information.

  1. 要件
    1. セットアップ
      1. OpenAPI スキーマとクライアント生成(任意)
        1. ライブラリの使い方
          1. MCP サーバーの使い方
            1. ローカル実行(Cursor 連携)
            2. npx で起動(公開後)
            3. 提供ツール
          2. 開発
            1. 設計(MCP アーキテクチャ)

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                This server enables users to perform Google News searches with automatic categorization and multi-language support via SerpAPI integration.
                Last updated -
                1
                682
                73
                JavaScript
                MIT License
              • A
                security
                A
                license
                A
                quality
                Enables interaction with the French business search API from data.gouv.fr, allowing users to search for French companies by text or geographical criteria and access essential business information.
                Last updated -
                2
                3
                9
                TypeScript
                MIT License
              • -
                security
                A
                license
                -
                quality
                A FastAPI-based microservice that analyzes job URLs and extracts detailed company information by crawling job postings and company websites, with data enrichment from external providers.
                Last updated -
                Python
                MIT License
              • -
                security
                A
                license
                -
                quality
                Provides Japanese postal code to address lookup functionality that can be integrated with AI assistants and other MCP clients.
                Last updated -
                3
                Python
                MIT License

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/koizumikento/gbixnfo-mcp'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server