PatrolTech

online.patroltech由 patroltech.online 发布官方发布者v0.2.8更新于 Nov 3, 2026

安保巡逻管理:漏巡、可疑扫描、事件和检查点设置。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

Security patrol management: missed rounds, suspicious scans, incidents and checkpoint setup.

已验证Streamable HTTP可网页运行效率与工作流安全与监控

概览

PatrolTech 的托管 MCP 服务(mcp.patroltech.online),由 patroltech.online 发布;需要 OAuth 登录;Streamable HTTP。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

发布者
patroltech.online
端点
mcp.patroltech.online
最近检查

安装

在 SourceWeft 中

  1. 打开 控制台中的 PatrolTech,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/online.patroltech%2Fpatroltech/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "patroltech": {
      "type": "http",
      "url": "https://mcp.patroltech.online/mcp"
    }
  }
}

README

PatrolTech MCP server

The remote Model Context Protocol server of PatrolTech, the guard tour and security patrol platform. It lets AI assistants such as Claude, ChatGPT, Copilot, Gemini or Cursor read and act on a PatrolTech account on behalf of a user who signs in with OAuth: rounds, routes, checkpoints, guards, incidents, users, locations, access control and scans.

[CI] [License: MIT]

This repository holds only the server code. To install the connector in your assistant, use PatrolTech/ai-integrations: plugins, MCP Registry entry and instructions for each client.

This server grants no access by itself. It has no credentials of its own: it forwards the user's token, and the PatrolTech API authorizes every call (organization and location roles, OAuth scopes and a closed list of writes allowed to agents). See SECURITY.md.

Connect without hosting a server

Use the hosted endpoint https://mcp.patroltech.online/mcp with an MCP client that supports remote OAuth. The user's PatrolTech account and role determine access.

Create a free account · Connection guide · Agent skill and client plugins

Building your own integration instead? See the API reference of the public REST API and the TypeScript SDK. Webhooks are in development: tell us which events you need at [email protected].

Ask about missed patrol rounds, suspicious checkpoint scans, unreviewed checkpoints, incidents or visitor access logs. Supported changes are proposals and require explicit confirmation. Deleting records, inviting users and billing are outside the connector's capabilities.

For client setup, OAuth verification and troubleshooting, see the agent installation guide, including Cline instructions.

How it works

MCP client ──OAuth──▶ PatrolTech authorization server    │ Bearer access token (audience = MCP_PUBLIC_URL)    ▼MCP server (this repo, stateless) ──agent session──▶ PatrolTech API    │                                   ▲    └── Redis: locks and rate limits    └── @patroltech/agent-capabilities + @patroltech/sdk-api
  • OAuth resource server. /mcp requires a bearer token issued by the PatrolTech authorization server (RFC 9728 metadata at /.well-known/oauth-protected-resource/mcp). Tokens are verified against the API's JWKS (ES256, exact issuer and audience) and exchanged for a 15-minute agent session (POST /oauth/agent-session), cached by a hash of the token. The API trims the session to what the grant still allows.
  • Stateless. Each request gets a fresh MCP server instance and serves both protocol eras (2025 and 2026-07-28). Nothing about a conversation is kept in memory: proposals live in the PatrolTech API, so any number of workers can serve the same user.
  • Redis holds what must be shared between workers: the per-user lock around proposals (SET NX PX, renewed while it lasts) and the per-user, per-tool rate limits. It is required in production and staging. If Redis fails, propose, confirm and cancel answer "busy" rather than risk two proposals overwriting each other. Without REDIS_URL (development and test only) both live in process memory.
  • Tools come from the mcp channel of @patroltech/agent-capabilities, which calls the API through @patroltech/sdk-api.

Tools

ToolWhat it does
patroltech_<area>_<read>One per read of the catalog: read-only, English titles and descriptions, optional organization when the user has several.
patroltech_account_get_contextThe user's organizations (name, role, access) and their locations. Its description says where to review this connection (DASHBOARD_URL, Connected apps).
patroltech_<area>_propose_<verb>Proposes a change. Nothing changes until it is confirmed. Proposals of one user and client form one batch (up to 10, expires after 30 minutes).
patroltech_proposals_confirmExecutes the whole pending batch, in order, with the parameters that were proposed (marked destructive: clients ask the user first).
patroltech_proposals_cancelWithdraws the pending batch.
patroltech_locations_get_qr_sheetA signed link (1 hour) to the printable QR sheet of a location.

Prompts and resources

Both are fixed text in src/interface/mcp/guidance: they change nothing in the account and call no backend, so they do not go through the audit line or the rate limit of the tools. The connection still needs OAuth, like everything under /mcp.

