nhplug-mcp
The MCP server provides access to NH Investment & Securities Open API, enabling AI assistants to query financial data, account information, and prepare orders (execution disabled by default).
Meta tools: Discover and call any API endpoint.
list_apissearches by domain, category, or keyword;describe_apireturns input schemas;call_apiexecutes any of the 49+ REST endpoints and 27 real-time channels with automatic authentication, token handling, and envelope wrapping.Shortcut tools:
get_stock_pricereturns current price for a Korean stock code;get_stock_balanceretrieves balance for a given account;list_accountsfetches all linked accounts.Supported assets: Korean stocks (krstock) and global stocks (gbstock), extensible to other classes by adding OpenAPI specs.
Environment support: Connects to live (api.nhplug.com) and mock (moapi.nhplug.com) trading environments.
Safety: Trading/order APIs are disabled by default; AI cannot execute trades, only prepare parameters. Enable via
NHPLUG_ENABLE_TRADING=true.
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., "@nhplug-mcp삼성전자 현재가 알려줘"
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.
NH투자증권 Open API — Local MCP Server
🏛️ NH투자증권 공식 Open API(NHPLUG) 지원 저장소입니다. · 포털 www.nhplug.com · 계정 @PLUG-OpenAPI · 문의 apisupport@nhsec.com
어떻게 쓰시겠어요?
하고 싶은 일 | 방법 | 시작 |
대화로 시세·잔고 조회 (코딩 불필요) | 이 저장소 (MCP) | Claude 설정에 |
내 프로그램에 넣기 (자동매매) |
| |
예제 보며 배우기 |
|
NH투자증권 Open API 를 Claude Desktop 등 MCP 클라이언트에서 바로 사용할 수 있게 해주는 로컬 MCP 서버입니다. 국내주식(krstock)·해외주식(gbstock) 자산군의 시세·조회·주문 API 를 Claude 가 도구로 호출합니다.
인증 · 토큰 발급 · 헤더 ·
Input_0봉투 처리를 서버가 자동으로 대신합니다.REST 49개 + 실시간 27채널(국내주식 31·21 / 해외주식 18·6)을 몇 개의 메타 도구로 노출해, 도구가 많아 성능이 떨어지는 문제를 피합니다.
주문(거래) API 는 기본 비활성이며, 명시적으로 켠 경우에만 사용됩니다.
현재 버전은 국내주식(krstock)·해외주식(gbstock) 자산군을 포함합니다. 다른 자산군은
specs/폴더에 openapi.json 을 추가하면 확장됩니다(맨 아래 참고).
AI·에이전트로 개발한다면
명세 정본 — llms.txt (N2: n2plug.com/llms.txt) · 전체 문맥은 llms-full.txt
개발 규칙 — nhplug-sdk/AGENTS.md (AI IDE 가 자동 로드)
⚠️ 호출 식별자 주의 — 이 MCP 는 operationId(
krstockQuoteCurrentPrice), Python SDK 는 URI 경로(/krstock/quote/v1/currentPrice)를 씁니다. 섞어 쓰면 동작하지 않습니다.
1. 사전 요건
Node.js 18 이상 — nodejs.org 에서 설치. (
node -v로 확인.npx는 Node 에 포함)NH투자증권 Open API 앱키/시크릿 — 포털 www.nhplug.com 에서 발급.
Git — 방법 A(npx github)·방법 B(clone) 모두 필요. git-scm.com 에서 설치. (
git --version으로 확인)API 서버 네트워크 접근 — 이 MCP 는 당신 PC 에서
*.nhplug.comAPI 서버로 직접 연결합니다. 사내망 등에서만 접근 가능한 환경이라면, MCP 를 실행하는 PC 도 그 네트워크에 있어야 합니다.
Related MCP server: massive-mcp
2. 설치 및 실행
방법 A — npx로 GitHub에서 바로 실행 (권장, 설치 불필요)
별도 다운로드·빌드 없이 Claude 설정 한 줄이면 됩니다. 고객용 설정에 아래 command/args 를 씁니다(전체 설정은 3번).
"command": "npx",
"args": ["-y", "github:PLUG-OpenAPI/nhplug-mcp"]첫 실행 예열(권장): npx 는 첫 실행 때 GitHub 에서 받아 빌드하느라 1분 정도 걸립니다. Claude 가 기다리다 실패하지 않도록, 터미널에서 한 번 미리 실행해 두면 좋습니다:
npx -y github:PLUG-OpenAPI/nhplug-mcp
[nhplug-mcp] 시작됨 ...로그가 뜨면Ctrl + C로 종료. 이후 Claude 실행이 빨라집니다.업데이트 반영: npx 는 받은 코드를 캐시합니다. 새 버전을 받으려면
npm cache clean --force후 Claude 재시작.
방법 B — git clone 후 로컬 빌드
git clone https://github.com/PLUG-OpenAPI/nhplug-mcp.git
cd nhplug-mcp
npm install
npm run build빌드가 끝나면 dist/index.js 가 생성됩니다. 이 경로를 Claude 설정에 "command": "node", "args": ["<경로>/dist/index.js"] 로 등록합니다.
3. Claude Desktop 연결
Claude Desktop 설정 파일 claude_desktop_config.json 을 엽니다.
가장 쉬운 방법: Claude Desktop → 설정(Settings) → 개발자(Developer) → Edit Config 버튼.
직접 열기 — Windows:
%APPDATA%\Claude\claude_desktop_config.json· macOS:~/Library/Application Support/Claude/claude_desktop_config.json
아래 내용을 붙여넣습니다. (방법 A · GitHub npx 기준)
{
"mcpServers": {
"nhplug": {
"command": "npx",
"args": ["-y", "github:PLUG-OpenAPI/nhplug-mcp"],
"env": {
"NHPLUG_APP_KEY": "발급받은_APP_KEY",
"NHPLUG_APP_SECRET": "발급받은_APP_SECRET",
"NHPLUG_BASE_URL": "https://api.nhplug.com:8443"
}
}
}
}저장 후 Claude Desktop 을 완전히 종료(트레이 포함)했다가 다시 실행하면 nhplug 도구가 나타납니다.
N2 고객은 위
env에 두 줄을 n2plug 로 추가하세요:"NHPLUG_BASE_URL": "https://api.n2plug.com:8443","NHPLUG_AUTH_URL": "https://api.n2plug.com:8443". (개발·검증은 BASE_URL 을moapi.n2plug.com, AUTH_URL 은api.n2plug.com유지)
JSON 주의: 항목 사이엔 콤마(
,), 마지막 항목 뒤엔 콤마 없음. Windows 경로의\는\\로 두 개씩. 이미 다른 서버가 있으면"nhplug": { ... }블록만mcpServers안에 추가하세요.방법 B(로컬 빌드)를 쓰면
command를"node",args를["C:\\경로\\nhplug-mcp\\dist\\index.js"]로 바꾸면 됩니다. 키는 설정의env대신 저장소 폴더의.env파일(.env.example참고)로 넣어도 됩니다.
4. 환경변수
변수 | 필수 | 설명 |
| ✅ | 발급받은 앱키 |
| ✅ | 발급받은 앱시크릿 |
| 호출 대상 REST Base URL. 기본값 | |
| 토큰 발급 URL. 기본 | |
|
| |
| 잔고/주문 단축 도구에서 계좌번호 생략 시 사용 | |
| 사내 검증 서버 등 허용 호스트 추가(쉼표 구분). 보통 설정하지 않습니다 |
🔒
NHPLUG_BASE_URL·NHPLUG_AUTH_URL은 허용된 호스트만 통과합니다 (api/moapi×nhplug.com/n2plug.com4종). 한 글자만 틀려도 앱키·시크릿이 그대로 전송되므로, 오타가 있으면 서버가 기동하지 않고 무엇이 잘못됐는지 알려줍니다.http://(평문)와 경로가 붙은 주소도 막습니다.
접속 환경(Base URL)
환경 | URL |
🔴 실거래·운영 (Live) — 기본 |
|
🟢 모의투자 (Mock) — 교육이수·시뮬레이션 테스트 |
|
접근토큰(
/oauth2/token)은 운영(api) 전용입니다(모의투자 미제공). 호출을moapi로 하더라도 토큰은 항상api에서 발급됩니다(NHPLUG_AUTH_URL, 기본 api). MCP 는 Claude 정책상 주문을 실행하지 않으므로, 기본이 운영이어도 조회·시세만 수행합니다.
브랜드(도메인) — 나무(Namuh) / N2
API·필드는 동일하고 접속 도메인만 다릅니다. 위 예시는 나무(nhplug.com) 기준입니다.
브랜드 | 운영 | 모의투자 | 포털 |
나무(Namuh) |
|
|
|
N2 |
|
|
|
⚠️ N2 고객은 설정의
NHPLUG_BASE_URL과NHPLUG_AUTH_URL을 둘 다 n2plug 로 지정하세요. AUTH_URL 까지 안 바꾸면 토큰이 나무로 가서 실패합니다.
5. 제공 도구
도구 | 종류 | 설명 |
| 메타 | 호출 가능한 API 목록. domain/category/keyword 필터. 여기서 operationId 를 찾습니다. |
| 메타 | 특정 operationId 의 입력 필드(Input_0) 스키마 조회. |
| 메타 | operationId + 입력값으로 실제 호출. 번들에 포함된 엔드포인트 전부 커버. |
| 단축 | 국내주식 현재가 (종목코드만 입력). |
| 단축 | 국내주식 계좌 잔고. |
| 단축 | 보유 계좌 목록 조회 (잔고·주문 전 계좌번호 확보용, |
동작 흐름(메타 도구): list_apis 로 원하는 API 를 찾고 → describe_api 로 입력값을 확인한 뒤 → call_api 로 호출합니다. 자주 쓰는 현재가·잔고는 단축 도구로 한 번에 호출할 수 있습니다.
사용 예시 프롬프트
"삼성전자(005930) 현재가 알려줘" →
get_stock_price"국내주식 시세 관련 API 목록 보여줘" →
list_apis"krstockQuoteCurrentDaily 는 어떤 입력이 필요해?" →
describe_api"내 계좌 목록 보여줘" →
list_accounts"내 계좌 20101234567 잔고 조회해줘" →
get_stock_balance(계좌번호는 예시)
6. 주문(거래)에 대하여 ⚠️
중요 — 대화형 AI 는 실제 주문을 대신 체결하지 않습니다. Claude 등 AI 어시스턴트는 안전정책상 사용자를 대신해 증권 주문을 실행하지 않습니다. 이는 MCP 설정(
NHPLUG_ENABLE_TRADING)이나 환경과 무관한 모델 자체의 동작이라, 서버에서 끌 수 없습니다.따라서 이 MCP 는 시세·계좌 조회, 분석, 주문 파라미터 준비까지 담당하고, 실제 매수/매도 실행은 코드로 하세요:
파이썬 개발·자동매매:
nhplug-sdk주문 API 단발 테스트(사람이 직접 실행):
node scripts/order_test.mjs --account <계좌> --code 005930 --qty 1 --price 70000 --confirm
NHPLUG_ENABLE_TRADING=true 설정은 주문 API 를 도구 목록에 노출만 합니다(설계·검증용). 실행은 위 코드 경로를 사용하세요.
기본값
false이면 주문 API 는list_apis에 표시되지 않고call_api로도 거부됩니다.주문 관련 작업은 반드시 모의투자 환경(
moapi) 에서 충분히 검증 후 진행하세요.
7. 연결 검증 (self-test)
Claude 에 붙이기 전에, API 서버 접근·인증이 정상인지 로컬에서 먼저 확인할 수 있습니다.
# .env 에 APP_KEY / APP_SECRET / BASE_URL 을 채운 뒤
node scripts/selftest.mjs토큰 발급 → 삼성전자 현재가 조회까지 성공하면 전체 검증 통과 ✅ 가 출력됩니다.
8. 문제 해결
증상 | 원인 / 해결 |
| 설정의 |
| API 서버에 접근 불가. 사내망/방화벽/URL 확인 |
| 앱키·시크릿 오류 또는 해당 환경 미허용 |
| 캐시된 토큰 만료·무효. 자동으로 재발급 후 1회 재시도하므로 대개 그대로 성공. 반복되면 키·환경 확인 |
| HTTP 는 200 이지만 업무 오류입니다. 성공 코드는 |
| 호출 유량 초과(실측 초당 5회 수준). 자동 재시도하지 않습니다 — 잠시 후 다시 요청하세요 |
Claude 에 도구가 안 보임 | 설정 저장 후 Claude Desktop 완전 종료 후 재시작 |
주문 도구가 안 보임 | 의도된 동작. |
로그는 표준오류(stderr)로 출력됩니다: [nhplug-mcp] 시작됨 · baseUrl=... · trading=...
9. 자산군 확장
스펙 정본은 도메인(https://www.nhplug.com/openapi-docs/<자산>/openapi.json)입니다. 번들(specs/)은 sync:specs 로 도메인에서 당겨 최신화합니다:
npm run sync:specs # specs/ 에 이미 있는 자산 최신화
npm run sync:specs krstock gbstock # 지정 자산 받기(신규 추가)⚠️ 커밋 전 검증 필수: 받은 뒤 MCP
call_api로 라이브 A/B(현재가·잔고)를 확인하고 커밋하세요. 도메인 재생성이 회귀할 수 있으므로, 번들은 이 검증 게이트를 거쳐 반영합니다(런타임은 항상 번들을 읽습니다).
수동으로 openapi.json 을 specs/ 에 <도메인>.openapi.json 이름으로 넣어도 됩니다. 예:
specs/
krstock.openapi.json ← 현재 포함
gbstock.openapi.json ← 추가 시 해외주식 자동 노출
krfuture.openapi.json ← 추가 시 국내파생 자동 노출메타 도구(list_apis/describe_api/call_api)는 코드 수정 없이 새 자산군을 자동 인식합니다. (단축 도구는 자산군별로 추가 구현 가능)
저장소 구성
알고 싶은 것부터 찾아가세요. 아래는 전부 클릭되는 링크입니다.
파일 | 무엇이 들어 있나 |
MCP 서버 진입점 — 도구 등록·요청 처리 | |
제공 도구 정의( | |
REST 호출 · | |
토큰 발급·캐시(24h) | |
환경변수 로드 · 호스트 가드(오타 차단) | |
번들 | |
연결 검증 | |
도메인에서 명세 재동기화( | |
설정 양식 |
specs/에는 자산군openapi.json이 번들돼 있습니다(도메인 명세의 사본). 정본은 도메인입니다 — llms.txt (N2: n2plug.com/llms.txt)
파이썬으로 개발하시려면 → nhplug-sdk · AI 개발 규칙(AGENTS.md) · 실시간 채널 27종
라이선스
MIT. 문의: apisupport@nhsec.com
Available Tools
6 toolscall_apiA
operationId 와 입력값으로 NH Open API 를 실제 호출합니다. 인증/헤더/Input_0 봉투는 자동 처리됩니다. 주문(거래) API 는 서버가 거래 활성화 모드(NHPLUG_ENABLE_TRADING=true)일 때만 호출됩니다.
| Name | Required | Description | Default |
|---|---|---|---|
| cts | No | 연속조회(페이지네이션) 키. 목록 조회 다음 페이지에 사용. | |
| input | Yes | Input_0 에 들어갈 파라미터 객체 (예: { iem_cd: '005930', market_cd: 'KRX' }) | |
| operationId | Yes | 호출할 operationId |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It usefully reveals that authentication, headers, and Input_0 envelope are auto-processed, and that trading APIs are gated by a server mode flag. This is valuable context, but it does not describe return formats, error behavior, rate limits, or side effects, leaving gaps for a generic API caller.
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 extremely concise: two sentences that front-load the main purpose, then provide essential procedural and conditional details. Every clause earns its place, with no wasted words or repetition.
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 generic API caller with no output schema and no annotations, the description covers the core call mechanics and the trading-mode restriction. However, it omits guidance on return value handling, error scenarios, or how to obtain a valid operationId (e.g., via list_apis). Given the tool's broad scope and complexity, this is adequate but not complete.
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%, with clear descriptions for operationId, input, and cts. The description adds critical semantics by explaining that the 'Input_0 envelope is auto-handled', saving the user from manually constructing it, and clarifies that 'input' is the payload for that envelope. This goes beyond the schema's descriptive text.
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's verb and resource: it 'actually calls' the NH Open API using an operationId and input value. It is distinct from sibling tools like get_stock_price and get_stock_balance because it is a generic caller, though it does not explicitly differentiate itself or mention alternatives.
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 implies when to use the tool: to execute any NH Open API operation. It provides a clear constraint for trading APIs (only when NHPLUG_ENABLE_TRADING=true) and notes that authentication/headers/envelope are handled automatically. However, it does not explicitly say when to use it instead of the sibling convenience tools or how to discover operationIds.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_apiA
특정 operationId 의 입력 필드(Input_0) 스키마를 반환합니다. call_api 호출 전에 어떤 파라미터가 필요한지 확인하는 용도입니다.
| Name | Required | Description | Default |
|---|---|---|---|
| operationId | Yes | list_apis 로 찾은 operationId (예: krstockQuoteCurrentPrice) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, but the description discloses the tool's non-executing nature by saying it returns a schema and is meant for pre-call validation. It implies a safe read operation, though it doesn't explicitly mention auth or error behaviors.
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 two-sentence Korean description is compact, front-loaded, and every word contributes to its purpose. No redundancy or filler.
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 single parameter and no output schema, the description provides the essential return value (input schema) and the usage context. It adequately covers what an agent needs to know, including the relationship to call_api.
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?
The only parameter operationId is fully documented in the schema with an example. The description adds no additional parameter details beyond reaffirming that it refers to a specific operationId, so it meets the baseline for high schema coverage.
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 it returns the input field schema for a specific operationId, using the verb '반환합니다' and specifying the resource. It also distinguishes itself from the sibling tool call_api by positioning itself as a pre-check step.
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 it is used to check required parameters before calling call_api, providing a clear use case. It doesn't mention exclusions or alternatives, but the context is sufficient for an agent to know when to invoke it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stock_balanceA
국내주식 계좌 잔고를 조회합니다. (단축 도구 = krstockInquiryBalance)
| Name | Required | Description | Default |
|---|---|---|---|
| account_no | No | 계좌번호. 생략 시 NHPLUG_DEFAULT_ACCOUNT 환경변수 값 사용. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only says '조회' (inquiry), implying a read operation, but gives no details about response format, authentication, rate limits, or what exactly the balance includes. This leaves significant ambiguity for a tool with no output schema.
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 a single, front-loaded sentence stating purpose, plus a useful parenthetical alias. No redundant words or information.
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?
The tool is simple with one optional parameter, but with no output schema, the description should clarify what the response contains (e.g., cash balance, holdings value). It doesn't, leaving the agent to infer the response. The core purpose is clear, but the lack of response details makes it only partially complete.
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?
The schema description covers 100% of parameters (account_no), explaining the environment variable fallback. The tool description adds no additional parameter context, so the baseline of 3 applies.
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 uses a specific verb '조회' (inquire) and resource '국내주식 계좌 잔고' (domestic stock account balance), clearly distinguishing it from siblings like get_stock_price (price) and list_accounts (account listing). The shortcut name adds extra clarity.
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 implies its use case by stating it inquires account balance, but does not explicitly compare with alternatives like get_stock_price or list_accounts, nor does it provide any when/when-not guidance. The usage is inferred from the purpose rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stock_priceA
국내주식 현재가 시세를 조회합니다. (단축 도구 = call_api 로 krstockQuoteCurrentPrice 를 호출하는 것과 동일)
| Name | Required | Description | Default |
|---|---|---|---|
| stock_code | Yes | 종목코드 6자리 (예: 005930 = 삼성전자) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. The verb '조회' (query) implies a read-only operation, which is a basic safety indicator. However, it does not disclose any potential side effects, rate limits, or response format beyond the name. The shortcut detail adds some implementation transparency but not deep behavioral context.
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 a single sentence with a useful parenthetical. It is front-loaded with the main purpose and adds the equivalent call_api mapping without any fluff. Every word earns its place.
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?
While the tool is simple and the purpose is clear, there is no output schema, and the description does not mention what the response contains (e.g., current price only, additional market data). It is minimally viable but lacks completion on return value expectations and any usage prerequisites.
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%, with the stock_code parameter fully documented (6-digit code, example). The description adds no extra parameter meaning, but the schema already covers everything needed. Baseline 3 is appropriate.
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 current price of domestic stocks' with a specific verb and resource. It also explicitly distinguishes itself from siblings by noting it is a shortcut for the call_api function krstockQuoteCurrentPrice, making its purpose unique.
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 parenthetical '단축 도구 = call_api 로 krstockQuoteCurrentPrice 를 호출하는 것과 동일' (shortcut tool = same as calling krstockQuoteCurrentPrice via call_api) provides clear context for when to use this tool instead of the generic call_api. While it doesn't explicitly list exclusions, the equivalence note gives adequate usage guidance for a simple lookup tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_accountsA
로그인 자격증명(앱키/시크릿)에 연결된 보유 계좌 목록을 조회합니다. 잔고조회·주문 전에 계좌번호(act_no)를 확보하는 용도입니다. 입력값은 없습니다. (플랫폼 공통 엔드포인트 POST /n2/acctinfo)
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that this is a retrieval operation ('조회'), relates to login credentials (app key/secret), has no input, and mentions the common endpoint. This implies a read-only behavior without side effects. It does not go into details like rate limits or failure modes, but for a simple list operation it is sufficiently transparent.
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 and front-loaded. It states the main function, purpose, and no-input condition in two clear sentences, with a parenthetical note about the endpoint. Every sentence contributes value without redundancy, making it easy for an agent to parse quickly.
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?
The description provides all essential context for a simple zero-parameter tool: what it does, why it is used, when to call it, and the endpoint. Although there is no output schema, the description implies the output includes account numbers (act_no) needed for subsequent operations. It could be more explicit about the response structure, but for its simplicity it is sufficiently complete.
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?
The input schema is empty (0 parameters), so the baseline is 4. The description explicitly states '입력값은 없습니다' (no input value), which adds clarity beyond the schema by confirming that no parameters are accepted. This is helpful for an agent to know it should not supply any arguments.
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 retrieves the list of accounts connected to login credentials ('보유 계좌 목록을 조회합니다'), specifies the resource (accounts) and the action (retrieve/list). It also explains the purpose (obtaining account number before balance inquiry or order), which distinguishes it from sibling tools like get_stock_balance that likely operate on a specific account.
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 explicitly states when to use it: 'before balance inquiry/order to secure account number (act_no)'. It also notes there is no input required. However, it does not explicitly mention alternatives or conditions when not to use it, so it falls short of the highest score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_apisA
NH투자증권 Open API 에서 호출 가능한 엔드포인트 목록을 조회합니다. 자산군(domain)·카테고리·키워드로 필터링할 수 있습니다. 먼저 이 도구로 원하는 API 의 operationId 를 찾은 뒤 describe_api / call_api 로 이어가세요. 주문(거래) API 는 서버가 거래 활성화 모드일 때만 표시됩니다.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | No | 자산군 필터 (예: krstock). 생략 시 전체. | |
| keyword | No | summary/operationId/path 부분일치 키워드. | |
| category | No | 카테고리 부분일치 (예: 시세, 조회, 주문). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses a significant behavioral trait: order/trading APIs are only listed when the server is in trading activation mode. It also implies the tool returns operationIds. However, it does not mention authentication requirements, rate limits, or whether filters are case-sensitive/partial, leaving some gaps. Still, the disclosure of conditional visibility adds meaningful transparency beyond a trivial read operation.
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 three sentences: purpose, filtering capability, and workflow guidance plus a special condition. It is front-loaded with the main action, every sentence carries distinct information, and there is no filler. The structure efficiently communicates purpose, usage, and a key behavioral caveat without redundancy.
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's moderate complexity (3 optional filters, no output schema), the description covers the core purpose, workflow role, and a special display condition. It does not describe the return format (e.g., whether results are paginated or include full API metadata), but it implies the availability of operationIds, which is sufficient for the intended discovery usage. Slight incompleteness in return structure details keeps it from a 5.
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%, so the baseline is 3. The description restates that filtering by domain/category/keyword is possible, but does not add new syntax details beyond the schema's own parameter descriptions. It reiterates the parameter names in Korean (자산군, 카테고리, 키워드) but offers no additional examples or edge-case semantics, so it adds marginal value over the 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?
The description clearly states the tool 'queries the list of endpoints' for the NH Investment & Securities Open API, with a specific verb (조회합니다) and resource (endpoint list). It differentiates itself from sibling tools by explicitly describing its role as the discovery step, distinct from describe_api/call_api and the specific data tools like get_stock_price.
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?
It provides explicit when-to-use guidance: 'First use this tool to find the operationId of the desired API, then proceed to describe_api / call_api.' This directly addresses workflow sequencing relative to siblings. It also explains filtering options (domain, category, keyword) and a special condition (order APIs only shown in trading activation mode), covering both usage and exclusions.
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. Dates show when Glama detected each change.
6 tool updates
v0.1.0- First observed
call_api - First observed
describe_api - First observed
get_stock_balance - First observed
get_stock_price - First observed
list_accounts - First observed
list_apis
TDQS
Each tool has a clearly distinct role: list_apis enumerates available endpoints, describe_api details input schemas, call_api invokes a specific operation, and the shortcuts (get_stock_price, get_stock_balance, list_accounts) are specific, well-named conveniences. There is no overlap that would confuse an agent.
All tool names follow a consistent verb_noun snake_case pattern (list_apis, describe_api, call_api, get_stock_price, get_stock_balance, list_accounts), which is predictable and readable.
With 6 tools, the set is well-scoped: a generic workflow (list/describe/call) plus targeted domain shortcuts. This is an appropriate size for an API gateway with common stock operations.
The combination of list_apis, describe_api, and call_api provides complete coverage of the NH Open API, allowing any endpoint to be discovered and invoked. The additional shortcuts cover common high-frequency operations without leaving dead ends.
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
MCP server for OpenMM — exposes market data, account, trading, and strategy tools to AI agents
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server giving AI agents one-connection access to China A-share market intelligence: financials,
Related MCP Servers
- FlicenseAqualityDmaintenanceAn MCP server that enables natural language control of Kiwoom Securities accounts through Claude Desktop. It provides tools for stock price lookup, buying and selling stocks, and analyzing portfolios or trade history via the Kiwoom REST API.112-
- AlicenseBqualityCmaintenanceMCP server exposing Massive.com's REST Stocks API for querying stock market data via Claude Desktop/Code.31MIT
- AlicenseAqualityCmaintenanceMCP server wrapping Toss Securities Open API, enabling stock price queries and trading for Korean and US stocks via natural language.3640MIT

nhplug-mcpofficial
AlicenseAqualityBmaintenanceEnables Claude to call NH Investment & Securities Open API for Korean stock market data, quotes, and order execution through natural language.55MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/PLUG-OpenAPI/nhplug-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server