Skip to main content
Glama

MCPJungle mcp gateway

by mcpjungle
Mozilla Public License 2.0
638
  • Apple
mcp_client.go•1.18 kB
package model import ( "encoding/json" "gorm.io/datatypes" "gorm.io/gorm" ) // McpClient represents MCP clients and their access to the MCP Servers provided MCPJungle MCP server type McpClient struct { gorm.Model Name string `json:"name" gorm:"uniqueIndex;not null"` Description string `json:"description"` AccessToken string `json:"access_token" gorm:"unique; not null"` // AllowList contains a list of MCP Server names that this client is allowed to view and call // storing the list of server names as a JSON array is a convenient way for now. // In the future, this will be removed in favor of a separate table for ACLs. AllowList datatypes.JSON `json:"allow_list" gorm:"type:jsonb; not null"` } // CheckHasServerAccess returns true if this client has access to the specified MCP server. // If not, it returns false. func (c *McpClient) CheckHasServerAccess(serverName string) bool { if c.AllowList == nil { return false } var allowedServers []string if err := json.Unmarshal(c.AllowList, &allowedServers); err != nil { return false } for _, allowed := range allowedServers { if allowed == serverName { return true } } return false }

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/mcpjungle/MCPJungle'

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