---
title: McpAuditFilter
description: Configure the PingGateway McpAuditFilter to record Model Context Protocol (MCP) audit events using an AuditService
component: pinggateway
version: 2026
page_id: pinggateway:reference:McpAuditFilter
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/McpAuditFilter.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-06-01T16:50:04Z
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)
