Sponsored by Deepsite.site

Turbot Guardrails Model Context Protocol (MCP) Server

Created By
turbot9 months ago
Enable AI assistants to explore and query your Turbot Guardrails data!
Content

Turbot Guardrails Model Context Protocol (MCP) Server

Unlock the power of AI-driven cloud governance with Turbot Guardrails! This Model Context Protocol (MCP) server connects AI assistants like Claude to your Guardrails data, enabling natural language exploration, analysis, and automation across your cloud estate.

Guardrails MCP bridges AI assistants and your Guardrails environment, allowing natural language:

  • Querying and analyzing cloud resources using GraphQL
  • Listing and filtering resource, control, and policy types
  • Executing controls and reviewing compliance
  • Exploring GraphQL schemas for custom queries
  • Processing templates using Nunjucks for dynamic configurations

Installation

Prerequisites

Configuration

Add Guardrails MCP to your AI assistant's configuration file:

{
  "mcpServers": {
    "turbot-guardrails": {
      "command": "npx",
      "args": ["-y", "@turbot/guardrails-mcp"],
      "env": {
        "TURBOT_GRAPHQL_ENDPOINT": "https://demo-acme.cloud.turbot.com/api/latest/graphql",
        "TURBOT_ACCESS_KEY_ID": "abcdefgh-1234-0808-wxyz-123456789012",
        "TURBOT_SECRET_ACCESS_KEY": "hgfedcba-1234-0101-aaaa-aabbccddee00"
      }
    }
  }
}

AI Assistant Setup

AssistantConfig File LocationSetup Guide
Claude Desktopclaude_desktop_config.jsonClaude Desktop MCP Guide →
Cursor~/.cursor/mcp.jsonCursor MCP Guide →

Save the configuration file and restart your AI assistant for the changes to take effect.

Prompting Guide

Start by asking about your Guardrails environment, for example:

What AWS accounts can you see in Guardrails?

Simple, specific questions work well:

Show me all S3 buckets created in the last week

Generate compliance and security reports:

List all EC2 instances that are non-compliant with our tagging standards

Explore policy and control types:

Show me all policy types related to encryption
List all control types for S3 buckets

Dive into resource details:

Show details for resource ID 1234567890

Remember to:

  • Be specific about which resources, controls, or policies you want to analyze
  • Use filters for categories, titles, or tags
  • Start with simple queries before adding complex conditions
  • Use natural language – the LLM will handle the GraphQL translation

Capabilities

Tools

Core Query & Template Tools

  • guardrails_query
    • Run any read-only GraphQL query in Guardrails.
    • Input: query (string, required), variables (object, optional)
  • guardrails_query_runnable
    • Run a GraphQL query against a specific runnable type and resource.
    • Input: runnableTypeUri (string), resourceId (string), query (string), variables (object, optional)
  • guardrails_query_runnable_introspection
    • Introspect the schema of a runnable type.
    • Input: runnableTypeUri (string), section (string, optional: 'queryType', 'types', 'type'), typeName (string, required if section is 'type')
  • guardrails_process_template
    • Render a Nunjucks template with provided input.
    • Input: template (string), input (object, optional)

Resource Operations

  • guardrails_resource_list
    • List resources, with optional filter.
    • Input: filter (string, optional)
  • guardrails_resource_show
    • Show details for a specific resource.
    • Input: id (string)
  • guardrails_resource_type_list
    • List resource types, with optional filter.
    • Input: filter (string, optional)
  • guardrails_resource_type_show
    • Show details for a specific resource type.
    • Input: id (string)

Control Operations

  • guardrails_control_list
    • List controls, with optional filter.
    • Input: filter (string, optional)
  • guardrails_control_show
    • Show details for a specific control.
    • Input: id (string)
  • guardrails_control_run
    • Run a control by its ID.
    • Input: controlId (string)
  • guardrails_control_type_list
    • List control types, with optional filter.
    • Input: filter (string, optional)
  • guardrails_control_type_show
    • Show details for a specific control type.
    • Input: id (string)

Policy Operations

  • guardrails_policy_type_list
    • List policy types, with optional filter.
    • Input: filter (string, optional)
  • guardrails_policy_type_show
    • Show details for a specific policy type.
    • Input: id (string)
  • guardrails_policy_setting_list
    • List policy settings, with optional filter.
    • Input: filter (string, optional)
  • guardrails_policy_setting_show
    • Show details for a specific policy setting.
    • Input: id (string)

Development

Clone and Setup

  1. Clone the repository and navigate to the directory:
    git clone https://github.com/turbot/guardrails-mcp.git
    cd guardrails-mcp
    
  2. Install dependencies:
    npm install
    
  3. Create a .env file with your Turbot Guardrails API credentials:
    cp .env.example .env
    # Edit .env with your API key
    
  4. Build the project:
    npm run build
    
  5. For development with auto-recompilation:
    npm run watch
    
  6. To use your local development version with Claude Desktop, update your config:
    {
      "mcpServers": {
        "turbot-guardrails": {
          "command": "node",
          "args": ["/full/path/to/guardrails-mcp/dist/index.js"],
          "env": {
            "TURBOT_GRAPHQL_ENDPOINT": "https://demo-acme.cloud.turbot.com/api/latest/graphql",
            "TURBOT_ACCESS_KEY_ID": "abcdefgh-1234-0808-wxyz-123456789012",
            "TURBOT_SECRET_ACCESS_KEY": "hgfedcba-1234-0101-aaaa-aabbccddee00"
          }
        }
      }
    }
    

Replace /full/path/to/guardrails-mcp with the absolute path to your local development directory.

Debugging

  • MCP Inspector
    • Test the server with the MCP Inspector:
      npm run build
      npx @modelcontextprotocol/inspector node dist/index.js
      

Troubleshooting

  • Authentication Errors: Ensure your API key is correct and has the necessary permissions
  • Connection Issues: Verify the Guardrails endpoint URL is correct
  • API Errors: Check the server logs for detailed GraphQL error messages
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Playwright McpPlaywright MCP server
Tavily Mcp