fiscal-api-mcp
fiscal-api-mcp
国家财政 API MCP 服务器 — 为 AI 智能体提供预算、决算及财政项目数据。
数据源
来源 | 内容 | 所需密钥 |
openfiscaldata.go.kr | 财政项目·预算·决算·部门现状 | OPENFISCAL_API_KEY (必填) |
data.go.kr | 各领域·各部门预算现状 | DATAGOKR_API_KEY (选填) |
nabostats.go.kr | 财政总量·税收负担率·国家债务 | NABOSTATS_API_KEY (选填) |
Related MCP server: narajangteo-pro
API 密钥申请
OPENFISCAL_API_KEY (必填)
注册 / 登录
我的页面 → 申请 OpenAPI
将获取的密钥输入到
.env文件中
DATAGOKR_API_KEY (选填)
访问 data.go.kr
注册 / 登录
我的页面 → 申请 API 使用
将获取的密钥输入到
.env文件中
NABOSTATS_API_KEY (选填)
访问 nabo.go.kr
注册 / 登录
申请 OpenAPI
将获取的密钥输入到
.env文件中
快速开始
git clone https://github.com/yangheeseok1/fiscal-api-mcp
cd fiscal-api-mcp
npm install
cp .env.example .env
# .env 파일을 열어 API 키 입력
npm run buildClaude Desktop 设置
在 Claude Desktop 配置文件 (claude_desktop_config.json) 中添加以下内容。
配置文件路径:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"fiscal-api-mcp": {
"command": "node",
"args": ["C:/경로/fiscal-api-mcp/dist/index.js"],
"env": {
"OPENFISCAL_API_KEY": "your_key_here",
"DATAGOKR_API_KEY": "your_key_here",
"NABOSTATS_API_KEY": "your_key_here"
}
}
}
}请将
args路径修改为您实际的项目路径。 如果没有选填密钥 (DATAGOKR_API_KEY,NABOSTATS_API_KEY),可以删除相应行。
设置完成后重启 Claude Desktop,工具即可激活。
工具 (7个)
工具 | 说明 |
| 财政项目搜索·执行现状 (核心) |
| 预算案查询 |
| 决算查询 |
| 部门财政现状 |
| 财政统计 (NABOSTATS) |
| API 目录探索 |
| 直接 API 调用 |
使用示例
在 Claude Desktop 中,您可以像下面这样用自然语言提问:
2024년 교육부 예산이 얼마야?
R&D 재정사업 집행현황 보여줘
2015년부터 2024년까지 국가채무 추이 알려줘
기재부 소관 재정사업 목록 뽑아줘
2023년 세출결산에서 집행률이 가장 낮은 부처는?Available Tools
3 toolsfiscal_guideA
열린재정 OpenAPI 전체 카탈로그(157개)를 카테고리별로 안내합니다. category 없이 호출하면 카테고리 요약을 반환합니다. category를 지정하면 해당 카테고리의 전체 API 목록(코드·이름·필수파라미터)을 반환합니다. 데이터를 찾을 때: fiscal_guide → fiscal_search → fiscal_query 순서로 사용하세요.
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | 카테고리 지정 시 해당 API 전체 목록 반환. 생략 시 카테고리 요약만 반환. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It clearly describes behavior: returns category summary without parameter, full API list with parameter. No destructive or hidden side effects implied. Lacks mention of rate limits or authentication, but not critical for a guide tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Four short, focused sentences. First sentence states main function. Second and third detail parameter behavior. Last gives usage order. No redundant information. Perfectly front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a guide tool with no output schema and one optional parameter, description fully covers what it returns in both cases and how it fits with siblings. No gaps given the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema already has 100% coverage with enum values and description. Description adds context: without category, returns summary; with category, returns API list. This adds meaningful usage context beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states that the tool lists 157 OpenAPI items categorized, and specifies behavior with and without the category parameter. It distinguishes from siblings by recommending a usage order (fiscal_guide → fiscal_search → fiscal_query), showing unique role as a guide.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use (category summary or full API list) and not to use (data search/fetch, which are for fiscal_search and fiscal_query). Provides a clear ordering recommendation, helping AI agent decide correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fiscal_queryB
열린재정 API를 호출해 데이터를 조회합니다. api_code는 fiscal_search 또는 fiscal_guide로 먼저 확인하세요. page_size 기본값은 100입니다 (최대 1000).
| Name | Required | Description | Default |
|---|---|---|---|
| api_code | Yes | API 코드 (fiscal_search로 확인) | |
| params | No | 쿼리 파라미터 (예: {FSCL_YY: 2024, OFFC_NM: '교육부'}) | |
| page | No | 페이지 번호 (기본: 1) | |
| page_size | No | 페이지당 건수 (기본: 100, 최대: 1000) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility for behavioral disclosure. It mentions default page_size and max, but fails to describe whether the tool is read-only, the nature of the API call (e.g., HTTP GET vs POST), error handling, or rate limits. For a data query tool, 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise (three sentences), front-loads the main purpose, and uses bullet points effectively. However, the first line could be slightly more specific about the kind of data (e.g., fiscal data). Overall efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 4 parameters, 1 required, and no output schema, the description adequately covers the basic usage. But it lacks details about return structure, error scenarios, and pagination behavior beyond page_size. It meets minimum viability but is not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds no additional parameter information aside from the default page_size, which is already present in the schema. It adds minimal value beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool queries the '열린재정' API to retrieve data. It specifies the action (querying), resource (API), and distinguishes from siblings by mentioning that the api_code should be checked via fiscal_search or fiscal_guide, implying it is a general-purpose query tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance: users must first use fiscal_search or fiscal_guide to obtain the api_code. It also notes the default page_size of 100 (max 1000). However, it does not specify when not to use this tool or provide alternatives for other scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fiscal_searchA
키워드 또는 카테고리로 열린재정 API를 검색합니다. 검색 결과에서 code를 확인한 뒤 fiscal_query로 데이터를 호출하세요. 예: fiscal_search(keyword="국가채무") → code 확인 → fiscal_query(api_code=..., params={...})
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | No | 검색 키워드 (예: 국가채무, 교부세, 재정상태표, 추경) | |
| category | No | 카테고리 필터: budget(예산) / settlement(결산·재무제표) / execution(집행) / stats(재정통계) / project(총사업비) / levy(부담금) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries burden. It mentions the search returns results with 'code' but does not specify response structure, pagination, or error handling. However, it provides enough context for agent to understand it's a search/discovery step.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, no fluff. Front-loaded with purpose, then usage instruction, then concrete example. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description is self-contained for a search tool that feeds into a sibling tool. The example bridges the gap, making the workflow complete. No return type explanation needed as it's meant to be interim.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and description enriches parameters with examples (keyword: '국가채무') and explicit enum values with translations. The category descriptions and enum values are well explained in schema, but description adds workflow context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it searches '열린재정 API' by keyword or category, specifying the resource and action. It differentiates from siblings by instructing to check 'code' and then call fiscal_query for data retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use (to search and find a code) and when to use fiscal_query instead (to fetch data with the code). Provides an example workflow with fiscal_search → code → fiscal_query.
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.
3 tool updates
v0.1.0- First observed
fiscal_guide - First observed
fiscal_query - First observed
fiscal_search
TDQS
Scored across 3 tools
Each tool has a clear, distinct purpose: fiscal_guide for catalog navigation, fiscal_search for finding APIs, and fiscal_query for data retrieval. The documentation explicitly specifies the recommended order of use, eliminating ambiguity.
All names use snake_case with a consistent 'fiscal_' prefix, following a verb-like pattern (guide, search, query). Slight deviation: 'fiscal_guide' is more noun-like than verb-like, but overall pattern is coherent.
Three tools is perfectly scoped for a data API server: one for exploration, one for search, and one for direct query. Each tool serves a necessary function without redundancy.
The tool set covers the full workflow from discovering APIs (guide), to finding specific endpoints (search), to fetching data (query). There are no obvious gaps for the stated purpose of accessing the 열린재정 OpenAPI.
Maintenance
Related MCP Connectors
Korean fact-verification tools for AI agents: business registration, address, DART, apt prices, laws
US government data as clean JSON for AI agents: SAM.gov contract opportunities, USAspending awards, Grants.gov grants, House STOCK Act trades, and SEC EDGAR filings (Form 4 insider trades, 8-K events, 13F holdings, 13D/G stakes, XBRL fundamentals, 10-K/10-Q sections). 19 read-only tools. Data is as fresh as each source publishes; congressional trades lag up to 45 days and report dollar ranges (House only). Free tier, no card.
- mcpweaveOAuthcom.mcpweave
Korea-native MCP gateway: Korean commerce, payments, messaging, gov & finance APIs for AI agents.
Powerful OpenDART API-based Korean corporate disclosure tools for accounting professionals
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query Korean listed companies' financial statements, public disclosures, executive information, and shareholder structures in real-time using the DART API.2-
- AlicenseAqualityDmaintenanceIntegrates 6 Korean public procurement APIs to search, analyze, and manage procurement data using natural language.83MIT
- 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
- AlicenseAqualityDmaintenanceEnables AI agents to verify Korean business registration status, tax type, and invoice eligibility using the NTS public data API via 5 tools.536 npmMIT