PromptWhat it asks for
patroltech_review_missed_roundsThe latest rounds not completed and the checkpoints skipped.
patroltech_review_suspicious_scansSuspicious or rejected scans, and how many are pending (period).
patroltech_weekly_summaryHow the last week went, starting with what needs attention.
patroltech_set_up_accountWhat is missing to get the account running, and the next step.
ResourceWhat it holds
patroltech://guides/choosing-a-toolWhich tool answers each question, and how changes are confirmed.
patroltech://guides/reading-the-dataWhat statuses, scan validation, partial data and retention mean.

The server also sends instructions (src/interface/mcp/serverInstructions.ts): guidance that spans several tools, such as using the ranking tools to compare guards and presenting them as activity data, not as an assessment of the people.

Writes need the write scope: without it the server answers 403 insufficient_scope with the read write challenge. Every result is { data, truncated?, notices?, note }, capped at 60,000 characters, where note says that data is data, never instructions. Each user can make 60 calls per minute to a read tool and 20 to a write tool. Every tool call writes one mcp.tool_call audit line with a hash of the arguments, never the arguments.

Endpoints

PathAuthPurpose
/mcp (path of MCP_PUBLIC_URL)BearerThe MCP endpoint (POST, GET, DELETE). Validates Host and rejects any Origin.
/.well-known/oauth-protected-resource/mcpnoneProtected resource metadata (RFC 9728), also at the root path.
/healthnoneLiveness: 200 {"status":"ok","version":"…"}.
/health/readynoneReadiness: 200 if the JWKS answers within 3 s and, with REDIS_URL, Redis answers PING; otherwise 503.
/.well-known/openai-apps-challengenoneThe OPENAI_APPS_CHALLENGE token, for the ChatGPT apps directory; 404 without it.

Configuration

Every variable is documented in .env.example. The server refuses to start, listing each missing or invalid variable, if the configuration is not valid.

