Skip to main content
Glama
Stener1

reai-mcp

by Stener1

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoListen port for remote mode.8080
PUBLIC_URLNoSet in production. Published in OAuth metadata, must match what clients connect to.
REAI_VERBOSENoLog one line per API request to stderr. Never logs tokens.off
REAI_BASE_URLNoBase URL for the ReAI API, override for staging.https://app.reai.no
REAI_TENANT_IDNoDefault tenant ID, so tenantId can be omitted.
REAI_TIMEOUT_MSNoPer-request timeout in milliseconds.30000
REAI_WRITE_MODENoWrite mode: 'read-only', 'reversible' or 'full'. Default is 'reversible'.reversible
REAI_MAX_RETRIESNoRetries on 429/502/503/504, with exponential backoff and jitter.2
REAI_ALLOWED_HOSTSNoComma-separated hostnames to accept; enables DNS-rebinding protection and pins the advertised OAuth issuer.
REAI_ENCRYPTION_KEYNo32 bytes, base64 or hex. Seals access tokens. Required in production.
REAI_USER_API_TOKENNoReAI user API token (required for local/stdio mode).
REAI_ALLOWED_REDIRECT_HOSTSNoComma-separated hosts allowed as OAuth redirect targets. Loopback is always permitted.
REAI_ALLOW_TOKEN_PASSTHROUGHNoAccept a raw ReAI token in the Authorization header, skipping OAuth.off

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
reai_whoamiA

Identify the authenticated ReAI user and list every tenant (company) the token can access, with each tenant's id, slug and currency. Call this first in any session: most other tools are tenant-scoped, and the tenant id is what selects which company's books you are working in. Also reports the active tenant and the server's current write policy.

reai_use_tenantA

Set the tenant (company) that subsequent tool calls apply to, for the rest of this session. The id is validated against the tenants this token can actually reach, so a typo fails here rather than silently writing into the wrong company's books. Individual tools can still override it with their own tenantId argument.

reai_search_endpointsA

Search the full ReAI OpenAPI surface (313 public operations) by keyword, tag or HTTP method. Use this whenever no curated tool covers what you need — for example leads, agreements, subscriptions, assets, warehouses, share investments, salary or Peppol. Returns matching operations with their path, parameters and request-body field names. Follow up with reai_describe_endpoint for full schemas, then call it via reai_request.

reai_describe_endpointA

Get the complete schema for one ReAI endpoint: every parameter, the full request body with nested objects resolved, and response shapes. Use this before calling an unfamiliar endpoint with reai_request, especially for POST and PUT where required fields matter.

reai_list_api_tagsA

List every documented ReAI API domain (tag) with its operation count — a map of what the accounting system can do. Useful for orienting before a search.

reai_requestA

Escape hatch: call any ReAI API endpoint directly. Use it for anything the curated tools do not cover. Discover the endpoint with reai_search_endpoints and check its schema with reai_describe_endpoint first.

Authentication and the tenant header are handled for you. Write calls are subject to the server's write policy, and unrecognised write paths are treated as irreversible and blocked unless REAI_WRITE_MODE=full.

reai_list_accountsA

Search the tenant's chart of accounts (kontoplan). Returns account numbers, names and types. Use this to find the right account number before booking a voucher — every posting must reference an account that exists in this list.

reai_list_vat_codesA

List the VAT (mva) codes available in this tenant, with rate, type and description. Postings to revenue and cost accounts generally require a VAT code; look it up here rather than guessing, because the valid set depends on the tenant's VAT registration.

reai_list_vouchersA

List vouchers (bilag) in a date range, each with its postings. A voucher is the atomic unit of Norwegian bookkeeping: a dated, balanced set of debit and credit postings. Defaults to the current calendar year if no dates are given.

reai_get_voucherA

Fetch a single voucher by id, including all its postings and attachments.

reai_list_postingsA

List individual ledger postings in a date range, with optional filters by account, voucher, customer, supplier, project, employee or bank. Each posting reports canDelete and lockReasons, which tell you whether it can still be changed. Defaults to the current calendar year.

reai_general_ledgerA

Read the general ledger for a period: every account with its opening balance, postings and closing balance. This is the report to use for questions like 'what did we spend on X' or 'what is the balance of account 1920'. Narrow with accountNumber or an account range, since a full-year ledger for an active tenant can be large.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Stener1/reai-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server