Skip to main content
Glama
kushal613

pegcheck

by kushal613

pegcheck-mcp

실제 주식을 추적하는 Robinhood Chain Stock Token이 현재 실물 주식 대비 공정한 가격에 거래되고 있는지 확인하는 읽기 전용 MCP 서버입니다. — 인간이 대시보드에서 읽는 용도가 아니라, AI 에이전트가 거래 직전에 호출하도록 설계되었습니다.

✅ Verdict: FAIR (deviation: 0.11%)

문제

Robinhood Chain의 Stock Tokens은 실제 주식을 추적하고 온체인 DEX에서 24/7 거래되는 자가 수탁(ERC-20) 토큰입니다. 실제 주식 시장은 하루 약 6.5시간, 주 5일만 열립니다. 그 시간 외에는 토큰 가격을 공정 가치로 되돌릴 활성 시장이 없으므로 가격이 괴리될 수 있습니다.

이 토큰을 온체인에서 직접 거래하는 AI 에이전트 — 지갑 키를 보유하고 DEX 풀과 스왑하는 — 는 지불하려는 가격이 신뢰할 수 있는지 알 수 있는 내장된 방법이 없습니다. 이러한 괴리를 표면화하는 기존 도구(대시보드, 텔레그램 알림 봇, 트레이딩 터미널)는 모두 사람이 보도록 만들어졌습니다. 그중 어느 것도 에이전트가 결정 중간에 호출하도록 만들어진 것은 없습니다.

Related MCP server: rhc-mcp

해결책

하나의 집중된 MCP 도구: check_stock_token_price.

티커를 입력하면 에이전트가 거래 서명 전에 — Robinhood 자체 Trading MCP를 통하든 온체인 DEX에 직접 대든 — 행동할 수 있는 구조화된 세션 인지형 판정을 반환합니다.

{
  "symbol": "AAPL",
  "onchain": { "priceUsd": 310.32, "method": "liquidity-weighted-average", "poolsUsed": 10 },
  "reference": { "tokenEquivalentPriceUsd": 309.99, "isTradingHalt": false },
  "deviation": { "pct": 0.11, "direction": "premium" },
  "marketSession": { "state": "weekend" },
  "verdict": "fair",
  "warnings": []
}

이 서버는 읽기 전용입니다. 개인 키를 보유하지 않으며, 트랜잭션에 서명하지 않으며, 거래를 체결하지 않습니다.

작동 방식

두 개의 독립적인 데이터 소스를 비교합니다:

  1. 온체인 가격 — DexScreener 공개 API에서 토큰에 대한 모든 인덱싱된 Robinhood Chain 풀을 가져와, 안정적인 기준 자산(USDG/USDC)으로 표시되고 최소 $500 유동성이 있는 풀로 필터링한 뒤, 유동성 가중 평균으로 결합합니다(따라서 하나의 깊은 풀이 여러 개의 얕고 노이즈가 많은 풀을 압도합니다). 필터를 통과하는 것이 없으면 가장 깊은 단일 풀로 폴백하며 — 낮은 신뢰도로 표시됩니다.

  2. 기준 가격 — Robinhood 자체 공개 Stock Token API(/rhj/prices/{symbol})로, 기초 주식의 원시 매수/매도 호가를 보고합니다. 이는 토큰의 현재 ERC-8056 multiplier(/rhj/assets에서)로 스케일링되어 토큰 등가 공정 가격을 얻습니다. 배당금은 현금으로 지급되지 않고 승수에 재투자되기 때문입니다.

두 값 사이의 괴리는 현재 미국 시장 세션에 따라 달라지는 임계값 테이블(regular, pre-market, after-hours, weekend, holiday, closed)과 비교되며, 외부 의존성 없이 로컬에서 계산됩니다 — 토요일 밤의 2% 괴리는 예상되는 것이지만, 화요일 오전 11시의 동일한 괴리는 그렇지 않습니다. 세션 감지에는 전체 NYSE 휴일 달력이 포함되며, 외부 API에서 가져오는 대신 알고리즘적으로 계산됩니다(월의 n번째 요일 규칙, 성금요일을 위한 부활절 계산, 표준 주말 관측 이동). 따라서 네트워크 의존성, API 키, 오래될 정적 파일 없이 모든 연도에 대해 작동합니다. NYSE가 공식 발표한 2026-2028 달력에 대해 test/nyseHolidays.test.ts에서 검증되었습니다. 정확한 임계값은 src/config.ts, 휴일 규칙은 src/nyseHolidays.ts를 참조하세요.

