opinet-mcp
opinet-mcp
韓国石油公社 Opinet の燃料価格情報無料APIを、Claude / Claude CodeなどのMCPクライアントで使用できるようにするMCPサーバーです。
言語: TypeScript (ESM)
SDK:
@modelcontextprotocol/sdkトランスポート: stdio
呼び出し制限: 1,500回/日 (Opinetのポリシー)
事前準備
Opinet無料API でAPIキーを発行
Node.js 18以上 (グローバル
fetchを使用)
Related MCP server: realestate-mcp
インストール & 実行 — 3つの方法
方法 1. npxで即時実行 (推奨 · 別途インストール不要)
npmレジストリにpublish後に使用可能。publishは以下の「配布」セクションを参照。
OPINET_API_KEY=발급키 npx -y opinet-mcp方法 2. グローバルインストール
npm install -g opinet-mcp
OPINET_API_KEY=발급키 opinet-mcp方法 3. ソースクローン (開発 / private使用)
git clone https://github.com/KimJintak/opinet-mcp.git
cd opinet-mcp
npm install
npm run build
OPINET_API_KEY=발급키 node dist/index.jsMCPクライアント登録
Claude Desktop / Claude Code
設定ファイルの場所:
OS | パス |
macOS |
|
Windows |
|
Linux |
|
A. npx方式 (最も簡単 — publish後に使用)
{
"mcpServers": {
"opinet": {
"command": "npx",
"args": ["-y", "opinet-mcp"],
"env": {
"OPINET_API_KEY": "발급받은_키"
}
}
}
}B. グローバルインストール方式
{
"mcpServers": {
"opinet": {
"command": "opinet-mcp",
"env": {
"OPINET_API_KEY": "발급받은_키"
}
}
}
}C. ローカルビルド方式 (ソースクローンした場合)
{
"mcpServers": {
"opinet": {
"command": "node",
"args": ["/절대/경로/opinet-mcp/dist/index.js"],
"env": {
"OPINET_API_KEY": "발급받은_키"
}
}
}
}⚠️ Claude DesktopはPATHを限定的に継承します。
command: "node"または"npx"で実行時に見つからない場合は、絶対パス(/opt/homebrew/bin/node,/usr/local/bin/npxなど)で指定してください。ターミナルでwhich node/which npxを実行して確認してください。
設定後、Claude Desktopを完全に終了(Cmd+Q) → 再起動すると、ツールアイコンから6つのツールを確認できます。
他のMCPクライアント (Cursor, Cline, Continueなど)
上記のJSON構造と同じように、各クライアントのMCPサーバー設定ファイルに追加すれば使用できます。
提供ツール (6種)
Tool name | Opinetエンドポイント | 説明 |
|
| 全国のガソリンスタンド平均価格 (現在) |
|
| 市道別のガソリンスタンド平均価格 (現在) |
|
| 直近7日間の全国日次平均価格 (トレンド) |
|
| 全国/地域別の最安値ガソリンスタンドTOP20 |
|
| KATEC座標基準の半径内ガソリンスタンド検索 |
|
| ガソリンスタンドID(UNI_ID)で詳細情報を照会 |
共通コード
製品コード (prodcd)
コード | 製品 |
| 普通ガソリン |
| 自動車用軽油 |
| 高級ガソリン |
| 灯油 |
| 自動車用ブタン |
市道コード (sido / area 2桁)
コード | 地域 | コード | 地域 |
01 | ソウル | 10 | 釜山 |
02 | 京畿 | 11 | 済州 |
03 | 江原 | 12 | 大邱 |
04 | 忠北 | 13 | 仁川 |
05 | 忠南 | 14 | 光州 |
06 | 全北 | 15 | 大田 |
07 | 全南 | 16 | 蔚山 |
08 | 慶北 | 17 | 世宗 |
09 | 慶南 |
市郡区単位は4桁コードです (例:
0207= 京畿道光明市)。OpinetのareaCode.doエンドポイントで別途照会可能です。
座標系に関する注意点
search_stations_around の入力座標(x, y)とすべてのレスポンスの GIS_X_COOR / GIS_Y_COOR は KATEC座標系 です。WGS84(緯度経度)とは異なるため、緯度経度を入力として受け取る場合は、クライアント側でKATECに変換してから呼び出してください。
使用例 (自然言語)
"今日の全国のガソリン平均価格を教えて" →
get_national_average_price"ソウルの市道別平均軽油価格" →
get_sido_average_price(sido=01,prodcd=D047)"直近7日間のガソリン価格トレンド" →
get_recent_7days_price(prodcd=B027)"光明市で最も安いガソリンスタンド5軒" →
get_lowest_price_top20(prodcd=B027,area=0207,cnt=5)"ガソリンスタンドID A0008322の詳細情報" →
get_station_detail
動作確認 (スモークテスト)
APIキーなしで実行 → 環境変数の案内後に終了すればビルドOK:
node dist/index.jsAPIキーがある場合、stdioで直接呼び出し:
export OPINET_API_KEY=발급키
# 등록된 툴 목록 확인
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node dist/index.js
# 전국 평균가격 호출
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_national_average_price","arguments":{}}}' | node dist/index.js開発
npm install
npm run dev # tsc --watch
npm run build # 한 번 빌드
npm start # dist/index.js 실행
npm run clean # dist 삭제プロジェクト構造:
opinet-mcp/
├── src/
│ └── index.ts # MCP 서버 본체
├── dist/ # 빌드 결과물 (배포 대상)
├── package.json
├── tsconfig.json
├── README.md
└── LICENSE配布 (npm publish)
初回publish時:
# 1) npm 로그인
npm login
# 2) package.json의 author / repository / name 확인 (필요하면 scoped: @yourname/opinet-mcp)
# 3) 빌드 + publish (prepublishOnly에서 자동 빌드됨)
npm publish
# scoped 패키지면
npm publish --access public以降のバージョンアップ:
npm version patch # 0.1.0 -> 0.1.1
npm publishpublish後は誰でも npx -y opinet-mcp で即時使用可能です。
prepareスクリプトがあるため、npm install時に自動ビルドされます。つまり、GitHubから直接インストール (npm i github:KimJintak/opinet-mcp) しても動作します。
ライセンス
MIT.
データソースは韓国石油公社Opinetであり、データ使用時は Opinet利用規約 に従ってください。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
get_lowest_price_top20 - First observed
get_national_average_price - First observed
get_recent_7days_price - First observed
get_sido_average_price - First observed
get_station_detail
TDQS
Scored across 5 tools
Each tool targets a distinct data view (cheapest stations, national average, historical trends, regional averages, single station details). While all relate to fuel prices, the scope filters (top20, 7-day history, sido codes) create clear boundaries.
All tools use consistent snake_case with a 'get_' verb prefix followed by descriptive noun phrases (lowest_price_top20, national_average_price, etc.). The pattern is predictable throughout.
Five tools cover the essential read-only queries for a fuel price information service without bloat. The scope is well-contained, though an additional search-by-radius or brand filter could round it out.
Core price discovery workflows are covered: finding cheap stations, checking averages at national/regional levels, viewing trends, and drilling into station details. Minor gaps include no brand-specific queries or historical data beyond 7 days.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Real-time fuel prices, alerts, and cheapest gas stations across 38+ countries.
Gas and fuel prices by station and area, as structured data via a hosted MCP server.
- mcpweaveOAuthcom.mcpweave
Korea-native MCP gateway: Korean commerce, payments, messaging, gov & finance APIs for AI agents.
Korean fact-verification tools for AI agents: business registration, address, DART, apt prices, laws
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables natural language querying of Korean statistical data from KOSIS, including population, employment, GDP, housing prices, and more, with support for regional and trend analysis.86116MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying Korean apartment sales and rental transaction data from the public data portal through natural language, with tools for searching transactions and computing price statistics.4MIT
- FlicenseNot gradedqualityBmaintenanceFinds the cheapest gas stations along a travel route in Korea using Kakao Navigation and Opinet APIs.-
- AlicenseNot gradedqualityDmaintenanceEnables AI to query real-time Korean public data including weather, real estate prices, air quality, economic indicators, and business registration via natural language.1MIT