Connect over MCP

Connect to Filemark's MCP server at this URL.

https://api.filemark.ca/mcp

The 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.

SettingValue
TransportStreamable HTTP
OAuth grantclient_credentials for server integrations. Authorization code + PKCE for interactive hosts
Token endpointhttps://api.filemark.ca/oauth2/token
Resourcehttps://api.filemark.ca/mcp for MCP access, or https://api.filemark.ca for REST and MCP access
Scopesmcp plus the scopes for the tools you call. See scopes
DiscoveryMCP 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.

ToolScopeREST operation
list_computationstax:computeList computation targets
get_computation_target_contracttax:computeGet a computation target contract
compute_tax_schedulestax:computeCompute tax schedules
compute_engagement_scenariotax-data:read + tax:computeCompute an engagement's saved state with cells replaced
compute_rollovertax:computeCompute a rollover or reorganization
list_clientsclients:readList clients
get_clientclients:readGet a client
list_entitiesentities:readList a client's entities
get_entityentities:readGet an entity
list_tax_yearstax-years:readList an entity's tax years
get_tax_yeartax-years:readGet a tax year
search_recordsengagements:readSearch engagement records
list_engagementsengagements:readList engagements
get_engagementengagements:readGet an engagement
get_engagement_contextengagements:readGet engagement context
get_engagement_historyengagements:readGet engagement history
get_engagement_form_catalogengagements:readGet an engagement form catalog
get_trial_balancetax-data:readGet a saved trial balance
get_accounttax-data:readGet a saved engagement account
list_account_adjustmentstax-data:readList saved account adjustments
list_engagement_documentsdocuments:readList engagement documents
list_engagement_workpapersworkpapers:readList engagement workpapers
get_engagement_review_summaryreview:readGet engagement review summary
get_engagement_import_capturetax-data:readGet an engagement's import capture
create_exportexports:createCreate an export job for an engagement
list_export_jobsexports:readList an engagement's export jobs
get_export_jobexports:readGet 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.

ToolScopeREST operation
create_clientclients:writeCreate a client
update_clientclients:writeUpdate a client
archive_clientclients:writeArchive a client
restore_clientclients:writeRestore an archived client
create_entityentities:writeCreate an entity
update_entityentities:writeUpdate an entity
archive_entityentities:writeArchive an entity
restore_entityentities:writeRestore an archived entity
create_engagementengagements:writeCreate an engagement
update_engagementengagements:writeUpdate an engagement
archive_engagementengagements:writeArchive an engagement
restore_engagementengagements:writeRestore an archived engagement
get_mutation_preconditionsclients:write or entities:write or engagements:write or tax-data:writeGet mutation preconditions
list_account_notesreview:readList account notes
create_account_notereview:annotateCreate an account note
update_account_notereview:annotateUpdate an account note
archive_account_notereview:annotateArchive an account note
list_review_marksreview:readList review marks
create_review_markreview:annotateCreate a review mark
update_review_markreview:annotateUpdate a review mark
update_engagement_datatax-data:writeApply a saved tax-data action
land_trial_balancetax-data:writeLand a trial balance on an engagement
apply_trial_balance_importtax-data:writeApply a pending trial-balance import
classify_awaiting_accountstax-data:writeClassify awaiting accounts
list_portal_contactsportal:readList an engagement's portal contacts
list_portal_requestsportal:readList an engagement's portal requests
get_portal_requestportal:readGet a portal request
preview_portal_actionportal:writePreview a portal action
apply_portal_actionportal:writeApply a portal action
create_portal_commentportal:write + portal:sendComment on a portal request
apply_portal_deliveryportal:sendSend, remind, or cancel a portal invitation
list_integration_connectionsintegrations:readList integration connections
list_integration_sourcesintegrations:readList integration sources
preview_integration_syncintegrations:readPreview an integration sync
apply_integration_syncintegrations:syncApply an integration sync
get_integration_syncintegrations:readGet an integration sync
deliver_export_artifactexports:deliverDeliver an export artifact
get_documentdocuments:readGet a document
start_document_uploaddocuments:writeStart a document upload
complete_document_uploaddocuments:writeComplete a document upload
classify_documentdocuments:writeClassify a staged document
start_document_ingestiondocuments:writeStart a document ingestion
get_document_ingestiondocuments:writeGet a document ingestion
retry_document_ingestiondocuments:writeRetry a document ingestion
cancel_document_ingestiondocuments:writeCancel a document ingestion
replace_documentdocuments:writeReplace a document's file
archive_documentdocuments:writeArchive a document
create_document_deliverydocuments:read + documents:writeCreate a document delivery
get_workpaperworkpapers:readGet a workpaper
create_workpaperworkpapers:writeCreate a workpaper
update_workpaperworkpapers:writeUpdate a workpaper
archive_workpaperworkpapers:writeArchive a workpaper
restore_workpaperworkpapers:writeRestore an archived workpaper
list_workpaper_evidenceworkpapers:readList workpaper evidence
manage_workpaper_evidenceworkpapers:writeAttach or detach workpaper evidence
list_workpaper_linksworkpapers:readList workpaper account links
manage_workpaper_linksworkpapers:writeSet workpaper account links
validate_workpaperworkpapers:readValidate a workpaper
get_workpaper_tie_outworkpapers:readGet workpaper tie-out
generate_workpaperworkpapers:writeGenerate a workpaper from the general ledger
request_governed_draftworkpapers:writeRequest a governed narrative draft
carry_forward_workpaperworkpapers:writeCarry a workpaper forward from the prior year
list_workpaper_versionsworkpapers:readList workpaper versions

Published resources

Each resource requires the same scope as its tool.

  • filemark://computations/catalog
  • filemark://clients/{client_id}
  • filemark://entities/{entity_id}
  • filemark://tax-years/{tax_year_id}
  • filemark://engagements/{engagement_id}
  • filemark://engagements/{engagement_id}/history
  • filemark://engagements/{engagement_id}/forms
  • filemark://engagements/{engagement_id}/trial-balance
  • filemark://engagements/{engagement_id}/accounts/{account_id}
  • filemark://engagements/{engagement_id}/documents
  • filemark://engagements/{engagement_id}/workpapers
  • filemark://engagements/{engagement_id}/review-summary
  • filemark://computations/targets/{target_id}
  • filemark://export-jobs/{export_job_id}
  • filemark://engagements/{engagement_id}/mutation-preconditions
  • filemark://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.

CodeMeaning
-32601Unknown method
-32602Unknown tool, or invalid resource arguments
-32002The resource does not exist
-32603Unexpected internal failure
-32000Other 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.

Filemark | Connect over MCP