Skip to main content
Alforse runs a Model Context Protocol (MCP) server, so an AI assistant can look up and work with your ERP data: items, sales, purchasing, production, inventory, quality, accounting and more. Anyone in your company can connect their own assistant, and developers can connect coding clients and scripts. The assistant can only do what the person or key it connects as is allowed to do.

What you need

There are two ways to sign the assistant in. Pick the one your client supports.

Connect with browser authorization

Nothing has to be set up in Alforse first. You add the server URL in the assistant, and Alforse asks you to approve the connection.

What the connection can do

  • It acts as you, in the company you chose, with exactly your current permissions. If your permissions change, the assistant’s change with them.
  • It stops working once you are no longer an active member of that company.
  • The company and user always come from the connection itself. The assistant cannot switch company or act as someone else by passing different arguments.

How the sign-in works behind the scenes

Clients handle this automatically; the details are here for developers building their own client.
  • Grant types: authorization_code and refresh_token. Response type: code.
  • PKCE with S256. A public client (token endpoint auth method none) must send a code challenge.
  • Client authentication at the token endpoint: client_secret_post or none.
  • Scope: mcp:tools.
  • An authorization code is valid for 10 minutes and can be used once. An access token is valid for one hour (expires_in: 3600); the client renews it with its refresh token.

Connect with an API key

Use a key for clients that cannot open a browser sign-in, and for scripts. An administrator creates it under Settings → API Keys; the key holds its own permission scopes and belongs to one company. See API keys for creating and scoping keys. Send the key in the Authorization header:
The alforse-key: alf_your_key_here header is accepted as well.

Client configuration

Claude Code
Cursor (.cursor/mcp.json in the project, or merged into your existing mcpServers)
VS Code (.vscode/mcp.json; VS Code asks for the key so it is not saved in the file)
Any other client: give it the URL https://app.alforse.com/api/mcp and the Authorization: Bearer … header. The name of the URL field differs between clients (for example url or serverUrl); check your client’s documentation.

Tools the assistant sees

Instead of one tool per operation, the server offers three tools that reach all of them: The operations come from these areas: account, accounting, documents, inventory, invoicing, items, people, production, purchasing, quality, resources, sales, settings, shared and users. Only operations Alforse has explicitly published are available; some are deliberately kept off the server.
  • Every call goes through the same permission checks as the app, and writes are validated by the same service layer.
  • Each operation carries a risk class, so your assistant can ask you before running a WRITE or DESTRUCTIVE one.
  • List reads return 25 rows by default. The assistant pages with limit (1–100) and offset.
  • The assistant is told today’s date in your company’s time zone, so relative dates such as “last week” are resolved correctly.

Limits

When a limit is reached the server answers 429 with Retry-After and X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers. Wait for the Retry-After seconds, then retry.

Troubleshooting