mcp-url-locator · 网页 URL 定位 MCP 工具
一套符合 MCP 协议 的智能体工具:根据用户输入 返回对应网页的 URL。Agent 只需给出关键词或自然语言问题,即可拿到匹配网页的标题、 可点击链接与摘要,便于继续打开或引用原文。
工具列表
| 工具 | 用途 | 关键参数 |
|---|---|---|
find_webpage_url |
根据用户输入返回对应网页的 URL(标题 + 链接 + 摘要) | query、max_results、site |
query 为用户检索词(如「西北农林科技大学 招生」);max_results 默认 10、上限 30;
site 用于限定站点域名(如 nwafu.edu.cn),只返回该站内网页,留空则不限定。
快速开始(本地)
cd mcp-url-locator
uv sync --extra dev
uv run mcp-url-locator
验证工具是否已注册:
uv run python -m url_locator.tools_probe
部署到魔搭社区(可托管部署)
魔搭 STDIO 托管只支持 npx / uvx,且只能拉取已发布到 PyPI 的包。服务配置如下:
{
"mcpServers": {
"url-locator": {
"command": "uvx",
"args": ["mcp-url-locator"],
"env": {
"URL_LOCATOR_SEARCH": "duckduckgo",
"URL_LOCATOR_MAX_RESULTS": "10",
"URL_LOCATOR_TIMEOUT": "15"
}
}
}
}
创建步骤:
- 打开 创建 MCP 服务,保持 「从 GitHub 仓库快速创建」。
- GitHub 地址填本仓库地址,英文名称填
url-locator,托管类型选 「可托管部署」。 - 平台会自动解析本 README 的首个服务配置并执行部署检测
(
uvx安装包 → 连接 →list_tools),通过后即可在工具页测试使用。
同一份配置也可直接用于 Claude Desktop / Cursor 等本地客户端。
环境变量
| 变量 | 说明 |
|---|---|
URL_LOCATOR_SEARCH |
搜索引擎后端:duckduckgo(默认)或 bing |
URL_LOCATOR_MAX_RESULTS |
默认返回条数(默认 10) |
URL_LOCATOR_MAX_RESULTS_CAP |
单次返回上限(默认 30) |
URL_LOCATOR_TIMEOUT |
单请求超时秒数(默认 15) |
URL_LOCATOR_SITE_RESTRICT |
逗号分隔的站点白名单,进一步收敛结果 |
URL_LOCATOR_USER_AGENT |
自定义 User-Agent(默认内置 UA) |
URL_LOCATOR_TRANSPORT |
stdio(默认)或 streamable-http |
远程 HTTP 部署(Docker / Serverless)
uv run mcp-url-locator --transport streamable-http --port 8000 --auth-token 换成随机长令牌
或使用仓库 Dockerfile 构建镜像,健康检查端点位于 GET /healthz。
合规说明
仅检索公开可见的网页,不绕过登录 / 权限校验;内置随机 User-Agent、超时与限速, 请勿高频抓取。重要信息请以原始网页为准。
Metadata
Release files for mcp-url-locator 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_url_locator-0.1.0.tar.gz | 10.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_url_locator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.8 kB
Release files / mcp_url_locator-0.1.0.tar.gz
| Download URL | mcp_url_locator-0.1.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4bfc4ad6ef476a6781d5fdaf0644581b2d93bcf8083f0ad467feffea152f80f
|
|
BLAKE2b-256 checksum How to use checksums |
13590b91ac1ac8fe79e8d2affe5a85f1e794f1d274b1df2755fd356ee7787431
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mcp_url_locator-0.1.0-py3-none-any.whl
| Download URL | mcp_url_locator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2b6c7473198749c333406760057dd9a645670dd0b9aad8da1016150b1c5af60
|
|
BLAKE2b-256 checksum How to use checksums |
47660dd0cd7c5da58bfed782050cca7bcf51ed7ad549e2b233be127c737326c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for mcp-url-locator 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.