설치 및 실행

git clone https://github.com/kushal613/pegcheck-mcp.git
cd pegcheck-mcp
npm install
npm run build

API 키, .env 파일, 지갑이 필요 없습니다 — 사용되는 모든 데이터 소스는 무료 공개 키 없는 API입니다.

터미널에서 시도하기

npm run check -- AAPL
npm run check -- TSLA

MCP 클라이언트에 연결하기

Claude Desktop / Claude Code(claude_desktop_config.json 또는 .mcp.json):

{
  "mcpServers": {
    "pegcheck": {
      "command": "node",
      "args": ["/absolute/path/to/pegcheck-mcp/dist/index.js"]
    }
  }
}

Cursor(.cursor/mcp.json): 위와 동일한 형식입니다.

연결한 후 에이전트에게 물어보세요: "TSLA 주식 토큰을 사기 전에 pegcheck로 지금 가격이 공정한지 확인해 봐."

도구 참조

check_stock_token_price

필드

유형

설명

symbol (입력)

string

티커, 예: "AAPL".

onchain.priceUsd

number | null

유동성 가중 온체인 가격.

onchain.method

string

liquidity-weighted-average, deepest-pool(낮은 신뢰도), 또는 none.

reference.tokenEquivalentPriceUsd

number | null

실제 주식 중간 가격에 기업 액션 승수를 적용한 값.

deviation.pct

number | null

온체인 vs 기준 가격의 부호 있는 % 괴리율.

marketSession.state

string

regular | pre-market | after-hours | weekend | holiday | closed.

marketSession.holidayName

string | null

예: state가 "holiday"일 때 "Thanksgiving Day".

verdict

string

fair | caution | unreliable | no_liquidity | unknown_symbol.

warnings

string[]

사람이 읽을 수 있는 주의사항(지연된 호가, 거래 정지, 낮은 신뢰도 풀 등).

아키텍처

