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

@formosa-mcp/taiwan-legislative

v1.0.1

Published

Taiwan MCP server: taiwan-legislative

Downloads

28

Readme

Taiwan Legislative MCP Server

查詢立法院開放資料,包括法案搜尋、審議進度、委員投票紀錄、委員會議事及質詢紀錄。

Tools

| Tool | Description | Required Params | |------|-------------|-----------------| | search_bills | 搜尋法案 | keyword | | get_bill_status | 法案審議進度 | billId | | get_legislator_votes | 委員投票紀錄 | (none) | | search_meetings | 委員會議事查詢 | (none) | | get_interpellations | 質詢紀錄查詢 | (none) |

Tool Parameters

search_bills

  • keyword (string, required) — 搜尋關鍵字
  • limit (number, optional) — 回傳筆數(預設 20)

get_bill_status

  • billId (string, required) — 法案編號

get_legislator_votes

  • legislator (string, optional) — 委員姓名(不填=全部委員)
  • term (number, optional) — 屆次(不填=全部屆次)
  • limit (number, optional) — 回傳筆數(預設 20)

search_meetings

  • keyword (string, optional) — 搜尋關鍵字(不填=全部)
  • committee (string, optional) — 委員會名稱(不填=全部委員會)
  • limit (number, optional) — 回傳筆數(預設 20)

get_interpellations

  • keyword (string, optional) — 搜尋關鍵字(不填=全部)
  • legislator (string, optional) — 委員姓名(不填=全部委員)
  • limit (number, optional) — 回傳筆數(預設 20)

Endpoints

| Path | Transport | Description | |------|-----------|-------------| | POST /mcp | MCP Streamable HTTP | Claude Desktop / Cursor / MCP clients | | POST / | JSON-RPC 2.0 | Legacy — Composer backward compatible | | GET / | HTTP | Server info |

Quick Start

Prerequisites

  • Optional: LY_API_KEY environment variable (if the API requires authentication)

Development

npm install
npm run dev    # http://localhost:8787
npm test       # 73 tests

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | SERVER_NAME | Auto | Set in wrangler.toml (taiwan-legislative) | | SERVER_VERSION | Auto | Set in wrangler.toml (1.0.0) | | LY_API_KEY | Optional | API key for ly.govapi.tw (set as Wrangler secret) |

Usage Example

# MCP Streamable HTTP — list tools
curl -X POST http://localhost:8787/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# Call a tool — search bills by keyword
curl -X POST http://localhost:8787/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_bills","arguments":{"keyword":"教育","limit":10}}}'

Data Source

  • API: 立法院開放資料 (https://v2.ly.govapi.tw)
  • Auth: Optional API key
  • Endpoints:
    • /bills — 法案資料
    • /legislators — 立法委員資料
    • /meetings — 會議紀錄
    • /interpellations — 質詢紀錄

File Structure

src/
  index.ts         — Hono HTTP entry + /mcp route
  mcp-server.ts    — McpServer factory (Zod schemas)
  mcp-handler.ts   — Legacy JSON-RPC handler
  client.ts        — ly.govapi.tw API client
  types.ts         — TypeScript types
  tools/           — Tool implementations
    search-bills.ts      — search_bills
    bill-status.ts       — get_bill_status
    legislator-votes.ts  — get_legislator_votes
    search-meetings.ts   — search_meetings
    interpellations.ts   — get_interpellations
tests/             — Vitest tests (73 tests)
wrangler.toml      — Worker config
package.json       — Dependencies