Skip to content

Commit f5c439d

Browse files
docs: add MCP Policy Features (v3.2.0) section to README (#49)
Add code snippets for new v3.2.0 features: - Exfiltration Detection: row/byte limits for data protection - Dynamic Policy Evaluation: Orchestrator-based rate limiting
1 parent 4681537 commit f5c439d

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,39 @@ MCPQueryRequest query = MCPQueryRequest.builder()
202202
MCPQueryResponse response = client.queryConnector(query);
203203
```
204204

205+
### MCP Policy Features (v3.2.0)
206+
207+
**Exfiltration Detection** - Prevent large-scale data extraction:
208+
209+
```java
210+
// Query with exfiltration limits (default: 10K rows, 10MB)
211+
MCPQueryResponse response = client.queryConnector(query);
212+
213+
// Check exfiltration info
214+
PolicyInfo.ExfiltrationCheck exCheck = response.getPolicyInfo().getExfiltrationCheck();
215+
if (exCheck.isExceeded()) {
216+
System.out.println("Limit exceeded: " + exCheck.getLimitType());
217+
// LimitType: "rows" or "bytes"
218+
}
219+
220+
// Configure: MCP_MAX_ROWS_PER_QUERY=1000, MCP_MAX_BYTES_PER_QUERY=5242880
221+
```
222+
223+
**Dynamic Policy Evaluation** - Orchestrator-based rate limiting, budget controls:
224+
225+
```java
226+
// Response includes dynamic policy info when enabled
227+
PolicyInfo.DynamicPolicyInfo dynamicInfo = response.getPolicyInfo().getDynamicPolicyInfo();
228+
if (dynamicInfo.isOrchestratorReachable()) {
229+
System.out.println("Policies evaluated: " + dynamicInfo.getPoliciesEvaluated());
230+
for (PolicyMatch match : dynamicInfo.getMatchedPolicies()) {
231+
System.out.println(" " + match.getPolicyName() + ": " + match.getAction());
232+
}
233+
}
234+
235+
// Enable: MCP_DYNAMIC_POLICIES_ENABLED=true
236+
```
237+
205238
### Policy Management
206239

207240
```java

0 commit comments

Comments
 (0)