PH Schools MCP Server
Enables querying and analyzing the Philippine schools masterlist dataset, including searching schools, listing regions and divisions, and getting school details by BEIS ID.
README
PH Schools MCP Server
Local stdio MCP server for querying and analyzing the Philippine schools masterlist dataset.
What This Server Provides
Tools:
search_schoolsget_school_by_beis_idlist_regionslist_divisionsdataset_stats
Install and Run
npm install
npm start
Use npm start only when running from this repo manually.
Which Setup to Use
- VS Code MCP (
.vscode/mcp.json): enough for normal usage. If status isRunning, VS Code already started the server. - Claude Desktop (
claude_desktop_config.json): enough for normal usage. Restart Claude after config changes. npx -y @darwinphi/ph-schools-mcp-server ...: one-off CLI usage without cloning repo.npm install && npm start: local development/maintenance in this repository.
Usage Scenarios
mcp.jsonconfigured, no manualnpx: works for chat tool calls (dataset_stats,search_schools, etc.).- Manual
npx -y @darwinphi/ph-schools-mcp-server, no MCP client config: server process starts, but chat clients won't use it automatically. mcp.jsonconfigured plus manualnpxstart: usually unnecessary; let the MCP client manage start/stop.- One-off commands without MCP chat: use
npx ... --helpornpx ... sync-data ....
Without MCP client config, automatic VS Code/Claude tool-calling will not work.
When to Use mcp.json
Use mcp.json for normal day-to-day MCP usage in VS Code (or equivalent client config in Claude Desktop).
Use it for:
- Automatic server startup and lifecycle management by the MCP client
- MCP tool usage directly from chat prompts (
dataset_stats,search_schools, etc.) - Team/project-level shared MCP setup in a workspace
If MCP status shows Running, the client already started the server; manual npm start or manual npx start is usually unnecessary.
When to Use npx
Use npx from a terminal when you need one-off CLI actions without cloning or developing this repo.
Use it for:
- Sanity check that the published package runs:
npx -y @darwinphi/ph-schools-mcp-server --help - Manual dataset download/update:
npx -y @darwinphi/ph-schools-mcp-server sync-data --tag v1.0.1 --output "$HOME/.ph-schools/data.json" - Manual debug startup outside client-managed MCP lifecycle:
npx -y @darwinphi/ph-schools-mcp-server
Do not use npx start as a replacement for VS Code/Claude MCP config. In normal usage, let the MCP client manage server startup from its config.
When to Use npm install and npm start
Use these when working from this repository (developer/maintainer workflow), not for normal client usage.
Use them for:
- Local development while editing source files in this repo
- Running tests before commits/releases
- Debugging local unpublished changes
Typical local workflow:
npm install
npm test
npm start
If your VS Code/Claude MCP config is already working, you usually do not need to run npm start manually.
CLI (published package)
# Start MCP server over stdio
npx -y @darwinphi/ph-schools-mcp-server
# Sync canonical dataset once to a chosen path
npx -y @darwinphi/ph-schools-mcp-server sync-data --tag v1.0.1 --output "$HOME/.ph-schools/data.json"
Quick Verify
npx -y @darwinphi/ph-schools-mcp-server --help
npx -y @darwinphi/ph-schools-mcp-server sync-data --tag v1.0.1 --output "$HOME/.ph-schools/data.json"
Dataset Configuration
This server is hybrid by default:
- If local dataset file exists, it uses that file immediately.
- If local dataset file is missing, it auto-downloads from the canonical dataset URL and caches locally.
Default canonical URL (pinned tag v1.0.1):
https://raw.githubusercontent.com/darwinphi/ph-schools-dataset/v1.0.1/schools_masterlist_2020_2021.json
Runtime env vars:
PH_SCHOOLS_DATA_PATH: preferred local JSON file path (used directly if present; auto-synced to this path if missing)PH_SCHOOLS_DATA_URL: override download URL forsync-dataPH_SCHOOLS_DATA_TAG: canonical tag forsync-datawhen URL is not provided
VS Code MCP Config (Copy/Paste)
Set .vscode/mcp.json:
{
"servers": {
"phSchools": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@darwinphi/ph-schools-mcp-server"],
"env": {
"PH_SCHOOLS_DATA_PATH": "/Users/your-user/.ph-schools/data.json"
}
}
}
}
If PH_SCHOOLS_DATA_PATH file is missing, the server automatically downloads from canonical source and writes to that path.
Claude Desktop Config (Copy/Paste)
Update Claude config:
{
"mcpServers": {
"ph-schools": {
"command": "npx",
"args": ["-y", "@darwinphi/ph-schools-mcp-server"],
"env": {
"PH_SCHOOLS_DATA_PATH": "/Users/your-user/.ph-schools/data.json"
}
}
}
}
Alternative if npx is unreliable in your shell: install globally and use "command": "ph-schools-mcp-server".
If PH_SCHOOLS_DATA_PATH file is missing, the server automatically downloads from canonical source and writes to that path.
Typical macOS config file:
~/Library/Application Support/Claude/claude_desktop_config.json
Test Commands
npm test
npm run test:package
Example Prompts
Run dataset_stats and summarize key insights.List all divisions in Region I using list_divisions.Search schools in region "Region I" and division "Ilocos Norte".Get school by BEIS ID 100001 using get_school_by_beis_id.Search schools with query "High School".
Publishing and Release Flow
One-time npm setup (Trusted Publishing):
- On npmjs.com, open package
@darwinphi/ph-schools-mcp-server→ Settings → Trusted publishers. - Add GitHub Actions trusted publisher with:
- Owner/User:
darwinphi - Repository:
ph-schools-mcp-server - Workflow filename:
cd.yml
- Owner/User:
- Do not use
NPM_TOKEN; release workflow uses OIDC (id-token: write).
Manual release flow (v1):
- Update pinned dataset tag in
src/constants.js. - Bump package version:
npm version patch # or minor / major
What npm version patch does:
- Updates
package.jsonversion (e.g.,1.0.1->1.0.2) - Updates
package-lock.jsonversion fields - Creates a git commit
- Creates a git tag (e.g.,
v1.0.2)
- Sync
server.jsonversion to matchpackage.json. - Run:
npm ci
npm test
npm run test:package
- Push commit and tags:
git push
git push --tags
- Create GitHub Release notes from the tag:
gh release create v<new_version> --generate-notes --title "v<new_version>"
Example:
gh release create v1.0.2 --generate-notes --title "v1.0.2"
- Push commit and tags. Tag pushes (
v*) automatically triggerCD Releaseworkflow. - Workflow publishes npm package, then publishes MCP Registry metadata.
For metadata-only updates, use workflow Publish MCP Registry Metadata.
License and Data Provenance
- Code license: ISC (LICENSE).
- Dataset source:
darwinphi/ph-schools-dataset(canonical repository backed by gov.ph source data). - Use of dataset remains subject to source terms and applicable policies.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。