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

@maptec/mcp-server-node

v1.0.1

Published

MapTech MCP Server (Node.js / TypeScript) - stdio transport for Cursor / Claude Desktop

Readme

@maptec/mcp-server-node

Maptec的webapi服务已全面兼容MCP协议。 Maptec MCP Server支持10个LBS服务能力,包含了地点检索、周边检索、输入提示、地点详情、地理编码、逆地理编码、路线规划、距离矩阵、轨迹纠偏、IP定位。

环境变量

| 变量 | 默认值 | 说明 | |------|--------|------| | MAPTEC_API_KEY | — | 必填mp_1_... 格式 | | MAPTEC_BASE_URL | https://api.maptec.cn | WebAPI 地址 | | MAPTEC_TIMEOUT_MS | 30000 | HTTP 超时(毫秒) |

快速开始

1. 注册账号并申请 AK

前往 Maptec 开发者中心 注册账号,创建应用并申请 API Key(AK,mp_1_... 格式)。

2. 安装 npm 包

npm i @maptec/mcp-server-node

3. 在 Cursor 中配置 MCP

以 Cursor 为例,在其 MCP 配置中加入以下内容,填入上一步申请的 API Key 后保存,进入 Settings → MCP → Reload

{
  "mcpServers": {
    "maptec": {
      "command": "npx",
      "args": ["-y", "@maptec/mcp-server-node"],
      "env": {
        "MAPTEC_API_KEY": "mp_1_YOUR_KEY",
        "MAPTEC_BASE_URL": "https://api.maptec.cn"
      }
    }
  }
}

确认 maptec 为绿点 Connected,展开可见 10 个 Tool。

上述 mcpServers 为 MCP stdio 通用配置,Claude Desktop、Cline、Windsurf 等支持 MCP 的客户端同样适用,差异仅在于配置文件位置与重载方式。

4. 应用场景示例:第三方智能体调用 MCP 查询美食

除 Cursor 等 IDE 外,任何支持 MCP 的第三方智能体(如基于 LangChain、OpenAI Agents SDK、Claude Agent、或自研 Agent 框架)都可通过官方 MCP 客户端以 stdio 方式拉起本服务,把 10 个 LBS Tool 暴露给大模型自动编排。下面以「查询美食」为例。

第三方 Agent 接入(stdio 启动 + 传入 API Key):

以官方 MCP TypeScript SDK 为例,Agent 在初始化时以子进程方式拉起 MCP Server,随后 listTools() 拿到工具清单交给大模型:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

const transport = new StdioClientTransport({
  command: "npx",
  args: ["-y", "@maptec/mcp-server-node"],
  env: {
    MAPTEC_API_KEY: "mp_1_YOUR_KEY",
    MAPTEC_BASE_URL: "https://api.maptec.cn",
  },
});

const client = new Client({ name: "food-finder-agent", version: "1.0.0" });
await client.connect(transport);

// 交给大模型:把工具清单作为 function/tool 列表
const { tools } = await client.listTools();

// 大模型决定调用某个工具时:
const result = await client.callTool({
  name: "map_search_nearby",
  arguments: { query: "火锅", locationLimit: { center: { latitude: 1.3048, longitude: 103.8318 }, radius: 2000 }, resultLimit: 5, region: "SG" },
});

Python 智能体同理:用 mcp 官方库的 stdio_client + ClientSessioncommand/args/env 与上方一致。

用户提问(发给第三方智能体):

我在新加坡乌节路附近,想找评分高的火锅店,推荐几家,并告诉我从这里去最近一家怎么走。

Agent 编排流程:

sequenceDiagram
    participant U as 用户
    participant LLM as 智能体大模型
    participant MCP as Maptec MCP
    U->>LLM: 找乌节路附近评分高的火锅店并给出路线
    LLM->>MCP: map_search_geocode(乌节路)
    MCP-->>LLM: 坐标
    LLM->>MCP: map_search_nearby(火锅, center, resultLimit)
    MCP-->>LLM: POI 列表(placeId...)
    LLM->>MCP: map_search_places(placeId)
    MCP-->>LLM: 店铺详情
    LLM->>MCP: map_routes_directions(origin, destination, walking)
    MCP-->>LLM: 步行路线
    LLM-->>U: 自然语言推荐 + 导航

关键工具调用示例:

  1. map_search_geocode 把地址转为坐标:
{
  "address": "乌节路, 新加坡",
  "region": "SG"
}
  1. map_search_nearby 以坐标为中心检索周边火锅店:
{
  "query": "火锅",
  "locationLimit": {
    "center": { "latitude": 1.3048, "longitude": 103.8318 },
    "radius": 2000
  },
  "resultLimit": 5,
  "region": "SG"
}
  1. map_search_places 取 Top 店铺详情,placeId 来自上一步结果:
{
  "placeId": "PLACE_ID_FROM_NEARBY",
  "language": "zh-CN",
  "region": "SG"
}
  1. map_routes_directions 规划到最近一家的步行路线:
{
  "origin": { "latitude": 1.3048, "longitude": 103.8318 },
  "destination": { "latitude": 1.3021, "longitude": 103.8360 },
  "mode": "walking"
}

Agent 最终回答示例:

已为你找到乌节路附近 3 家评分较高的火锅店:

  1. 海底捞火锅(ION Orchard)— 评分 4.6,营业至 22:30,步行约 6 分钟;
  2. 小龙坎老火锅(313@Somerset)— 评分 4.5,营业至 23:00,步行约 9 分钟;
  3. 谭鸭血老火锅(Orchard Central)— 评分 4.4,营业至 22:00,步行约 11 分钟。

最近的是海底捞(ION Orchard),从你当前位置沿乌节路向东步行约 450 米、6 分钟即可到达。

以上全部由大模型自动调用 MCP 工具完成,用户无需关心任何接口参数。

Tool 列表

| Tool | 说明 | |------|------| | map_search_text | 关键字检索 | | map_search_nearby | 周边检索 | | map_search_suggest | 输入提示 | | map_search_places | 地点详情 | | map_search_geocode | 地理编码 | | map_search_reverse | 逆地理编码 | | map_routes_directions | 路线规划 | | map_matrix_distance | 距离矩阵 | | map_track_snap_to_roads | 轨迹纠偏 | | map_location_ip | IP 定位 |

License

MIT © 2026 Maptec