← Files SignContractARCHIVED FILE

README.md

13.1 KB · Nov 29, 2026 · 18:18 UTC

↓ Download file

# SignContract for ChatGPT

This package connects ChatGPT to SignContract's remote MCP server. `plugin.json` contains the portable package identity and OpenAI review metadata; `mcp.json` points to the OAuth protected Streamable HTTP service. Signatures are completed in the existing SignContract signing interface.

## Tools

- `list_templates` and `get_template` list the connected account's standalone templates, signer roles, and configured fields.
- `list_documents` and `get_document` help ChatGPT find an existing standalone document and resume it, including its current signer setup and an expiring editor link.
- `create_template`, `update_template`, `duplicate_template`, and `delete_template` manage independent reusable templates. Deletion requires explicit confirmation.
- `create_signing_request_from_template` copies a template into an independent signing request and maps signers to roles. It does not send invitations.
- `prepare_document`, `create_document`, and `upload_document` prepare one-time PDFs from supported ChatGPT file references, PDF bytes, public HTTPS URLs, or an owned reusable template. Their MCP App association opens the embedded editor in ChatGPT when the host supports MCP Apps; they never email signers.
- `get_document_fields`, `configure_document_fields`, `assign_fields_to_signers`, and `validate_document_fields` read or update field definitions using the existing supported field types and validation rules.
- `add_signers` configures one or more recipient addresses without sending mail.
- `add_signer`, `update_signer`, `remove_signer`, and `list_signers` manage the signer list before invitations. Removal requires explicit confirmation and fields must be reassigned first.
- `send_invitations` / `send_signing_invitations` send invitations only after the user approves the exact recipients in ChatGPT and the host permits the destructive tool call. Duplicate sends are rejected.
- `check_signing_progress`, `get_document_status`, and `get_signing_status` return document and signer progress; `get_signing_audit_trail` returns the owner's existing audit evidence.
- `get_signed_pdf` / `download_signed_document` return a five minute HMAC-authorized download URL only after signing completes.
- `open_document_editor` reopens the embedded editor for an owned document and provides an external SignContract editor fallback when the host does not support MCP Apps.
- `open_signcontract_workspace` opens the ChatGPT workspace for template selection and PDF upload. Selecting a template or uploading a PDF mounts the same interactive PDF editor in that current panel.
- `get_credit_balance` returns the available credits for the connected account.

The embedded MCP App reuses SignContract's existing PDF viewer/editor for previewing PDFs and placing, assigning, moving, resizing, and removing signature, agreement, checkbox, radio, text, and date fields. It provides a signer assignment preview and a review step that displays recipients and expiry before sending. Invitations are sent only when the user clicks **Confirm & send invitations** in the editor and the host separately allows the `send_invitations` action. Field placement and recipient configuration alone never send email. Signer completion continues in SignContract's existing signing interface so its authentication, consent, evidence, audit, and final-PDF logic remain authoritative. `complete_signing_session` is intentionally not an MCP tool: a model must never submit a signature for a signer.

The standalone website has a **Templates** section at `/templates`. Users can create a template from a PDF, configure signer roles and fields in the existing visual editor, then reuse it. One-time uploads remain on the existing upload and signing flow; they are never automatically saved as templates. Template files and signing requests are independent copies, so later template edits or deletion do not affect prior requests.

## Reviewer test instructions

Use only the dedicated SignContract review account and non-sensitive sample PDFs. Use controlled test signer inboxes for email delivery. Never use customer documents or real recipients. The OpenAI review portal stores private reviewer credentials separately; do not put them in this package.

Run the five positive cases in `plugin.json` in order as relevant. For the signing test, configure fields, verify recipients and expiry in the embedded editor, explicitly approve the exact recipients, send, complete signing in SignContract, then verify progress and retrieve the signed PDF. For billing, inspect plan and credit data; only proceed to a Stripe checkout or billing portal if the reviewer explicitly confirms.

