OpenAI
Guide MCP
What is an MCP server?
An MCP server exposes structured tools to an AI client. With Foliade, Codex or Claude Code can convert a PDF, retrieve its link, and view its analytics without manually reproducing API calls.
A common server, two plugins
The same hosted server connects Codex and Claude Code to your account. Both plugins provide instructions for transferring a local PDF securely.
An application using the REST API must provide an account key. MCP uses OAuth for your account, or a private token limited to the upload for guest mode.
Before you start
MCP is included for free, with or without an account. Codex and Claude Code follow your plan permissions; their own access terms remain separate.
Install the plugin, connect your account and authorize access. No local server, API key or Python installation is required.
Connect your account in Codex
Installing the plugin does not connect your account yet. After installation, run this command in your computer's terminal, outside the Codex conversation:
codex mcp login foliade
On the Foliade page that opens, sign in, check the account email and authorize the connection. Then return to your assistant.
If the browser does not open, open the link shown in the terminal. Do not share this sign-in link.
Wait for the terminal to confirm that login succeeded before continuing. There is no API key to copy.
Check the connection and send your first PDF · Install in Claude Code
Transferring a local PDF
The remote server cannot read files from a path on your computer. The plugin computes the selected file's size and SHA-256 digest, prepares an upload, transfers its bytes over HTTPS, then finalizes the draft.
The conversion is asynchronous. The assistant checks its result before announcing success. Public publication requires a separate action; the draft remains private by default.
Control and revoke access
In Foliade → API → Connected assistants, you can revoke each connection. Access ends immediately without deleting your catalogues.
These guides cover Codex and Claude Code with local file access. They do not guarantee attachment transfers in ChatGPT, Claude web, Claude Desktop or Cowork.
Plugin enabled, but MCP tools unavailable
An enabled plugin may still fail to connect to the server. Check the MCP status and error message before reinstalling the plugin or reconnecting your account.
- If the server cannot be found, check that the plugin is installed and enabled.
- If the connection exceeds the startup timeout, check the MCP logs. A timeout after 30 seconds does not prove that your OAuth connection has expired.
- If a Cloudflare 403 response reports error 1010 or browser_signature_banned, Browser Integrity Check is blocking the HTTP client before it reaches Foliade. Increasing the startup timeout does not fix this rejection.
- If Foliade returns 401 or invalid_token, reconnect your account through OAuth. Do not replace this connection with guest access.
What should I do if Cloudflare blocks the connection?
For the hosted Foliade service, contact our support team with the time and time zone, affected URL, error code and Cloudflare Ray ID if shown. Do not send tokens, cookies, login links or private documents. There are no Cloudflare settings to change on your computer.
Service Status · Contact Foliade support
After the server has been fixed, restart your assistant to reload the MCP tools, then ask it to check the connected Foliade account. Send the PDF only once the tools are available and the account email has been confirmed.
For server operators: fix Browser Integrity Check
This procedure is for the server’s Cloudflare administrator. First check that Browser Integrity Check caused the rejection; a timeout alone may have another cause.
- In Cloudflare, open the server’s zone, then Rules → Configuration Rules. Create a rule with a custom expression limited to the hostname and MCP and OAuth routes.
- Add only the Browser Integrity Check setting and turn it off in this rule. Keep the other protections, authentication and rate limits in place.
Expression used for the Foliade server. For another server, adapt the hostname and routes to its implementation:
(http.host eq "foliade.gekkode.com" and (
http.request.uri.path in {
"/mcp" "/authorize" "/token" "/register" "/revoke"
"/.well-known/oauth-authorization-server"
"/.well-known/oauth-protected-resource"
"/.well-known/oauth-protected-resource/mcp"
}
or starts_with(http.request.uri.path, "/mcp/uploads/")
))
After deployment, test with the same HTTP client: initialize, tools/list and OAuth metadata discovery must succeed. Foliade advertises 35 tools; access to catalogues without authentication must still return 401.
To roll back, disable only this rule. Avoid disabling Cloudflare protections globally or changing the user agent to conceal the problem.
Cloudflare: error 1010 · Cloudflare: disable this check for specific routes
Anthropic