360 Secure SkillHub
360 安全技能中心

therapyportal-mcp

该 Skill 借助 fpx CLI 与 ContextMint Bridge 浏览器扩展,通过用户已登录的 TherapyPortal 标签页以只读方式获取未来预约、待办与已完成文书、可用表单、应付余额、支付收据和消息线程,并可将表单或收据下载为 PDF;不包含任何写入操作。

分类:生活
chrischall
chrischall
热度 7.34
最近更新 2026-11-12 03:53:26

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add chrischall/therapyportal-mcp
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
therapyportal-fpx
description
Read a TherapyNotes client portal (www.therapyportal.com/p/<practice>/) from a shell — upcoming therapy appointments, document/paperwork requests (pending and completed), always-available practice forms, balances due, payment receipts, secure-message threads, and completed forms or receipts downloaded as PDFs — through the user's signed-in portal tab with the fpx CLI. Use when asked about TherapyPortal / TherapyNotes, therapy appointments or sessions, paperwork the therapist sent, what is owed to the practice, or a therapy receipt.

TherapyPortal (TherapyNotes client portal) via fpx

Every call goes through the user's signed-in portal tab via the ContextMint Bridge browser extension. Read-only: the helper wraps no writes (sending messages, signing forms and paying are all portal writes, and none of them are exposed here).

One-time setup

npm i -g @fetchproxy/cli                     # provides `fpx`
fpx profile add therapyportal --domain therapyportal.com
fpx profile declare therapyportal --allow-download   # BEFORE the first pairing
export THERAPYPORTAL_PRACTICE=example12345  # the code in the portal URL: /p/<code>/
scripts/therapyportal patients               # first call prints a pair code on stderr

Approve the pair code in the ContextMint Bridge popup of the browser that is signed in to the portal. If you run ContextMint Bridge in a second browser, every call also prints refusing an extension whose identity is not the one this MCP paired with and a new pair code on stderr, but the data still arrives on stdout. Do not approve those codes. They come from the other browser, which is being turned away. fpx trust list shows which browser each profile is pinned to; to re-pin, run fpx trust clear fpx-therapyportal and pair from the right browser.

The browser must be signed in to the portal; keep a portal tab open (fpx relays each call through it).

Commands

scripts/therapyportal <command> — stdout is JSON (projected; pipe to jq), stderr is status.

command returns
patients clients linked to this login: PatientId, name, DOB. Get ids here first
appointments upcoming appointments (the portal shows no past ones): start/end, clinician, telehealth, location, which client
documents [pending|completed|all] paperwork the practice sent, with each document's PortalDocumentId, title, status, completed date
forms always-available practice forms (to sign or upload as needed)
counts per client: documents awaiting completion or approval
balances amount due per client
receipts payments, each with PaymentId and the line items it covered
threads <PatientId> [n] that client's message threads; null means none
messages <ThreadId> messages in one thread
download <PortalDocumentId> <PatientId> [type=3] a document as a file; pass the document's PatientDocumentType (3 = a form the client filled in, rendered to PDF; 0 = a file the practice uploaded)
receipt <PaymentId> a payment receipt as a PDF
raw <path> [fields] any /portal/practice/<path>.aspx, unprojected

Downloads land in the browser's download folder (~/Downloads). fpx prints {path, bytes, mime}. Each download is logged by the practice, as it is in the UI.

Examples:

scripts/therapyportal appointments | jq '.appointments[:5]'
scripts/therapyportal documents completed | jq '.[] | .documents[] | {PortalDocumentId, title}'
P=$(scripts/therapyportal patients | jq -r '.[] | select(.FirstName=="Sam") | .PatientId')
scripts/therapyportal threads "$P"

In context groups

The therapyportal MCP (not this fpx helper) joins the health group on an mcp-host gateway. Its canonical reads, each answering one line per item with view: "brief":

  • what's on — therapyportal_list_appointments: upcoming sessions.
  • what's due — therapyportal_list_documents: paperwork still to fill in.

Both take client as their subject: a client's name as listed at start (an enum of the linked clients, e.g. each child in therapy) or a raw patientId. There is no date range; the portal shows future appointments only. Nothing here is canonical for what's new (message threads are unprojected). A compound ask looks like "when is the next therapy session, and are there forms to fill in?" — the group fans out to both reads, once per client. On the browser bridge, when no signed-in portal tab is connected the group answers "needs your browser open" for this source instead of an empty list.

Exit codes

0 ok · 1 usage · 2 bridge unavailable (extension not connected) · 3 bot wall · 4 upstream error (an HTTP error, or the portal's "Page Not Found" page for a bad endpoint or missing field) · 5 signed out (sign in at the portal in the browser, retry).

Privacy rules

These are mental-health records, often about a minor. Use the projected commands. Never print raw document/getpatientsforportaluser: it carries the full demographic record, including address, phone, email, an SSN field, and free-text comments. Run any raw call through jq and pick only the fields you need.

references/endpoints.md covers the wire protocol (why every call needs tnrac + tnv + the numeric portalpractice), each endpoint's fields, and what is not verified yet.