TMD Earthquake MCP Server

TMD Earthquake MCP Server

Provides access to earthquake data from the Thai Meteorological Department (TMD) API. Enables querying recent earthquakes, filtering by location and magnitude, and obtaining statistics.

Category
Visit Server

README

TMD Earthquake MCP Server

MCP Server สำหรับดึงข้อมูลแผ่นดินไหวจาก Thai Meteorological Department (TMD) API

Features

  • ✅ ดึงข้อมูลแผ่นดินไหวล่าสุด
  • ✅ กรองตามสถานที่เกิดเหตุ
  • ✅ กรองตามขนาด (Magnitude)
  • ✅ สถิติข้อมูลแผ่นดินไหว
  • ✅ Cache ข้อมูล 1 ชั่วโมง

Installation

1. สร้าง Conda Environment

conda create -n mcp-tmd python=3.11 -y
conda activate mcp-tmd

2. ติดตั้ง Dependencies

cd C:\Users\Asus\tmd-weather-mcp
pip install -r requirements.txt

Usage

Run Server (ทดสอบ)

python earthquake_server.py

Configure Claude Desktop

  1. หา Python Path ใน conda environment:
where python
  1. แก้ไขไฟล์ %APPDATA%\Claude\claude_desktop_config.json:
{
  "mcpServers": {
    "tmd-earthquake": {
      "command": "C:\\Users\\Asus\\anaconda3\\envs\\mcp-tmd\\python.exe",
      "args": [
        "C:\\Users\\Asus\\tmd-weather-mcp\\earthquake_server.py"
      ]
    }
  }
}

หมายเหตุ:

  • ต้องใช้ double backslash (\\) ใน Windows path
  • แทนที่ path ของ Python ให้ตรงกับที่ได้จากคำสั่ง where python
  1. Restart Claude Desktop

Tools

1. get_recent_earthquakes

ดึงข้อมูลแผ่นดินไหวล่าสุด

Parameters:

  • limit (int): จำนวนรายการที่ต้องการ (default: 10)

ตัวอย่างการใช้งาน:

  • "แผ่นดินไหวล่าสุด 5 รายการ"
  • "ข้อมูลแผ่นดินไหววันนี้"

2. get_earthquakes_by_location

กรองแผ่นดินไหวตามสถานที่

Parameters:

  • location_keyword (str): คำค้นหาสถานที่ (ไทยหรืออังกฤษ)

ตัวอย่างการใช้งาน:

  • "แผ่นดินไหวในจีน"
  • "แผ่นดินไหวที่มีคำว่ายูนนาน"

3. get_earthquakes_by_magnitude

กรองแผ่นดินไหวตามขนาด

Parameters:

  • min_magnitude (float): ขนาดต่ำสุด (ริกเตอร์)
  • max_magnitude (float, optional): ขนาดสูงสุด

ตัวอย่างการใช้งาน:

  • "แผ่นดินไหวที่มีขนาดมากกว่า 5 ริกเตอร์"
  • "แผ่นดินไหวขนาด 4-6 ริกเตอร์"

4. get_earthquake_statistics

สรุปสถิติข้อมูลแผ่นดินไหว

ตัวอย่างการใช้งาน:

  • "สรุปสถิติแผ่นดินไหววันนี้"
  • "แผ่นดินไหวเกิดที่ไหนบ่อยที่สุด"

Data Source

  • API: Thai Meteorological Department (TMD)
  • URL: https://data.tmd.go.th/api/DailySeismicEvent/v1/
  • Update Frequency: Daily
  • Coverage: Regional and Global earthquake events

Troubleshooting

ปัญหา: ModuleNotFoundError

สาเหตุ: ไม่ได้ activate conda environment

วิธีแก้:

conda activate mcp-tmd

ปัญหา: Claude Desktop ไม่เห็น Server

สาเหตุ: Python path ไม่ถูกต้อง

วิธีแก้:

  1. ตรวจสอบ python path ด้วย where python (ใน activated env)
  2. ใช้ absolute path ใน config file
  3. Restart Claude Desktop

ปัญหา: API Timeout

สาเหตุ: TMD API อาจช้าหรือไม่ตอบสนอง

วิธีแก้:

  • ลองใหม่อีกครั้ง
  • ตรวจสอบ internet connection
  • Cache จะช่วยลด API calls

Project Structure

C:\Users\Asus\tmd-weather-mcp\
├── earthquake_server.py      # Main MCP server
├── requirements.txt           # Python dependencies
├── README.md                  # This file
└── .gitignore                # Git ignore rules

License

MIT License

Author

Created for TMD Earthquake Data Integration with MCP

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured