30#include <unordered_map>
63 bool revoke(
const std::string& pattern);
88 std::vector<MCPKey>
list()
const;
123 std::unordered_map<std::string, MCPAccessLevel> keys_;
126 mutable std::mutex key_mutex_;
135 static std::string server_wildcard(
const std::string& tool_name);
144 MCPAccessLevel find_best_match(
const std::string& tool_name)
const;
Per-identity set of authorized MCP tool keys.
bool has_access(const std::string &tool_name, MCPAccessLevel required) const
Check if a specific tool is authorized at the required level.
void clear()
Remove all granted keys.
bool revoke(const std::string &pattern)
Revoke a tool key entirely.
bool deserialize(const std::string &json)
Deserialize key set from JSON string.
std::string serialize() const
Serialize key set to JSON string.
std::vector< MCPKey > list() const
List all granted keys.
size_t size() const
Number of granted keys.
void grant(const std::string &pattern, MCPAccessLevel level)
Grant a tool key with an access level.
Configuration structs with defaults.
Activate model on GPU (WARM → ACTIVE).
MCPAccessLevel
MCP tool access level for per-identity authorization.