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

newways-context

v1.0.3

Published

Newways Data MCP Server - Interactive DB + GA4 data queries via Claude

Readme

Newways Data MCP

Newways(정책복붙) 데이터를 Claude와 대화형으로 조회할 수 있는 MCP 서버입니다. DB(PostgreSQL)와 GA4 데이터를 자연어로 질문하면 Claude가 알아서 조회해줍니다.

설치

1. Setup (최초 1회)

npx newways-context setup

대화형으로 DB 접속 정보와 GA4 설정을 입력받아 ~/.newways-context/config.json에 저장합니다.

2. Claude Code에 등록

프로젝트의 .mcp.json 파일에 추가합니다:

{
  "mcpServers": {
    "newways-data": {
      "command": "npx",
      "args": ["-y", "newways-context@latest"]
    }
  }
}

환경변수(env) 설정은 필요 없습니다. setup에서 저장한 config 파일을 자동으로 읽습니다.

설정 우선순위

환경변수 > config 파일 (~/.newways-context/config.json) > 기본값

환경변수로 개별 값을 오버라이드할 수도 있습니다:

{
  "mcpServers": {
    "newways-data": {
      "command": "npx",
      "args": ["-y", "newways-context@latest"],
      "env": {
        "DB_HOST": "custom-host.example.com"
      }
    }
  }
}

제공 도구 (12개)

DB 기본 도구

| 도구 | 설명 | |------|------| | list_tables | DB 테이블 목록 조회 | | describe_table | 테이블 컬럼/타입/외래키 조회 | | execute_query | SELECT 쿼리 실행 (읽기 전용) |

비즈니스 분석 도구

| 도구 | 설명 | |------|------| | get_user_stats | 사용자 통계 (가입자, 지역별 분포, 일별 추이) | | get_policy_request_stats | 정책 요청 현황 (정책별, 달성률, 추이) | | get_politician_stats | 정치인별 팔로워/피드/정책 분석 | | get_engagement_stats | 참여도 분석 (좋아요, 팔로우, 요청 트렌드) |

GA4 도구

| 도구 | 설명 | |------|------| | ga4_get_report | GA4 자유 리포트 (지표/차원 조합) | | ga4_get_realtime | 실시간 활성 사용자 | | ga4_get_top_pages | 인기 페이지 랭킹 | | ga4_get_user_acquisition | 유입 경로 분석 | | ga4_get_user_demographics | 사용자 인구통계 |

보안

  • DB는 read-only 유저로 접속 (SELECT 권한만 보유)
  • MCP 레벨에서도 INSERT/UPDATE/DELETE/DROP/ALTER/CREATE/TRUNCATE 차단
  • 크리덴셜은 ~/.newways-context/config.json에만 저장 (repo에 포함되지 않음)

사용 예시

Claude Code에서 이런 질문을 할 수 있습니다:

"뉴웨이즈 현재 총 가입자 수와 이번 달 신규 가입자 보여줘"
"정책 요청 현황 전체 보여줘. 달성률 포함해서"
"팔로워 많은 정치인 Top 10 알려줘"
"최근 한달 좋아요, 팔로우 트렌드 분석해줘"
"GA4에서 최근 7일 인기 페이지 보여줘"
"유입 경로별 사용자 분석해줘"
"실시간 접속자 몇 명이야?"
"DB에서 SELECT * FROM policy_cards WHERE \"isActive\" = true 실행해줘"

개발

npm install
npm run build    # TypeScript 컴파일 (dist/ 생성)
npm run start    # MCP 서버 실행
npm run dev      # tsx로 개발 모드 실행