Your AI client
Chooses a focused tool and sends semantic PTDF blocks instead of HTML or CSS.
create_document
Connect Codex or another MCP client to a focused local bridge that validates structured content and returns a document people can review, edit and control.
Credentials stay in the local process. The model receives tools, never your bearer token.
Model Context Protocol
The server translates a small set of MCP tool calls into validated pasteToPrint document operations. It does not expose the complete API or a general browser.
Chooses a focused tool and sends semantic PTDF blocks instead of HTML or CSS.
create_document
Validates input, protects credentials and calls only the required Document API route.
stdio · local process
Receives separate editable and read-only links. Import still requires a human decision.
editorUrl · viewUrl
Six focused capabilities
Read-only discovery comes first. Creation and updates remain explicit, temporary and reviewable.
list_templatesReturns the current catalog of stable presentation templates and the default template ID.
get_document_schemaReturns the published JSON Schema Draft 2020-12 contract for PTDF 1.0.
validate_documentValidates and normalizes a complete PTDF document locally without creating a session.
create_documentCreates a temporary editor session and returns separate editing and viewing links.
update_documentReplaces document content or permissions, with optional ETag protection against stale updates.
get_document_linksRefreshes editable and read-only links without returning document content or management secrets.
Quick setup
Install dependencies once, register the local process, then restart your client so it can discover the six tools.
Use Node.js 20 or newer and install the locked dependencies.
Add the local server command to Codex or another MCP client.
Restart the client and confirm that all six tools appear.
cd C:\laragon\www\pasteToPrint\integrations\mcp
npm.cmd ci --ignore-scripts
codex mcp add pastetoprint \
--env PASTETOPRINT_API_BASE_URL=https://www.pastetoprint.com \
-- node C:\laragon\www\pasteToPrint\integrations\mcp\src\server.js
codex mcp get pastetoprint
codex mcp list
[mcp_servers.pastetoprint]
command = "node"
args = ["C:\\laragon\\www\\pasteToPrint\\integrations\\mcp\\src\\server.js"]
startup_timeout_sec = 20
tool_timeout_sec = 60
enabled = true
[mcp_servers.pastetoprint.env]
PASTETOPRINT_API_BASE_URL = "https://www.pastetoprint.com"
# PASTETOPRINT_API_TOKEN = "ptp_ai_..."
{
"mcpServers": {
"pastetoprint": {
"command": "node",
"args": [
"C:\\laragon\\www\\pasteToPrint\\integrations\\mcp\\src\\server.js"
],
"env": {
"PASTETOPRINT_API_BASE_URL": "https://www.pastetoprint.com"
}
}
}
}
$env:PASTETOPRINT_API_BASE_URL = "https://www.pastetoprint.com"
# Optional: $env:PASTETOPRINT_API_TOKEN = "ptp_ai_..."
node C:\laragon\www\pasteToPrint\integrations\mcp\src\server.js
The server uses STDIO, so standard output is reserved for MCP messages. Runtime diagnostics go to standard error. Open the complete setup guide →
Environment settings
Configure the bridge through process environment variables. Do not paste credentials into a chat, tool input or document.
PASTETOPRINT_API_BASE_URL
https://www.pastetoprint.com
Base URL for Document API v2. Plain HTTP is accepted only for loopback testing.
PASTETOPRINT_API_TOKEN
Not set
Optional bearer token. It remains inside the MCP process.
PASTETOPRINT_DOCUMENT_TTL
API tier
Requested default session lifetime from 60 to 604800 seconds.
PASTETOPRINT_REQUEST_TIMEOUT_MS
15000
Maximum time for one API request, capped at 120000 milliseconds.
PASTETOPRINT_MAX_RESPONSE_BYTES
131072
Maximum accepted JSON response size, capped at one MiB.
Security model
The local process owns the API token and temporary session management tokens. Tool outputs contain only the links and non-secret identifiers needed for the handoff.
Recommended tool sequence
This sequence keeps model output constrained and makes every network-side change intentional.
Call the template catalog and document schema when the structure is unfamiliar.
list_templates · get_document_schemaNormalize the complete PTDF document before creating any remote session.
validate_documentUse a stable idempotency key and create the temporary editor session.
create_documentGive the editor URL to a person who will review, or the view URL for read-only sharing.
editorUrl · viewUrlDiagnostics
Start with the client registration, then check runtime, network access and API policy in that order.
Confirm that the server is enabled, the script path is absolute and the MCP client was restarted after configuration.
codex mcp get pastetoprint
Verify Node.js 20 or newer, install dependencies and run the integration test from the MCP directory.
npm.cmd test
Check the base URL, TLS access, proxy policy and whether the production endpoint returns JSON without a redirect.
PASTETOPRINT_API_BASE_URL
Validate PTDF first, inspect the readable field error and confirm that token scopes allow the requested operation.
validate_document
Frequently asked questions
For normative behavior and exact input schemas, use the technical MCP documentation.
Open MCP specificationNo. The token stays in the environment of the local MCP process and is added only to eligible API requests.
No. Anonymous mode works without a token and uses a conservative session lifetime. A provisioned token enables the assigned API tier.
No. It creates a temporary handoff. A person must open, review and confirm the document before printing or export.
No. Creation and updates accept semantic PTDF 1.0 blocks so the document remains predictable and safely renderable.
Any local MCP client that supports STDIO servers and process environment variables can connect to it.