Skip to main content
Serval exposes its entire public API as an MCP (Model Context Protocol) server, allowing AI agents and LLM-powered tools to interact with your Serval workspace programmatically. Every public API endpoint is automatically available as an MCP tool.

Base URL

The MCP server is available at:
https://public.api.serval.com/mcp/
The server implements the Streamable HTTP transport defined by the MCP specification.

Authentication

The MCP server uses OAuth 2.1. Your MCP client handles authentication automatically — you provide the server URL, the client discovers OAuth endpoints, opens your browser for approval, and manages tokens. No credentials to copy or rotate.
  1. Configure your MCP client with the server URL: https://public.api.serval.com/mcp/
  2. When the client connects, it will open your browser to approve access to your Serval workspace.
  3. After approval, the client receives tokens and refreshes them automatically.

Client Configuration

Add the following to your .cursor/mcp.json file:
{
  "mcpServers": {
    "serval": {
      "url": "https://public.api.serval.com/mcp/"
    }
  }
}
When you first connect, Cursor will open your browser to approve access.

Available Tools

Every endpoint in the Serval public API is available as an MCP tool. Tool names, descriptions, and input schemas are derived directly from the API specification. Tools follow a consistent snake_case naming convention matching the API operation name. For example:
Tool NameDescription
list_ticketsList all tickets
create_ticketCreate a new ticket
get_userGet a specific user by ID
list_workflowsList all workflows
create_access_policyCreate a new access policy
list_audit_log_eventsList audit log events
Use the MCP tools/list method to discover all available tools and their input schemas at runtime. Your MCP client handles this automatically.

How It Works

The MCP server translates each tool call into a REST API request:
  1. Your AI agent calls an MCP tool (e.g., list_tickets) with the required arguments
  2. The server maps the tool call to the corresponding REST endpoint (GET /v2/tickets)
  3. Path parameters, query parameters, and request bodies are constructed from the tool arguments
  4. The response is returned as the tool result
The MCP server has the same capabilities, permissions, and rate limits as the REST API. Any action you can perform through the API, your AI agent can perform through MCP.

Example Usage

Here is an example of an AI agent using the Serval MCP server to list open tickets:
Agent: "Show me all open tickets"

→ Calls MCP tool: list_tickets
  Arguments: {}

← Returns:
  {
    "data": [
      {
        "id": "abc-123",
        "title": "Cannot access VPN",
        "status": "OPEN",
        ...
      }
    ]
  }

Pagination

List endpoints return paginated results. Use the page_token parameter to retrieve subsequent pages:
  1. Call the list tool without page_token to get the first page
  2. If the response includes a next_page_token, pass it as page_token in the next call
  3. Repeat until no next_page_token is returned

Error Handling

Tool calls that result in API errors return an error message with the HTTP status code and response body. Common errors include:
Status CodeMeaning
401Invalid or expired access token
403Insufficient permissions for the requested action
404Resource not found
429Rate limit exceeded