Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    RelayShield AI SDK: Mandatory MCP Server Gate

    1

    * - 'flagged' / 'blocked': Returns "denied", tool does not run.

    $19

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    RelayShield AI SDK: Mandatory MCP Server Gate

    RelayShield AI SDK: Mandatory MCP Server Gate

    Example session with this skill installed

    Add a security gate to my connectMcp tool using RelayShield to prevent access to malicious servers.

    • Read your context and instructions
    • Compiled the relayshield ai sdk

    I have integrated the relayshieldMcpGate into your Vercel AI SDK configuration. This ensures that any attempt to use the connectMcp tool is intercepted and validated against RelayShield's threat intelligence before the connection is established.

    Implementation details

    import { generateText } from 'ai';
    import { openai } from '@ai-sdk/openai';
    import { z } from 'zod';
    import { relayshieldMcpGate } from 'ai-sdk-relayshield';
    
    const result = await generateText({
      model: openai('gpt-4o'),
      tools: {
        connectMcp: {
          description: 'Connect to an MCP server',
          parameters: z.object({ serverUrl: z.string() }),
          execute: async ({ serverUrl }) => {
            // This only runs if relayshieldMcpGate returns undefined
            return { connected: true, serverUrl };
          },
        },
      },
      toolApproval: relayshieldMcpGate({
        apiKey: process.env.RELAYSHIELD_API_KEY,
      }),
      prompt: 'Connect to the MCP server at https://mcp.example.com/mcp',
    });
    
    /**
     * Gate Verdict Logic:
     * - 'no_flags_found': Tool execution proceeds.
     * - 'flagged' / 'blocked': Returns "denied", tool does not run.
     * - Internal Error: Defaults to "denied" (fail-closed).
     */
    

    Connects securely to your tools. The creator never sees your data.

    About this skill

    I have integrated the relayshieldMcpGate into your Vercel AI SDK configuration. This ensures that any attempt to use the connectMcp tool is intercepted and validated against RelayShield's threat intelligence before the connection is established.

    Implementation details

    import { generateText } from 'ai';
    import { openai } from '@ai-sdk/openai';
    import { z } from 'zod';
    import { relayshieldMcpGate } from 'ai-sdk-relayshield';
    
    const result = await generateText({
      model: openai('gpt-4o'),
      tools: {
        connectMcp: {
          description: 'Connect to an MCP server',
          parameters: z.object({ serverUrl: z.string() }),
          execute: async ({ serverUrl }) => {
            // This only runs if relayshieldMcpGate returns undefined
            return { connected: true, serverUrl };
          },
        },
      },
      toolApproval: relayshieldMcpGate({
        apiKey: process.env.RELAYSHIELD_API_KEY,
      }),
      prompt: 'Connect to the MCP server at https://mcp.example.com/mcp',
    });
    
    /**
     * Gate Verdict Logic:
     * - 'no_flags_found': Tool execution proceeds.
     * - 'flagged' / 'blocked': Returns "denied", tool does not run.
     * - Internal Error: Defaults to "denied" (fail-closed).
     */
    

    Next steps

    • Ensure RELAYSHIELD_API_KEY is set in your environment variables.
    • Test the gate with a known test URL to confirm the "denied" workflow triggers correctly.
    • Add the checkPromptInjectionBreach tool if your agent handles sensitive operator sessions.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Requires Vercel AI SDK v7 and a RelayShield API key. Does not monitor post-connection behavior. Auth or malformed response errors trigger immediate denial.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 10 days ago

    Accounts
    RelayShield API key
    Software
    Node.js 18+Vercel AI SDK v7

    RelayShield has a free tier.

    Permissions

    Network Access
    Environment Variables

    Allowed Hosts

    api.relayshield.net

    Network Access is required to call the RelayShield API at api.relayshield.net for the threat-intelligence checks. Environment Variables is required for the RELAYSHIELD_API_KEY, or the key can be passed as a call argument instead. No file access is needed.

    Listed10 days ago

    What's inside

    Frequently Asked Questions

    Traditional prompt-based security can be bypassed by the agent's logic; RelayShield uses a hard-coded gate in the Vercel AI SDK 'toolApproval' cycle that blocks malicious MCP connections before they execute, regardless of what the LLM is instructed to do.

    This skill is specifically built for Node.js 18+ environments using the Vercel AI SDK v7, making it an essential add-on for developers building agents that interact with external tools or MCP servers.

    RelayShield protects your agent by detecting typosquatting, checking over 785,000 indicators of compromise (IOCs), and verifying if operator emails appear in dark web databases linked to session-stealing attacks.

    The skill 'fails closed,' meaning that if the RelayShield service is unreachable or an internal error occurs, the security gate will default to a 'denied' status to prevent any potentially unsafe connections.

    RelayShield provides a mandatory pre-execution verdict, but it does not monitor the ongoing behavior or data flow of a server once the connection has been successfully established.

    You will receive the RelayShield integration module and documentation; however, you will need to provide your own RelayShield API key and ensure 'zod' is installed for schema validation.

    New in Security