Skip to main content
POST
MCP Server - OAuth Integration

Authorizations

Authorization
string
header
required

OAuth 2.1 authorization code flow with PKCE (S256 only) and exact redirect-URI matching. Clients register by Dynamic Client Registration (/api/oauth/register) or a Client ID Metadata Document. Discovery: /.well-known/oauth-authorization-server and /.well-known/oauth-protected-resource/mcp. Access tokens last one hour and refresh tokens rotate. Tokens carry the audience https://api.ai2fin.com/mcp and are accepted on /mcp and /api/integrations/v1 only. A request with no scope gets read:transactions write:transactions read:bills write:bills; write:expenses and webhooks:manage must be asked for explicitly.

Body

application/json
jsonrpc
enum<string>
required
Available options:
2.0
Example:

"2.0"

method
enum<string>
required
Available options:
initialize,
tools/list,
tools/call,
resources/list,
resources/templates/list,
resources/read,
prompts/list,
ping
Example:

"tools/list"

id
Example:

1

params
object

Method-specific parameters

Response

MCP response

jsonrpc
enum<string>
Available options:
2.0
id
result
object
error
object