Skip to main content
Glama
funtuan

Taiwan Government Open Data MCP Server

by funtuan
README.md
# Taiwan Government Open Data MCP Server

This is a remote server using Model Context Protocol (MCP) and Cloudflare Workers AI AutoRAG to search and query Taiwan government open data.

## Online Service

This project is deployed on Cloudflare Workers and is open for moderate use:

- **Service URL**: https://tw-gov-data-mcp.funtuan.workers.dev/

> ⚠️ This is a personal side project with limited resources. Please avoid excessive requests.

## Available Tools

### `search_dataset`
Search for relevant government open datasets using AI Search and retrieve full information from the D1 database.

**Parameters:**
- `query` (string): Search keywords, e.g., traffic accidents, health insurance, environmental monitoring, etc.
- `max_results` (number, optional): Maximum number of results to return, default is 10.

**Process:**
1. Use AI Search to find the top N most relevant datasets.
2. Extract dataset ID from filename (e.g., 10001.json → 10001).
3. Query full dataset information from the D1 database.

## Usage in GitHub Copilot

Add the following to your GitHub Copilot MCP settings:

```json
{
  "mcpServers": {
    "tw-gov-data": {
      "url": "https://tw-gov-data-mcp.funtuan.workers.dev/sse",
      "type": "http"
    }
  }
}
```

After restarting, you can use these tools to search for Taiwan government open data!

## Example Queries

When chatting with Copilot, you can ask:

- "Find datasets related to traffic accidents"
- "What open data is available for health insurance?"
- "Search for environmental monitoring data"
- "Find open data related to air quality"
- "Are there any datasets about population statistics?"

## Data Source

The data used in this project comes from [Taiwan Government Open Data Platform](https://data.gov.tw/).

## License

MIT License

## References

- [Model Context Protocol](https://modelcontextprotocol.io/)
- [Cloudflare Workers AI](https://developers.cloudflare.com/workers-ai/)
- [Cloudflare AutoRAG](https://developers.cloudflare.com/workers-ai/autorag/)
- [Taiwan Government Open Data Platform](https://data.gov.tw/)