openapi: 3.1.0 info: title: Dexwize MCP server and assistant facade version: 1.0.0 description: > Model Context Protocol server (streamable HTTP transport, stateless) exposing Dexwize findings, device diagnosis, experience scores, recommendations and approved remediation requests to AI agents (ADR-0033). Tokens for the MCP endpoint must carry the MCP resource as audience; tokens for the /v1/assistant facade (Microsoft 365 Copilot plugin) must carry the assistant audience. Neither is accepted on the other surface. Tool results are data-only JSON envelopes. Requests to change endpoint state go through remediation-service policy as the caller. servers: - url: https://mcp.dexwize.example security: - bearer: [] paths: /.well-known/oauth-protected-resource/mcp: get: summary: OAuth 2.0 protected resource metadata (RFC 9728) for the MCP endpoint operationId: getProtectedResourceMetadata security: [] responses: '200': description: Metadata content: application/json: schema: { $ref: '#/components/schemas/ProtectedResourceMetadata' } /mcp: post: summary: MCP JSON-RPC requests (initialize, tools/list, tools/call, resources/list, resources/read) description: > Tools are list_findings, get_finding, device_diagnosis, experience_score, list_recommendations and request_remediation. Resources are dexwize://findings/{findingId} and dexwize://scoring/model. A missing or invalid token returns 401 with a WWW-Authenticate header naming resource_metadata. operationId: mcpRequest requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/JsonRpcMessage' } responses: '200': description: JSON-RPC response (application/json or a text/event-stream carrying it) content: application/json: schema: { $ref: '#/components/schemas/JsonRpcMessage' } '401': { description: 'Missing token, invalid token or wrong audience' } /v1/assistant/findings: get: summary: List findings for the caller's tenant (FindingsRead) operationId: assistantListFindings parameters: - { name: status, in: query, schema: { type: string, enum: [open, resolved, suppressed] } } - { name: severity, in: query, schema: { type: string, enum: [low, medium, high, critical] } } - { name: limit, in: query, schema: { type: integer, minimum: 1, maximum: 100 } } responses: '200': description: Data envelope content: application/json: schema: { $ref: '#/components/schemas/ToolEnvelope' } '400': { $ref: '#/components/responses/Refused' } '401': { description: Missing token or wrong audience } '403': { $ref: '#/components/responses/Refused' } /v1/assistant/findings/{id}: get: summary: One finding with its evidence summary (FindingsRead) operationId: assistantGetFinding parameters: - { name: id, in: path, required: true, schema: { type: string, format: uuid } } responses: '200': description: Data envelope content: application/json: schema: { $ref: '#/components/schemas/ToolEnvelope' } '403': { $ref: '#/components/responses/Refused' } '404': { $ref: '#/components/responses/Refused' } /v1/assistant/devices/{id}/diagnosis: get: summary: Device diagnosis with experience score and open findings (FindingsRead and DevicesRead) operationId: assistantDeviceDiagnosis parameters: - { name: id, in: path, required: true, schema: { type: string, format: uuid } } responses: '200': description: Data envelope content: application/json: schema: { $ref: '#/components/schemas/ToolEnvelope' } '403': { $ref: '#/components/responses/Refused' } '404': { $ref: '#/components/responses/Refused' } /v1/assistant/scores/fleet: get: summary: Fleet experience score (ReportsRead) operationId: assistantFleetScore responses: '200': description: Data envelope content: application/json: schema: { $ref: '#/components/schemas/ToolEnvelope' } '403': { $ref: '#/components/responses/Refused' } components: securitySchemes: bearer: { type: http, scheme: bearer, bearerFormat: JWT } responses: Refused: description: Refused, not found or invalid input content: application/json: schema: type: object required: [error, message] properties: error: { type: string, enum: [forbidden, not_found, tenant_mismatch, invalid_input, refused_by_policy] } message: { type: string } schemas: ToolEnvelope: type: object required: [tool, notice, data] properties: tool: { type: string } notice: { type: string, description: States that field values are data and not instructions } data: { description: 'Upstream data, sanitised: control characters removed, strings and lists capped' } JsonRpcMessage: type: object required: [jsonrpc] properties: jsonrpc: { const: '2.0' } id: { type: [string, integer] } method: { type: string } params: { type: object } result: { type: object } error: { type: object } ProtectedResourceMetadata: type: object required: [resource, authorization_servers] properties: resource: { type: string } authorization_servers: { type: array, items: { type: string } } bearer_methods_supported: { type: array, items: { type: string } } scopes_supported: { type: array, items: { type: string } } resource_name: { type: string }