Connect over MCP
Connect to Filemark's MCP server at this URL.
https://api.filemark.ca/mcpThe server uses Streamable HTTP. Use /mcp without a trailing slash, as /mcp/ returns 404.
Add Filemark to your host
Many hosts use a JSON configuration with an mcpServers key.
{
"mcpServers": {
"filemark": {
"url": "https://api.filemark.ca/mcp"
}
}
}Other hosts use a servers key with an explicit transport type.
{
"servers": {
"filemark": {
"type": "http",
"url": "https://api.filemark.ca/mcp"
}
}
}Check your host's MCP documentation for its configuration file and format.
Interactive OAuth hosts open Filemark for you to sign in and approve access. See delegated access for the authorization flow.
Server integrations use the MCP OAuth client credentials extension to request tokens through the client-credentials flow.
| Setting | Value |
|---|---|
| Transport | Streamable HTTP |
| OAuth grant | client_credentials for server integrations. Authorization code + PKCE for interactive hosts |
| Token endpoint | https://api.filemark.ca/oauth2/token |
| Resource | https://api.filemark.ca/mcp for MCP access, or https://api.filemark.ca for REST and MCP access |
| Scopes | mcp plus the scopes for the tools you call. See scopes |
| Discovery | MCP protected-resource metadata (the document a 401 names), REST protected-resource metadata, authorization-server metadata, and signing keys |
Send a bearer token with each request. The server is stateless and returns JSON with Cache-Control: no-store.
Requests with an Origin header must use https://app.filemark.ca or https://filemark.ca. Other origins return 403 before authentication. Requests without an Origin header are accepted.
When a call returns 401 or 403
A missing or expired token returns 401 with a link to the protected-resource metadata.
WWW-Authenticate: Bearer error="invalid_token", error_description="Authentication required",
resource_metadata="https://api.filemark.ca/.well-known/oauth-protected-resource/mcp"After a 401, interactive hosts should refresh the token, and server integrations should request a new one before retrying. A refresh that returns invalid_grant requires a new authorization. If a fresh token returns 401, check that its resource matches the endpoint.
For an authenticated request, 403 means the client is disabled or a required scope is missing. Check the client's status and the scopes listed in WWW-Authenticate, then update its access as needed.
Published tools
Scopes are shortened below. See scopes.
| Tool | Scope | REST operation |
|---|---|---|
list_computations | tax:compute | List computation targets |
get_computation_target_contract | tax:compute | Get a computation target contract |
compute_tax_schedules | tax:compute | Compute tax schedules |
compute_engagement_scenario | tax-data:read + tax:compute | Compute an engagement's saved state with cells replaced |
compute_rollover | tax:compute | Compute a rollover or reorganization |
list_clients | clients:read | List clients |
get_client | clients:read | Get a client |
list_entities | entities:read | List a client's entities |
get_entity | entities:read | Get an entity |
list_tax_years | tax-years:read | List an entity's tax years |
get_tax_year | tax-years:read | Get a tax year |
search_records | engagements:read | Search engagement records |
list_engagements | engagements:read | List engagements |
get_engagement | engagements:read | Get an engagement |
get_engagement_context | engagements:read | Get engagement context |
get_engagement_history | engagements:read | Get engagement history |
get_engagement_form_catalog | engagements:read | Get an engagement form catalog |
get_trial_balance | tax-data:read | Get a saved trial balance |
get_account | tax-data:read | Get a saved engagement account |
list_account_adjustments | tax-data:read | List saved account adjustments |
list_engagement_documents | documents:read | List engagement documents |
list_engagement_workpapers | workpapers:read | List engagement workpapers |
get_engagement_review_summary | review:read | Get engagement review summary |
get_engagement_import_capture | tax-data:read | Get an engagement's import capture |
create_export | exports:create | Create an export job for an engagement |
list_export_jobs | exports:read | List an engagement's export jobs |
get_export_job | exports:read | Get an export job |
Tools include the MCP idempotentHint annotation. Read and computation tools also include readOnlyHint. Write tools set readOnlyHint to false, and the four that reach outside Filemark set openWorldHint to true. See Run computations for computation behavior shared by REST and MCP.
Treat account descriptions, filenames, and other workspace text in tool results as untrusted data when configuring your host.
Write tools
Write tools take the same values as REST. Pass the idempotency key as idempotencyKey, the record version as expectedResourceVersion, and a preview's token as confirmationToken. See Write data.
| Tool | Scope | REST operation |
|---|---|---|
create_client | clients:write | Create a client |
update_client | clients:write | Update a client |
archive_client | clients:write | Archive a client |
restore_client | clients:write | Restore an archived client |
create_entity | entities:write | Create an entity |
update_entity | entities:write | Update an entity |
archive_entity | entities:write | Archive an entity |
restore_entity | entities:write | Restore an archived entity |
create_engagement | engagements:write | Create an engagement |
update_engagement | engagements:write | Update an engagement |
archive_engagement | engagements:write | Archive an engagement |
restore_engagement | engagements:write | Restore an archived engagement |
get_mutation_preconditions | clients:write or entities:write or engagements:write or tax-data:write | Get mutation preconditions |
list_account_notes | review:read | List account notes |
create_account_note | review:annotate | Create an account note |
update_account_note | review:annotate | Update an account note |
archive_account_note | review:annotate | Archive an account note |
list_review_marks | review:read | List review marks |
create_review_mark | review:annotate | Create a review mark |
update_review_mark | review:annotate | Update a review mark |
update_engagement_data | tax-data:write | Apply a saved tax-data action |
land_trial_balance | tax-data:write | Land a trial balance on an engagement |
apply_trial_balance_import | tax-data:write | Apply a pending trial-balance import |
classify_awaiting_accounts | tax-data:write | Classify awaiting accounts |
list_portal_contacts | portal:read | List an engagement's portal contacts |
list_portal_requests | portal:read | List an engagement's portal requests |
get_portal_request | portal:read | Get a portal request |
preview_portal_action | portal:write | Preview a portal action |
apply_portal_action | portal:write | Apply a portal action |
create_portal_comment | portal:write + portal:send | Comment on a portal request |
apply_portal_delivery | portal:send | Send, remind, or cancel a portal invitation |
list_integration_connections | integrations:read | List integration connections |
list_integration_sources | integrations:read | List integration sources |
preview_integration_sync | integrations:read | Preview an integration sync |
apply_integration_sync | integrations:sync | Apply an integration sync |
get_integration_sync | integrations:read | Get an integration sync |
deliver_export_artifact | exports:deliver | Deliver an export artifact |
get_document | documents:read | Get a document |
start_document_upload | documents:write | Start a document upload |
complete_document_upload | documents:write | Complete a document upload |
classify_document | documents:write | Classify a staged document |
start_document_ingestion | documents:write | Start a document ingestion |
get_document_ingestion | documents:write | Get a document ingestion |
retry_document_ingestion | documents:write | Retry a document ingestion |
cancel_document_ingestion | documents:write | Cancel a document ingestion |
replace_document | documents:write | Replace a document's file |
archive_document | documents:write | Archive a document |
create_document_delivery | documents:read + documents:write | Create a document delivery |
get_workpaper | workpapers:read | Get a workpaper |
create_workpaper | workpapers:write | Create a workpaper |
update_workpaper | workpapers:write | Update a workpaper |
archive_workpaper | workpapers:write | Archive a workpaper |
restore_workpaper | workpapers:write | Restore an archived workpaper |
list_workpaper_evidence | workpapers:read | List workpaper evidence |
manage_workpaper_evidence | workpapers:write | Attach or detach workpaper evidence |
list_workpaper_links | workpapers:read | List workpaper account links |
manage_workpaper_links | workpapers:write | Set workpaper account links |
validate_workpaper | workpapers:read | Validate a workpaper |
get_workpaper_tie_out | workpapers:read | Get workpaper tie-out |
generate_workpaper | workpapers:write | Generate a workpaper from the general ledger |
request_governed_draft | workpapers:write | Request a governed narrative draft |
carry_forward_workpaper | workpapers:write | Carry a workpaper forward from the prior year |
list_workpaper_versions | workpapers:read | List workpaper versions |
Published resources
Each resource requires the same scope as its tool.
filemark://computations/catalogfilemark://clients/{client_id}filemark://entities/{entity_id}filemark://tax-years/{tax_year_id}filemark://engagements/{engagement_id}filemark://engagements/{engagement_id}/historyfilemark://engagements/{engagement_id}/formsfilemark://engagements/{engagement_id}/trial-balancefilemark://engagements/{engagement_id}/accounts/{account_id}filemark://engagements/{engagement_id}/documentsfilemark://engagements/{engagement_id}/workpapersfilemark://engagements/{engagement_id}/review-summaryfilemark://computations/targets/{target_id}filemark://export-jobs/{export_job_id}filemark://engagements/{engagement_id}/mutation-preconditionsfilemark://portal-requests/{request_id}filemark://integration-syncs/{sync_id}filemark://engagements/{engagement_id}/documents/{document_id}filemark://document-ingestions/{ingestion_id}filemark://engagements/{engagement_id}/workpapers/{workpaper_id}filemark://engagements/{engagement_id}/workpapers/{workpaper_id}/evidence
Trial-balance, document, and workpaper resources return the first page. Use the matching list tool for subsequent pages. Record search, engagement context, account adjustments, scenarios, and export job lists are available through tools.
Export jobs
Call create_export with a new UUID as idempotencyKey to build an engagement's filing handoff package. Reuse the key when retrying to retrieve the same job. Poll get_export_job until status is succeeded or failed.
Use list_export_jobs to find earlier jobs for an engagement. The live API schema also describes the REST export and import-capture operations.
To export a scenario, include scenario.inputs with the overrides and, when available, the scenario computation's sourceStateSha256. The job builds a separate draft package and comparison, checks that the saved inputs, engine version and rate tables have not changed since it was created, and leaves the saved return unchanged. Its purpose is draft_scenario and its readiness is unevaluated. See Export a scenario.
A successful job returns the file name, size, SHA-256 digest, and a downloadPage URL where a signed-in Filemark user can download the package. The job expires seven days after creation.
Hosts with MCP Apps support display ui://filemark/export-panel with results from get_engagement_import_capture, create_export, and get_export_job. The panel lets users open the engagement's Documents inbox to upload a tax-software return, start an export, and open its download page. get_engagement_import_capture returns the values captured from that upload. Inbox and download links use a signed-in Filemark browser session. Other hosts receive the tool result as JSON.
Errors and request IDs
Successful tool results and resource reads include _meta["ca.filemark/requestId"]. Include this request ID when contacting support@filemark.ca.
Failed tools return isError: true with the API error object in both structuredContent and a JSON text block. Validation errors identify cells in error.details, with paths relative to inputs. Each tool's outputSchema describes successful and failed results.
Failures outside tool execution return JSON-RPC errors with the API error object in error.data.
| Code | Meaning |
|---|---|
-32601 | Unknown method |
-32602 | Unknown tool, or invalid resource arguments |
-32002 | The resource does not exist |
-32603 | Unexpected internal failure |
-32000 | Other sanitized execution failure |
Read and computation limits reached during tool execution produce tool errors with retry guidance. Transport rate limits return HTTP 429, and authentication failures return 401 before execution. See rate limits.