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

@yinyoudexing/geoc-map-publish-api-mcp

v0.2.0

Published

MCP server for geoc_map_publish API tools

Readme

geoc-map-publish-api MCP

这是 geoc_map_publish 项目的 MCP 服务,暴露当前 Apifox 默认模块中的接口工具。

工具

当前版本共暴露 101 个工具:

  • 9 个手写稳定工具,保留原有易读名称和精确入参 schema
  • 92 个从 docs/apifox/geoc-map-publish.openapi.json 生成的发布管理工具,覆盖 MVT、MVT 缓存、WMTS、WFS、信息服务、数据服务、服务分组、矢量图层、样式、titiler 等接口

手写稳定工具:

  • data_query_data_folderPOST /data/query_data_folder
  • data_query_dataPOST /data/query_data
  • info_layer_get_laysPOST /info-layer/get_lays
  • service_group_lsGET /service-group/ls
  • data_fieldsPOST /data/fields
  • data_detailGET /data/detail
  • dataset_query_datasetPOST /dataset/query_dataset
  • dataset_query_dataset_dataPOST /dataset/query_dataset_data
  • info_layer_v2_createPOST /info_layer_v2/create,写入型工具,会创建真实信息服务

生成工具示例:

  • mvt_v2_cr_post:新建 MVT 服务
  • mvt_v2_ls_get:查询 MVT 服务列表
  • wmts_get_wmts_get:查询 WMTS 服务
  • wmts_ed_wfs_patch:编辑 WMTS 服务
  • wfs_v2_ad_wfs_post:新建 WFS 服务
  • info_layer_v2_list_get:查询信息服务列表
  • dataservices_post:新建数据服务

生成工具会按 OpenAPI schema 区分 pathqueryheader 和 body 参数,并支持 JSON、application/x-www-form-urlencodedmultipart/form-data 三类请求体。删除、清理缓存等 destructive 接口不会暴露为 MCP 工具;二进制瓦片读取类接口也没有整理成 MCP 工具,避免 Agent 拉取 .pbf.mvt.png、terrain 等原始数据流。

新增和编辑类工具调用前应先确认参数和影响范围,不要用测试参数直接调用生产后端,也不要配置自动批准。

环境变量

  • GEOC_API_BASE_URL:接口基础地址,默认 https://gis.geo-compass.com/gmpub/api/v1
  • GEOC_API_TOKEN:接口鉴权 token,可直接写 token,服务会自动补 Bearer
  • GEOC_API_AUTHORIZATION:完整 Authorization 值;当已包含 Bearer 时会原样使用

本地运行

npm install
npm run generate:tools
npm run build
GEOC_API_BASE_URL=https://gis.geo-compass.com/gmpub/api/v1 npm start

真实接口调用通常需要在 Codex MCP 配置或启动环境中设置 GEOC_API_TOKEN

更多 AI Agent / IDE / MCP 客户端接入方式见 AGENT_SETUP.md

发布为 npm 包

发布前确认 package.json 中的版本号是新版本,并确认你已经登录可发布当前 scope 的 npm registry。

cd mcp/geoc-map-publish-api
npm whoami
npm test
npm run build
npm pack --dry-run
npm publish

当前包名是 @yinyoudexing/geoc-map-publish-api-mcp,默认按公开 scoped package 发布。若以后要改回 @geoc,需要先在 npm 创建 geoc organization,或把当前账号加入该 organization 并授予发布权限。

npm publish --access public

如果公司使用内网 registry,不要把 registry 写死到包里,优先在本机或 CI 的 .npmrc 中配置:

@yinyoudexing:registry=https://your-npm-registry.example.com/
//your-npm-registry.example.com/:_authToken=${NPM_TOKEN}

Codex MCP 配置

包发布后,Codex 配置应使用 npx 启动,不再依赖本机绝对路径:

[mcp_servers.geoc-map-publish-api]
command = "npx"
args = ["-y", "@yinyoudexing/[email protected]"]

[mcp_servers.geoc-map-publish-api.env]
GEOC_API_BASE_URL = "https://gis.geo-compass.com/gmpub/api/v1"
GEOC_API_TOKEN = "your-token"

升级版本时,先发布新版本,再把 Codex 配置中的版本号改到新版本。不要在包代码、README 或提交中写入真实 token。