API Reference¶
The connector exposes three interface layers. All three share the same access control, rate limiting, and audit logging.
MCP Endpoint (JSON-RPC 2.0)¶
URL: POST /alpenglow/mcp
This is the primary endpoint for MCP-native clients (Claude, Cursor, etc.). It implements JSON-RPC 2.0 with the following methods:
| Method | Description |
|---|---|
alpenglow_list_models |
List all enabled MCP resources |
alpenglow_describe |
Get rich schema for a model (fields, types, relationships) |
alpenglow_search |
Search records with domain, pagination, and ordering |
alpenglow_read |
Read specific records by ID |
alpenglow_create |
Create one or more records |
alpenglow_update |
Update records by ID |
alpenglow_delete |
Delete records by ID |
alpenglow_aggregate |
Run reporting queries (group_by, top_n, count, sum, avg, etc.) |
alpenglow_execute |
Call a whitelisted ORM method on a model |
Request format¶
{
"jsonrpc": "2.0",
"id": 1,
"method": "alpenglow_search",
"params": {
"model": "res.partner",
"domain": [["is_company", "=", true]],
"fields": ["name", "email", "phone"],
"limit": 20,
"offset": 0,
"order": "name asc"
}
}
Success response¶
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"records": [
{
"id": 1,
"name": "Acme Corp",
"email": "info@acme.com",
"phone": "555-0100"
}
],
"total": 42,
"limit": 20,
"offset": 0
}
}
Error response¶
REST API¶
For clients that prefer standard HTTP verbs over JSON-RPC.
| Verb | URL | Description |
|---|---|---|
| GET | /alpenglow/api/models |
List enabled models |
| GET | /alpenglow/api/models/<model>/schema |
Get model schema |
| GET | /alpenglow/api/models/<model>/records |
Search records (query params: domain, fields, limit, offset, order) |
| POST | /alpenglow/api/models/<model>/records |
Create records (JSON body: {"values": {...}}) |
| PUT | /alpenglow/api/models/<model>/records/<id> |
Update a record (JSON body: {"values": {...}}) |
| DELETE | /alpenglow/api/models/<model>/records/<id> |
Delete a record |
| POST | /alpenglow/api/models/<model>/aggregate |
Run aggregation (JSON body: {"operation": "...", ...}) |
Success response¶
Error response¶
XML-RPC Proxy¶
For legacy integrations or tools that speak XML-RPC natively. The proxy wraps Odoo's standard XML-RPC interface with MCP access controls.
| URL | Methods |
|---|---|
POST /alpenglow/xmlrpc/2/common |
version and authenticate calls |
POST /alpenglow/xmlrpc/2/object |
execute_kw calls, with access control and rate limiting applied |
Private methods (those starting with _) are blocked. All operations go through the same resource permission checks as the MCP and REST endpoints.
The XML-RPC proxy uses defusedxml to protect against XXE (XML External Entity) attacks.
Health Check¶
URL: GET /alpenglow/health
No authentication required. Returns:
Suitable for uptime monitors and load balancer health probes.
Aggregation Operations¶
The alpenglow_aggregate MCP method (and the REST /aggregate endpoint) support the following operations:
| Operation | Description |
|---|---|
group_by |
Group records by one or more fields and count/aggregate per group |
top_n |
Get the top N records by a measure field |
count |
Count records matching a domain |
sum |
Sum a numeric field across matching records |
avg |
Average a numeric field across matching records |
min |
Find the minimum value of a field |
max |
Find the maximum value of a field |
pivot |
Cross-tabulate two grouping fields |
trend |
Group a date field by a time granularity (day, week, month, quarter, year) |
Example — Top 5 customers by sale total¶
{
"jsonrpc": "2.0",
"id": 1,
"method": "alpenglow_aggregate",
"params": {
"model": "sale.order",
"operation": "top_n",
"groupby": "partner_id",
"measure": "amount_total",
"n": 5
}
}