src/
  config.ts        Every tunable threshold, in one place
  types.ts         Shared types for the whole pipeline
  http.ts          Fetch wrapper with timeout + consistent errors
  robinhoodApi.ts  Reference leg: /rhj/assets + /rhj/prices (Robinhood's own APIs)
  dexscreener.ts   Onchain leg: liquidity-weighted price across Robinhood Chain pools
  marketSession.ts Local US-market-session calculation (no external dependency)
  nyseHolidays.ts  Algorithmic NYSE holiday calendar (no external dependency)
  pegCheck.ts       Combines both legs into one PegCheckResult
  server.ts        MCP tool registration
  index.ts         stdio entrypoint
  cli.ts           Standalone terminal usage (no MCP client needed)
scripts/
  smoke-test.mjs   End-to-end MCP protocol handshake test (initialize -> tools/list -> tools/call)

알려진 제한 사항 (v0.1)

  • 조기 마감 미처리. NYSE의 오후 1시 마감(추수감사절 다음 날, 평일 크리스마스 이브)은 별도 세션으로 모델링되지 않습니다 — 그런 오후에는 실제 조기 마감보다 몇 시간 늦게 after-hours/closed로 보고됩니다. 종일 휴장은 완전히 처리됩니다.

  • 장소별 슬리피지 추정 없음. 집계된 유동성 가중 가격을 보고하며, "내 $500 거래가 이 특정 풀에서 얼마의 비용이 들지"는 보고하지 않습니다. 이는 의도적인 v0.1 범위 경계입니다(자연스러운 v0.2: 거래 규모와 특정 풀/장소를 받아 가격 영향을 추정하는 advanced 모드).

  • DexScreener 커버리지 의존성. DexScreener가 아주 새로운 풀을 아직 인덱싱하지 않은 경우 onchain.method는 "none"이 되고 판정은 no_liquidity가 됩니다. 이는 "조용히 틀린 답"이 아니라 "크게 실패"하는 방식입니다.

  • 실사 대체 수단이 아님. 아래 면책 조항을 참조하세요.

면책 조항

이 프로젝트는 Robinhood와 제휴하거나 보증하지 않습니다. 독립적인 정보 제공 도구입니다. 데이터는 Robinhood의 공개 API와 DexScreener의 공개 API에서 가져오며 지연되거나, 불완전하거나, 부정확할 수 있습니다. 여기의 어떤 내용도 재정적 조언이 아닙니다. 이 서버는 거래를 체결할 수 없으며 자금이나 키를 보유하지 않습니다.

라이선스

MIT — LICENSE 참조.

Available Tools

1 tool
check_stock_token_priceA

Checks whether a Robinhood Chain Stock Token's current onchain trading price is consistent with its real-world reference stock price. Combines a liquidity-weighted average of the token's onchain DEX pools with Robinhood's own live reference quote (adjusted for the token's corporate-action multiplier), and returns a session-aware fairness verdict ('fair' | 'caution' | 'unreliable' | 'no_liquidity' | 'unknown_symbol') plus the deviation percentage and supporting data. Call this BEFORE executing a trade of a Stock Token, whether through Robinhood's own Trading MCP or directly against an onchain DEX, to avoid trading at a price that has drifted from fair value -- which is most likely to happen outside regular US market hours. Read-only: this tool never places, modifies, or signs any trade.

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYesThe Stock Token ticker symbol, e.g. "AAPL", "TSLA", "NVDA".

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states 'Read-only: this tool never places, modifies, or signs any trade,' which is a critical safety trait. It also discloses the algorithm (combining onchain DEX pools with a live reference quote) and the return format (session-aware verdict plus deviation percentage and supporting data), going beyond minimal requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise yet comprehensive, front-loading the core purpose before moving to method, usage guidance, and safety note. Every sentence serves a purpose: the first defines the check, the second explains the mechanism and output, the third gives explicit usage context, and the fourth declares read-only behavior. No filler or redundant text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has a single parameter and no output schema, so the description must explain both input context and expected output. It does so by describing the verdict options ('fair' | 'caution' | 'unreliable' | 'no_liquidity' | 'unknown_symbol'), the deviation percentage, and the session-aware nature. It also covers when to use it, fulfilling the informational needs for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already has 100% description coverage for the single parameter 'symbol' with examples. The tool description does not add new semantic meaning to the parameter itself; it explains the tool's purpose but not additional nuances like format constraints or edge cases. The baseline of 3 is appropriate since the parameter is fully documented in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a very specific verb+resource: it checks whether a Robinhood Chain Stock Token's onchain trading price is consistent with its real-world reference stock price. It also details the method (liquidity-weighted average of DEX pools combined with Robinhood's live quote) and the output (a fairness verdict and deviation percentage), leaving no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says to call this BEFORE executing a trade of a Stock Token, whether via Robinhood's Trading MCP or directly against a DEX, to avoid trading at a price that has drifted from fair value. It also notes this is most likely outside regular US market hours. It does not provide explicit when-not-to-use or alternatives, but since there are no sibling tools, this is acceptable; a 4 reflects clear context without 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.

  1. 1 tool updatev0.1.0
    • First observedcheck_stock_token_price

TDQS

A4.5/5.0

Scored across 1 tool

Disambiguation5/5

With only a single tool, there is no possibility of confusion or overlap. The tool's purpose is clearly distinct from anything else, meeting the 'clearly distinct purpose' criterion perfectly.

Naming Consistency5/5

The tool name 'check_stock_token_price' follows a clean verb_noun pattern, and with only one tool there is no inconsistency. The name accurately describes the action and object.

Tool Count3/5

A single tool feels thin for most servers, but here the scope is narrowly defined around one specific check. It is borderline acceptable but on the low end of the typical range, making it a 3 per calibration guidelines.

Completeness5/5

The tool fully addresses its stated purpose—checking price fairness before trading. It provides a verdict, deviation percentage, and supporting data, with no obvious missing operations for that specific task. It is not a CRUD domain, so the completeness is judged against the narrow mission.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables AI agents to interact with Robinhood Chain via USDG payments, offering tools for balance, pricing, trading, and more.
    18
    58
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI agents to read Robinhood Chain stock-token positions, quote swaps, and execute swaps through the Model Context Protocol, bridging on-chain assets that Robinhood's own off-chain MCP cannot reach.
    4
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to trade tokenized stocks (e.g., NVDA, TSLA) on Robinhood Chain via MCP, with non-custodial keys and spending caps.
    7 npm
    MIT