Skip to main content
Glama

get_security_status

Retrieve current security configuration settings and audit information to monitor and verify storage security policies and access controls.

Instructions

Get current security configuration and audit information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function executing the tool logic: constructs SecurityStatusResponse using SECURITY_CONFIG, getRateLimitStoreSize(), and getAuditLog() to provide security configuration, rate limit status, recent audit log entries, and server information.
    // Handler for security status async function handleSecurityStatus() { const auditLog = getAuditLog(); const securityStatus: SecurityStatusResponse = { security_config: SECURITY_CONFIG, rate_limit_status: { active_limits: getRateLimitStoreSize(), current_window: SECURITY_CONFIG.RATE_LIMIT_WINDOW }, audit_log: { total_entries: auditLog.length, recent_entries: auditLog.slice(-10).map(entry => ({ timestamp: new Date(entry.timestamp).toISOString(), tool: entry.toolName, success: entry.success, error: entry.error || 'none' })) }, server_info: { name: 'supabase-storage-mcp', version: '1.0.0', uptime: process.uptime(), node_version: process.version } }; return { content: [ { type: 'text', text: JSON.stringify(securityStatus, null, 2) } ] }; }
  • src/index.ts:234-242 (registration)
    Tool registration in ListToolsRequestSchema handler, defining name, description, and empty input schema.
    { name: 'get_security_status', description: 'Get current security configuration and audit information', inputSchema: { type: 'object', properties: {}, additionalProperties: false } },
  • TypeScript interface defining the structure of the security status response output.
    export interface SecurityStatusResponse { security_config: SecurityConfig; rate_limit_status: { active_limits: number; current_window: number; }; audit_log: { total_entries: number; recent_entries: Array<{ timestamp: string; tool: string; success: boolean; error: string; }>; }; server_info: { name: string; version: string; uptime: number; node_version: string; }; }
  • Security configuration constant used by the handler for rate limit window and other settings.
    export const SECURITY_CONFIG: SecurityConfig = { ENABLE_RATE_LIMITING: true, ENABLE_THREAT_DETECTION: true, ENABLE_AUDIT_LOGGING: true, ENABLE_INPUT_VALIDATION: true, ENABLE_FILE_SECURITY: true, // Rate limiting configuration RATE_LIMIT_WINDOW: 60000, // 1 minute MAX_REQUESTS_PER_WINDOW: 100, GLOBAL_RATE_LIMIT: 1000, IP_RATE_LIMIT: 200, USER_RATE_LIMIT: 500, // File security limits MAX_FILE_SIZE: 50 * 1024 * 1024, // 50MB MAX_BATCH_SIZE: 500, ALLOWED_MIME_TYPES: [ 'image/jpeg', 'image/jpg', 'image/png', 'image/webp', 'image/gif', 'image/svg+xml', 'image/bmp', 'image/tiff', 'application/zip', 'application/x-zip-compressed' ], // Security thresholds MAX_PROMPT_LENGTH: 10000, SUSPICIOUS_ACTIVITY_THRESHOLD: 5, HIGH_RISK_SCORE_THRESHOLD: 80, // Session and authentication SESSION_TIMEOUT: 3600, // 1 hour JWT_EXPIRY: 7200 // 2 hours };
  • Helper function returning a copy of the audit log entries, used to populate recent audit log in the response.
    export function getAuditLog(): AuditEntry[] { return [...auditLog]; // Return copy to prevent external modification }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Desmond-Labs/supabase-storage-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server