feat(wikidata): 위키데이터 읽기 서비스 (검색·엔티티·statements·SPARQL)#29
Merged
Conversation
- wikidata_search(wbsearchentities)·wikidata_entity(REST v1)·wikidata_statements(REST v1)·wikidata_sparql(WDQS) 4개 GET 도구 - 무인증이나 식별 가능한 User-Agent 필수(기본값 상수, WIKIDATA_USER_AGENT로 덮어씀) + (선택) WIKIDATA_API_TOKEN Bearer로 레이트리밋 완화 - 세 상류 혼용: Action API 검색·Wikibase REST v1 엔티티/statements·WDQS SPARQL - Action API 200+error 봉투 별도 처리, REST statements 가변 value.content(string/item/time/quantity/monolingualtext) compact 렌더링(P/Q 라벨은 raw id) - WDQS는 timeout=60 전달, 구문 오류 400 원문(자바 예외/HTML) 비노출 - 계약(contract)·도구(tools) 테스트 2종(네트워크 없음, 49 passed) - docs/providers.md 블록 + .env.example 섹션 추가 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
ArcSolver
added a commit
that referenced
this pull request
Jun 4, 2026
- wikidata_search(wbsearchentities)·wikidata_entity(REST v1)·wikidata_statements(REST v1)·wikidata_sparql(WDQS) 4개 GET 도구 - 무인증이나 식별 가능한 User-Agent 필수(기본값 상수, WIKIDATA_USER_AGENT로 덮어씀) + (선택) WIKIDATA_API_TOKEN Bearer로 레이트리밋 완화 - 세 상류 혼용: Action API 검색·Wikibase REST v1 엔티티/statements·WDQS SPARQL - Action API 200+error 봉투 별도 처리, REST statements 가변 value.content(string/item/time/quantity/monolingualtext) compact 렌더링(P/Q 라벨은 raw id) - WDQS는 timeout=60 전달, 구문 오류 400 원문(자바 예외/HTML) 비노출 - 계약(contract)·도구(tools) 테스트 2종(네트워크 없음, 49 passed) - docs/providers.md 블록 + .env.example 섹션 추가 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇을
무인증·무료 공개 API인 Wikidata 를 감싼 읽기 전용 MCP 서비스. Wikipedia(#28)와 짝을 이루는 구조화 지식 그래프 축. 무료 API를 감싼 벤더 공식 MCP는 부재(Wikimedia Enterprise MCP=유료 상업 제품, WMDE의 Wikidata MCP=WIP 프로토타입) → 빈틈.
도구 4종 (전부 GET·읽기)
wikidata_search(query, language, type, limit)— Action APIwbsearchentitieswikidata_entity(id, language)— Wikibase REST v1/entities/items|properties/{id}(라벨·설명·별칭·statement 수·enwiki 사이트링크)wikidata_statements(id, property)— REST v1/statements(value.content타입별 렌더링)wikidata_sparql(query, limit)— WDQS/sparql(GET·format=json·timeout 60s)설계 노트
wbgetentities보다 평탄한 JSON.WIKIDATA_API_TOKENBearer = 레이트 완화).value.content타입 변형 처리:wikibase-item=평문"Q5",quantity={amount,unit}(무차원unit:"1"특수처리),time={time,precision,...},monolingualtext={text,language},novalue/somevalue분기. 라벨 미해석(추가 호출 0, 1콜) — 원시 P/Q id 노출(README 명시).get_json재사용).검증
wbsearchentities봉투·REST v1 엔티티/프로퍼티 키·value.content모든 타입 변형·WDQS SPARQL JSON 형태·malformed 쿼리 비노출·404/200+error·Q/P 정규식 전부 라이브 확인 → 확정 버그 0, SHIP. 미매핑 상태코드 raw 본문 NIT 1건 하드닝 반영.🤖 Generated with Claude Code