systemprompt-mcp 0.14.4

Native Model Context Protocol (MCP) implementation for systemprompt.io. Orchestration, per-server OAuth2, RBAC middleware, and tool-call governance — the core of the AI governance pipeline.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::error::{McpDomainError, McpDomainResult};
use systemprompt_models::auth::{JwtAudience, JwtClaims};
use systemprompt_security::jwt::{ValidationPolicy, decode_rs256_claims};

pub fn validate_jwt_token(
    token: &str,
    issuer: &str,
    audiences: &[JwtAudience],
) -> McpDomainResult<JwtClaims> {
    let policy = ValidationPolicy::issuer_scoped(issuer, audiences);
    decode_rs256_claims(token, &policy).map_err(|e| McpDomainError::Internal(e.to_string()))
}