Run the three negative cases in `plugin.json`: no invitation approval (no email sent), cross-account document UUID (not found with no data disclosure), and signed PDF before completion (no download URL).

## Demo recording script

Record a short reviewer-accessible walkthrough using only the dedicated review account, a non-sensitive sample PDF, and controlled signer inboxes. Show: (1) OAuth sign-in and the consented scopes; (2) listing templates and preparing a sample PDF; (3) placing and assigning a field in the embedded editor; (4) adding test signers, showing recipient addresses and expiry, then explicitly confirming invitation delivery; (5) completing a test signature and retrieving the completed PDF; (6) checking credits and plan information; and (7) explaining that checkout and subscription management open Stripe-hosted pages and require explicit confirmation. Do not show credentials, customer documents, payment details, or secret URLs. Upload the finished video to a reviewer-accessible URL and enter that URL in `review.demo_recording_url` before submission. No recording URL is currently included because no video artifact was provided.

## Submission checklist

- [ ] Upload `dist/signcontract-chatgpt-plugin.zip` through ChatGPT → Plugins → Upload new or existing plugin.
- [ ] Select the verified SignContract developer identity and complete organization/business verification as needed.
- [ ] Connect the MCP server, complete the domain challenge, authorize OAuth, and inspect the discovered tool scan.
- [ ] Enter dedicated reviewer account credentials and sign-in instructions in the private Review details form. The current OAuth login uses an emailed six-digit code; arrange a reviewer-compatible sign-in path/account because OpenAI requires review access without email/SMS codes, magic links, MFA approval, or private-network access.
- [ ] Record and add an accessible walkthrough video URL (the package intentionally has no invented URL); keep sample data and reviewer access available.
- [ ] Resolve required metadata and MCP setup findings, then submit manually for review. Publishing remains a separate manual step after approval.



## Public URL and endpoint verification status

This environment could not resolve `signcontract.app` or `api.signcontract.app`, so no live HTTP status, redirect chain, HTML body, OAuth discovery response, DCR response, or MCP handshake is claimed. The Laravel route source defines the privacy (`/privacy`), terms (`/terms`), and support (`/contact`) pages, and the router renders privacy and terms as Vue pages using locale bundles. Before submission, verify from a public network that unauthenticated GET requests return successful HTML containing the actual policy and terms text without JavaScript. The source locale includes unresolved legal placeholders such as `{companyName}`, `{contactEmail}`, `{address}`, `{lastUpdated}`, and `{governingLaw}`; have the publisher confirm/fill these values without changing policy meaning. If the response is only the app shell, deploy server-side/static rendering for those routes. No legal text or production website configuration was changed during this packaging task.

The MCP configuration matches the Laravel source declarations: Streamable HTTP `/api/mcp`; OAuth DCR at `/api/oauth/register`; authorization and token endpoints under `/api/oauth/authorize` and `/api/oauth/token`; scopes `documents:read`, `documents:write`, `billing:read`, and `billing:write`. The server source advertises `readOnlyHint`, `destructiveHint`, `idempotentHint`, and `openWorldHint` annotations. Live endpoint discovery and the portal's tool scan still need to be completed in the dashboard.

## Package files

The archive contains the official Agent Plugins `plugin.json` and `mcp.json`, this README, and the existing 256 px SignContract icon. Version 1.0.2 uses three starter prompts and includes five positive and three negative cases in the documented `review.test_cases` schema, plus factual Stripe commerce disclosures. OAuth uses DCR and contains no client secret.

## Deployment configuration

MCP remains disabled by default. Deploy the Laravel migration, confirm the frontend OAuth email-code route and mail delivery, then set `MCP_ENABLED=true`, `APP_URL=https://api.signcontract.app`, and configure `FRONTEND_URL` and `CLIENT_URL` to the verified public frontend origin plus the master encryption key. Use shared Redis or another lock-capable cache across app instances, persistent encrypted document storage, HTTPS, and the existing mail transport. The backend exposes authorization server discovery, protected resource metadata, DCR, OAuth authorize/token routes, and `/api/mcp`. Set trusted proxy configuration correctly, and redact MCP signing and download capability query parameters from access logs. Template access is limited to the signed-in account's own documents and commerce sites whose business account has that same owner email.

