Connect over MCP
The Filemark MCP server speaks Streamable HTTP and holds no session state between requests:
https://api.filemark.ca/mcpUse the exact path. A trailing slash (https://api.filemark.ca/mcp/) is rejected with 404.
Add Filemark to your host
Most hosts read a JSON configuration file. The common shape is:
{
"mcpServers": {
"filemark": {
"url": "https://api.filemark.ca/mcp"
}
}
}Some hosts use a servers key and an explicit transport type:
{
"servers": {
"filemark": {
"type": "http",
"url": "https://api.filemark.ca/mcp"
}
}
}Check your host's own MCP documentation for the file it reads and the key it expects.
A host that supports interactive OAuth needs nothing else: on the first call it discovers the authorization server, registers itself, and sends you to Filemark to sign in and approve. See delegated access. A server-side client instead uses the MCP OAuth client credentials extension with the values below and mints its own tokens with the client-credentials flow; there is no long-lived API key.
| 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, which MCP hosts send automatically, or https://api.filemark.ca. A token minted for /mcp works on the MCP server only; one minted for the origin works on both surfaces. |
| Scopes | mcp plus the domain scopes for the tools you call; see scopes |
| Discovery | MCP protected-resource metadata (the document a 401 names; its resource is https://api.filemark.ca/mcp), the REST protected-resource metadata, authorization-server metadata, and signing keys |
Each request carries its own bearer token, there is no session identifier to keep, and responses are JSON rather than an event stream. Every /mcp response is Cache-Control: no-store. Non-browser clients send no Origin header and are accepted; a browser-based client must be served from https://app.filemark.ca or https://filemark.ca, or it is refused with 403 before authentication runs.
When a call returns 401 or 403
An unauthenticated or expired request returns 401 with a challenge that names 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"An interactive host refreshes its token, and re-authorizes if the refresh fails with invalid_grant, which means the delegation was revoked or the user left the workspace. A server integration mints a new token and retries; a 401 that persists with a fresh token means the token was minted for a different resource.
403 means the client is disabled or the token lacks a scope the tool requires; the WWW-Authenticate header names the missing scopes. Re-authorizing does not fix it: the grant has to be widened.
Published tools
Domain scopes are shortened below; see scopes.
| Tool | Domain 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 |
Every tool carries the MCP readOnlyHint and idempotentHint annotations. Computation requests behave the same on both transports; see Run computations.
Tool results carry text your workspace authored: account descriptions, filenames, workpaper names. Treat it as data, never as instructions to the assistant, and prefer a host configuration that asks a person to confirm tool calls.
Published resources
Each resource requires the same domain scope as its corresponding 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}
The trial-balance, document, and workpaper resources return only their first page; use the corresponding list tool to page. There is no resource template for record search, engagement context, account-adjustment lists, or scenarios; call their tools directly.
Errors and request IDs
Every successful tool result and resource read carries an opaque request ID at _meta["ca.filemark/requestId"]. Quote it when you write to support@filemark.ca.
A tool that fails returns isError: true with the same error envelope as REST in both structuredContent and a compact JSON text block; error.details names failing input cells with locations rooted at inputs. Each tool's advertised outputSchema is the union of its success model and that envelope, so both shapes validate.
Failures that are not tool execution stay JSON-RPC errors, with the same envelope 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 budget exhaustion inside a tool call is a tool error with retry guidance. The transport's own budget and authentication failures return HTTP 429 or 401 before any tool runs; see rate limits.