---
title: McpAuditFilter
description: Use this to audit Model Context Protocol (MCP) events.
component: pinggateway
version: 2026
page_id: pinggateway:reference:McpAuditFilter
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/McpAuditFilter.html
revdate: 2025-11-25
section_ids:
  usage: Usage
  properties: Properties
  more_information: More information
---

# McpAuditFilter

Use this to audit [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro) events.

|   |                                                                                                                                                                                                                             |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | This feature has [Evolving](https://docs.pingidentity.com/pinggateway/release-notes/stability.html#interface-stability) interface stability. It's subject to change without notice, even in a minor or maintenance release. |

Add an [McpValidationFilter](McpValidationFilter.html) after this in a [Chain](Chain.html) to populate the [McpContext](McpContext.html) required for audit events.

## Usage

```none
{
  "name": string,
  "type": "McpAuditFilter",
  "config": {
    "auditService": AuditService reference
    }
  }
}
```

## Properties

* `"auditService"`: *AuditService [reference](preface.html#definition-reference), optional*

  The [AuditService](AuditService.html) to record MCP audit events. Provide either the name of an AuditService object defined in the heap or an inline AuditService configuration object.

  Default: No audit service.

## More information

* [org.forgerock.openig.mcp.audit.McpAuditFilterHeaplet](../_attachments/apidocs/org/forgerock/openig/mcp/audit/McpAuditFilterHeaplet.html)
