npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-toss

v0.1.0

Published

MCP server for 토스증권 Open API — market data, stock/account queries, and guarded order placement

Readme

mcp-toss

토스증권 Open API를 위한 MCP(Model Context Protocol) 서버. 시세·종목·시장정보·계좌·보유주식 조회와 주문(2단계 확인) 기능을 도구로 제공합니다.

  • Base API: https://openapi.tossinvest.com
  • 인증: OAuth 2.0 Client Credentials (client_id + client_secret → access token)
  • 전송: stdio (Claude Desktop / Claude Code 등 로컬 MCP 클라이언트)

설치 / 설정

자격증명은 코드에 두지 않습니다. 사용자마다 본인 자격증명을 MCP 클라이언트 설정의 env에 넣으세요.

{
  "mcpServers": {
    "toss": {
      "command": "npx",
      "args": ["-y", "mcp-toss"],
      "env": {
        "TOSS_CLIENT_ID": "your_client_id",
        "TOSS_CLIENT_SECRET": "your_client_secret",
        "TOSS_ACCOUNT_NO": "your_account_seq (선택)"
      }
    }
  }
}

| 환경변수 | 필수 | 설명 | |---|---|---| | TOSS_CLIENT_ID | ✅ | OAuth2 client id | | TOSS_CLIENT_SECRET | ✅ | OAuth2 client secret | | TOSS_ACCOUNT_NO | ⬜ | 기본 계좌 시퀀스(정수). 미지정 시 도구의 account 인자로 전달 | | TOSS_BASE_URL | ⬜ | 기본 https://openapi.tossinvest.com override용 |

도구

조회 (read-only)

| 도구 | 설명 | |---|---| | get_orderbook | 호가 조회 | | get_prices | 현재가 조회 (여러 종목 쉼표 구분) | | get_trades | 최근 체결 내역 | | get_price_limits | 상/하한가 | | get_candles | 캔들 차트 (interval: 1m/1d) | | search_stocks | 종목 기본 정보 | | get_stock_warnings | 매수 유의사항 | | get_exchange_rate | 환율 (KRW/USD) | | get_market_calendar_kr | 국내(KRX) 장 운영 정보 | | get_market_calendar_us | 미국 장 운영 정보 | | list_accounts | 계좌 목록 (계좌 시퀀스 확인용) | | get_holdings | 보유 주식 | | list_orders | 주문 목록 (status: OPEN/CLOSED) | | get_order | 주문 상세 | | get_buying_power | 매수 가능 금액 | | get_sellable_quantity | 판매 가능 수량 | | get_commissions | 매매 수수료 |

주문 (2단계 확인)

| 미리보기 | 확정 | |---|---| | preview_order | place_order | | preview_order_modify | modify_order | | preview_order_cancel | cancel_order |

주문 안전장치

주문은 항상 2단계로 동작합니다.

  1. preview_* 도구가 주문 내용을 요약하고 confirmToken을 발급합니다. (이 단계에서는 실제 주문이 나가지 않습니다.)
  2. 동일한 주문 파라미터 + 그 confirmToken으로 확정 도구(place_order 등)를 호출해야 실제로 주문이 전송됩니다.

confirmToken은 60초간 1회만 유효하며, preview 때와 파라미터가 다르면 거부됩니다. 이로써 착오 주문과 의도치 않은 실주문을 막습니다.

⚠️ 주문 도구는 실제 매매를 발생시킵니다. 본인 계좌와 자격증명으로만 사용하세요.

개발

npm install
npm test          # vitest
npm run build     # tsc → dist/
npm run dev       # tsx src/index.ts

라이선스

MIT