## Local validation

Run focused feature tests from `backend/` with `vendor/bin/phpunit --filter 'McpIntegrationTest|StandaloneTemplateFeatureTest'`. They require the repository's guarded MySQL database `app_test_db`. Template metadata and field assignments use existing contract JSON columns, so the integration adds no new table or migration; deploy the existing MCP OAuth/idempotency migration with `php artisan migrate --force`. Build the standalone frontend from `frontend/` with `npm run build`, and build the MCP App bundles with `npm run build:mcp-app`. The MCP build produces `backend/resources/mcp/signcontract-editor.v3.html` and `backend/resources/mcp/signcontract-workspace.html`; deploy both generated resources together with the Laravel changes.

## Manual ChatGPT test setup

1. Build the MCP Apps with `cd frontend && npm run build:mcp-app`. Deploy the Laravel changes and both generated resources under `backend/resources/mcp/` together. Configure HTTPS `APP_URL`, `FRONTEND_URL=https://signcontract.app`, mail, encrypted storage, shared cache locks, and `MCP_ENABLED=true`. The OAuth callback/login uses cross-origin cookies between `signcontract.app` and `api.signcontract.app`; ensure Laravel session cookies use `.signcontract.app`, `SameSite=None; Secure`, and credentialed CORS allows the exact frontend origin.
2. In ChatGPT, open **Plugins → + → Add custom MCP server**. Enter `https://api.signcontract.app/api/mcp`, configure OAuth if not auto-discovered, review the risk notice, and select **Create as a plugin**. Current connection steps are in OpenAI's [connect and test guide](https://developers.openai.com/plugins/deploy/connect-chatgpt).
3. Start the connection. Enter the SignContract email address, verify the emailed six-digit code, and approve the displayed read/write scopes.
4. Open the SignContract workspace, use a template, then return with **Back to Documents** and upload a one-time test PDF. Both actions should transition the current workspace panel to the editor, render the PDF pages, and expose field controls. Place and assign fields, save, add controlled test signers, and open **Review & Send**. If the host cannot render MCP Apps, use `open_document_editor` to obtain the existing external editor fallback.
5. Verify that the editor shows the exact recipients and expiry and has not sent invitations. Click **Confirm & send invitations** to send only to controlled test inboxes. Complete signing in the existing SignContract interface, then check progress and retrieve the short-lived signed-PDF link.
6. Run the negative checks above. Keep invitations pointed only at controlled test inboxes. Verify the in-panel workflow in ChatGPT itself; local checks cannot certify the host's iframe behavior. Do not submit publicly until the OAuth/setup flow, test checklist, accessible reviewer account, walkthrough video, and domain verification are all complete. For current ChatGPT navigation, see OpenAI's [connect and test guide](https://developers.openai.com/plugins/deploy/connect-chatgpt).

## Package contents

- `plugin.json`: portable Agent Plugins manifest, listing text, positive/negative review cases, and release notes.
- `mcp.json`: OAuth DCR configuration for the remote SignContract MCP service.
- `README.md`: deployment, manual test, and review preparation instructions.

Create the upload artifact from this directory with `zip -r signcontract-plugin.zip plugin.json mcp.json README.md`. Do not include secrets. Package submission still requires a live deployed endpoint and review account/video materials. OpenAI requires reviewer access without email/SMS codes, magic links, MFA approval, or private-network access; the current email-code OAuth login therefore needs a reviewer-compatible sign-in path before submission.

SHA-256: 444d6f73b72fa8d9e4eea386b287feee5bad414e853dd712e7d698a008b7f785