opinet-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@opinet-mcpwhat's the average gasoline price in seoul today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
opinet-mcp
This is an MCP server that allows you to use the Korea Petroleum Corporation's Opinet fuel price information free API in MCP clients such as Claude / Claude Code.
Language: TypeScript (ESM)
SDK:
@modelcontextprotocol/sdkTransport: stdio
Call limit: 1,500 calls/day (Opinet policy)
Prerequisites
Get an API Key from Opinet Free API
Node.js 18 or higher (uses global
fetch)
Related MCP server: realestate-mcp
Installation & Execution — 3 Methods
Method 1. Run immediately with npx (Recommended · No separate installation required)
Available after publishing to the npm registry. See the "Deployment" section below for publishing.
OPINET_API_KEY=발급키 npx -y opinet-mcpMethod 2. Global installation
npm install -g opinet-mcp
OPINET_API_KEY=발급키 opinet-mcpMethod 3. Clone source (For development / private use)
git clone https://github.com/KimJintak/opinet-mcp.git
cd opinet-mcp
npm install
npm run build
OPINET_API_KEY=발급키 node dist/index.jsMCP Client Registration
Claude Desktop / Claude Code
Configuration file location:
OS | Path |
macOS |
|
Windows |
|
Linux |
|
A. npx method (Easiest — use after publishing)
{
"mcpServers": {
"opinet": {
"command": "npx",
"args": ["-y", "opinet-mcp"],
"env": {
"OPINET_API_KEY": "발급받은_키"
}
}
}
}B. Global installation method
{
"mcpServers": {
"opinet": {
"command": "opinet-mcp",
"env": {
"OPINET_API_KEY": "발급받은_키"
}
}
}
}C. Local build method (If source is cloned)
{
"mcpServers": {
"opinet": {
"command": "node",
"args": ["/절대/경로/opinet-mcp/dist/index.js"],
"env": {
"OPINET_API_KEY": "발급받은_키"
}
}
}
}⚠️ Claude Desktop has limited inheritance of PATH. If it cannot find the command when running with
command: "node"or"npx", specify the absolute path (e.g.,/opt/homebrew/bin/node,/usr/local/bin/npx). Check withwhich node/which npxin the terminal.
After configuration, completely quit Claude Desktop (Cmd+Q) → Relaunch, and you will see 6 tools in the tool icon.
Other MCP Clients (Cursor, Cline, Continue, etc.)
You can add it to the MCP server configuration file of each client in the same way as the JSON structure above.
Provided Tools (6 types)
Tool name | Opinet endpoint | Description |
|
| National average gas station price (current) |
|
| Average gas station price by province (current) |
|
| Daily national average price for the last 7 days (trend) |
|
| TOP 20 lowest-priced gas stations by nation/region |
|
| Search for gas stations within a radius based on KATEC coordinates |
|
| View detailed information by gas station ID (UNI_ID) |
Common Codes
Product Code (prodcd)
Code | Product |
| Regular Gasoline |
| Automotive Diesel |
| Premium Gasoline |
| Indoor Kerosene |
| Automotive Butane |
Province Code (sido / area 2 digits)
Code | Region | Code | Region |
01 | Seoul | 10 | Busan |
02 | Gyeonggi | 11 | Jeju |
03 | Gangwon | 12 | Daegu |
04 | Chungbuk | 13 | Incheon |
05 | Chungnam | 14 | Gwangju |
06 | Jeonbuk | 15 | Daejeon |
07 | Jeonnam | 16 | Ulsan |
08 | Gyeongbuk | 17 | Sejong |
09 | Gyeongnam |
The city/county/district unit is a 4-digit code (e.g.,
0207= Gyeonggi Gwangmyeong-si). Can be queried separately via the OpinetareaCode.doendpoint.
Coordinate System Notes
The input coordinates (x, y) for search_stations_around and the GIS_X_COOR / GIS_Y_COOR in all responses are in the KATEC coordinate system. They are different from WGS84 (latitude/longitude), so if you want to receive latitude/longitude as input, convert them to KATEC in the client before calling.
Usage Examples (Natural Language)
"Tell me today's national average gasoline price" →
get_national_average_price"Average diesel price in Seoul" →
get_sido_average_price(sido=01,prodcd=D047)"Gasoline trend for the last 7 days" →
get_recent_7days_price(prodcd=B027)"5 cheapest gas stations for gasoline in Gwangmyeong-si" →
get_lowest_price_top20(prodcd=B027,area=0207,cnt=5)"Detailed info for gas station ID A0008322" →
get_station_detail
Verification (Smoke Test)
Run without an API key → If it guides you to environment variables and exits, the build is OK:
node dist/index.jsWhen you have an API key, call directly via 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.jsDevelopment
npm install
npm run dev # tsc --watch
npm run build # 한 번 빌드
npm start # dist/index.js 실행
npm run clean # dist 삭제Project structure:
opinet-mcp/
├── src/
│ └── index.ts # MCP 서버 본체
├── dist/ # 빌드 결과물 (배포 대상)
├── package.json
├── tsconfig.json
├── README.md
└── LICENSEDeployment (npm publish)
When publishing for the first time:
# 1) npm 로그인
npm login
# 2) package.json의 author / repository / name 확인 (필요하면 scoped: @yourname/opinet-mcp)
# 3) 빌드 + publish (prepublishOnly에서 자동 빌드됨)
npm publish
# scoped 패키지면
npm publish --access publicVersion update afterwards:
npm version patch # 0.1.0 -> 0.1.1
npm publishAfter publishing, anyone can use it immediately with npx -y opinet-mcp.
There is a
preparescript, so it builds automatically uponnpm install. This means it also works if installed directly from GitHub (npm i github:KimJintak/opinet-mcp).
License
MIT.
The data source is the Korea Petroleum Corporation Opinet, and please follow the Opinet Terms of Service when using the data.
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