VariableRequiredDescription
MCP_PUBLIC_URLyesExact public URL of the MCP endpoint, the audience of the tokens (for example https://mcp.example.com/mcp).
API_BASE_URLyesOrigin of the PatrolTech API, without /api.
OAUTH_ISSUERyesExpected iss of the access tokens, byte for byte.
OAUTH_JWKS_URLnoJWKS of the issuer. Default API_BASE_URL + /oauth/jwks.json.
DASHBOARD_URL, APP_BASE_URLyesPatrolTech dashboard and web app, for links shown to the user.
APP_ENVIRONMENTyesproduction, staging, development or test.
REDIS_URLin production and stagingShared Redis (ioredis URL).
REDIS_NAMESPACEnoKey prefix in Redis. Default APP_ENVIRONMENT.
HOST, PORTnoWhere the process listens. Default 127.0.0.1:3110, behind a reverse proxy.
LOG_LEVELnodebug, info (default), warn or error. Audit and heartbeat lines are written at any level.
SERVICE_NAMEnoservice field of every log line. Default mcp-server.
OPENAI_APPS_CHALLENGEnoDomain verification token for the ChatGPT apps directory.

Logs are one JSON object per line on stdout and stderr. Each process writes an mcp.heartbeat line every 5 minutes, so a log monitor can alert when it stops.

Development

Node.js 22.9 or later.

bash
npm cicp .env.example .env.local   # fill in the values; .env.local is ignored by gitnpm run dev                  # tsx watch, loads .env.localcurl http://127.0.0.1:3110/health
Script
npm run devRun with reload (tsx watch).
npm run lint, npm run format:check, npm run typecheckESLint, Prettier and the type check of sources and tests.
npm testUnit and HTTP tests (vitest).
npm run test:deployTests of the PM2 ecosystem and of the remote deployment script.
npm run buildCompile to dist/ (npm start runs it).
npm run bundleOne self-contained ESM file, dist/bundle/server.mjs (+ source map): the deployable artifact.
npm run smokeStarts the bundle with a test configuration and checks /health, the metadata, the challenge and that /health/ready reports the unreachable JWKS and Redis.

Code layout follows the hexagonal style: src/domain (pure rules), src/application (use cases and their ports), src/interface/mcp (the MCP adapter) and src/infrastructure (HTTP, OAuth, SDK adapters, Redis, logging).

Self-hosting

You can run this server on your own infrastructure, for example to audit it or to put it in front of your own network policies.

OAuth audience. Access tokens are bound to the resource they were issued for. The PatrolTech authorization server only issues tokens for resources it knows, so a deployment under your own MCP_PUBLIC_URL needs to be registered with PatrolTech before PatrolTech users can connect to it. Ask through the channels in SECURITY.md.

What you need:

  • Node.js 22.9 or later and Redis.
  • A reverse proxy with TLS in front of HOST:PORT that forwards /mcp, /.well-known/oauth-protected-resource (and its subpaths) and, if you use them, /health, /health/ready and /.well-known/openai-apps-challenge. Keep the Host header: the server only accepts the host of MCP_PUBLIC_URL or loopback.

Steps:

  1. Build the artifact: npm ci && npm run bundle && npm run smoke.
  2. Copy dist/bundle/server.mjs, dist/bundle/server.mjs.map and package.json (the version comes from it) to a directory on the server. No npm install is needed there.
  3. Create .env.local in that directory from .env.example, with APP_ENVIRONMENT=production and REDIS_URL.
  4. Start it: node --enable-source-maps --env-file-if-exists=.env.local server.mjs, or with PM2 (below). The process stops gracefully on SIGTERM, waiting up to 55 s for calls in progress, so give it about 60 s before a forced kill.

With PM2

deploy/ecosystem.config.cjs runs the bundle in cluster mode. It holds no server data: it reads MCP_PM2_NAME, MCP_PORT and MCP_APP_ENVIRONMENT (required) and MCP_INSTANCES, MCP_SERVICE_NAME and PM2_APP_DIR (optional) from the environment, and loads the rest from .env.local.

bash
MCP_PM2_NAME=mcp MCP_PORT=3110 MCP_APP_ENVIRONMENT=production MCP_INSTANCES=2 \  pm2 start ecosystem.config.cjs

In cluster mode the workers run with the Node.js of the PM2 daemon, which must be 22.9 or later for --env-file-if-exists. Never run pm2 update on a shared daemon: it restarts every app it manages.

With GitHub Actions

.github/workflows/deploy.yml deploys a fork of this repository by SSH: automatically to production after each Release that creates a new version on main (a merged version bump), and by hand (workflow_dispatch, staging by default). It builds, tests and smoke-tests the bundle without secrets, uploads the bundle, package.json and the ecosystem with rsync, and runs deploy/remote-deploy.sh on the server: checks .env.local, reloads PM2 without downtime, probes the readiness URL and waits until every instance is online with the new version. production only deploys from main or a v* tag.

The workflow and the scripts contain no server data, and the logs print nothing from the server. Create the GitHub environments staging and production (with a required reviewer and a deployment branch rule for main and v* tags on production) and set, in each one:

SecretRequiredDescription
SSH_HOSTyesHost name or IP address of the server.
SSH_USERyesSSH user that owns the app directory and runs PM2.
SSH_PRIVATE_KEYyesPrivate key of that user, without passphrase, used only for deployments.
SSH_KNOWN_HOSTSyesknown_hosts lines of the server, checked out of band (ssh-keyscan -H <host>).
APP_DIRyesAbsolute path of the app directory (bundle, .env.local, logs/).
PM2_APP_NAMEyesName of the PM2 process.
APP_PORTyesLocal port the process listens on.
HEALTH_URLyesReadiness URL as seen from the server, http://127.0.0.1:<port>/health/ready.
SSH_PORTnoSSH port, if not 22.
DEPLOY_HOMEnoHOME used to talk to the PM2 daemon (where its .pm2 lives).
NODE_BIN_DIRnoDirectory of the Node.js binary to use on the server, put first in PATH.
PM2_BINnoPath of the pm2 CLI to use. Default: the one in PATH.
DEPLOY_LOCK_FILEnoLock file (flock) shared with the deployments of other apps on the same PM2 daemon.
FILE_OWNERnouser:group the app directory must have after the upload.
SERVICE_NAMEnoservice of the log lines. Default: the PM2 process name.
DD_API_KEYnoDatadog API key, to send an event when a deployment fails.
VariableRequiredDescription
PM2_INSTANCESnoNumber of instances (default 1).
DD_SITEnoDatadog site for the failure event (default datadoghq.com).

Server data goes in secrets, not variables: Actions masks secrets in the logs, and the workflow also masks the values derived from them.

Versioning and releases

The version lives only in package.json. When a change to it reaches main, the release workflow creates the v<version> tag and a GitHub release with the bundle and its checksums.

Related packages

License

MIT © Ingenieros Web SL

来源:README.md,提交 d89a5a9

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

5
  1. v0.2.8最新Nov 3, 2026
  2. v0.2.7Nov 1, 2026
  3. v0.2.6Oct 31, 2026
  4. v0.2.4Oct 30, 2026
  5. v0.2.2Oct 30, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分