Skip to main content
Glama

CrowdStrike Falcon MCP Server

Official
by CrowdStrike
test_api_scopes.py1.61 kB
""" Tests for the API scope utilities. """ import unittest from falcon_mcp.common.api_scopes import API_SCOPE_REQUIREMENTS, get_required_scopes class TestApiScopes(unittest.TestCase): """Test cases for the API scope utilities.""" def test_api_scope_requirements_structure(self): """Test API_SCOPE_REQUIREMENTS dictionary structure.""" # Verify it's a dictionary self.assertIsInstance(API_SCOPE_REQUIREMENTS, dict) # Verify it has entries self.assertGreater(len(API_SCOPE_REQUIREMENTS), 0) # Verify structure of entries (keys are strings, values are lists of strings) for operation, scopes in API_SCOPE_REQUIREMENTS.items(): self.assertIsInstance(operation, str) self.assertIsInstance(scopes, list) for scope in scopes: self.assertIsInstance(scope, str) def test_get_required_scopes(self): """Test get_required_scopes function.""" # Test with known operations self.assertEqual(get_required_scopes("GetQueriesAlertsV2"), ["Alerts:read"]) self.assertEqual(get_required_scopes("PostEntitiesAlertsV2"), ["Alerts:read"]) self.assertEqual(get_required_scopes("QueryIncidents"), ["Incidents:read"]) # Test with unknown operation self.assertEqual(get_required_scopes("UnknownOperation"), []) # Test with empty string self.assertEqual(get_required_scopes(""), []) # Test with None (should handle gracefully) self.assertEqual(get_required_scopes(None), []) if __name__ == "__main__": unittest.main()

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/CrowdStrike/falcon-mcp'

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