MCP Master Guide

MCP Integrations Hub

Connect Brainito to all major AI tools. Whether you use Cursor, Windsurf, Claude Desktop, or custom Python agents, the Model Context Protocol makes integrating our marketing audit tools instant.

Overview & Prerequisites

Brainito supports two primary ways to consume MCP:

  • Local execution via STDIO: The AI tool downloads @brainito/mcp using npx and runs it locally on your machine. This is standard for Claude Desktop, Cursor, and Windsurf. Requires Node.js 18+.
  • Remote execution via SSE/HTTP: You connect directly to https://brainito.com/api/mcp. Ideal for LangChain, backend services, or tools like Replit where running a local npx command isn't preferred.
1. Get Your Service Account Key

To use the MCP server, you need a Service Account Key (prefix: brn_sa_) scoped to website.scan and reports.read.

Create one in your settings →

IDEs & Editors

Cursor

Cursor has native support for stdio MCP servers. Go to Settings → Features → MCP → Add new global MCP server, or add this to .cursor/mcp.json:

json
{
  "mcpServers": {
    "brainito": {
      "command": "npx",
      "args": ["-y", "@brainito/mcp@latest"],
      "env": {
        "BRAINITO_API_KEY": "brn_sa_YOUR_SECRET_KEY"
      }
    }
  }
}

Windsurf

Windsurf integrates seamlessly via its MCP config file. Edit ~/.codeium/windsurf/mcp_config.json:

json
{
  "mcpServers": {
    "brainito": {
      "command": "npx",
      "args": ["-y", "@brainito/mcp@latest"],
      "env": {
        "BRAINITO_API_KEY": "brn_sa_YOUR_SECRET_KEY"
      }
    }
  }
}

VS Code (Roo Code / Cline)

VS Code doesn't have native MCP support yet, but top AI extensions like Roo Code and Cline fully support it. Add this to your cline_mcp_settings.json or roo_mcp_settings.json:

json
{
  "mcpServers": {
    "brainito": {
      "command": "npx",
      "args": ["-y", "@brainito/mcp@latest"],
      "env": {
        "BRAINITO_API_KEY": "brn_sa_YOUR_SECRET_KEY"
      }
    }
  }
}

Replit

In Replit, the easiest way to use Brainito MCP with Replit AI is via the Remote SSE endpoint to avoid installing Node dependencies in every container.

json
// Replit AI MCP Configuration
{
  "mcpServers": {
    "brainito-remote": {
      "command": "curl",
      "args": ["-N", "https://brainito.com/api/mcp"],
      "env": {
        "Authorization": "Bearer brn_sa_YOUR_SECRET_KEY"
      }
    }
  }
}

Antigravity IDE

Antigravity is Google's agentic IDE. You can register the server natively in your .gemini/antigravity-ide/mcp directory:

json
// Inside ~/.gemini/antigravity-ide/mcp/brainito/config.json
{
  "command": "npx",
  "args": ["-y", "@brainito/mcp@latest"],
  "env": {
    "BRAINITO_API_KEY": "brn_sa_YOUR_SECRET_KEY"
  }
}

AI Clients & CLI

Claude Desktop

Add the following to your config file located at:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

json
{
  "mcpServers": {
    "brainito": {
      "command": "npx",
      "args": ["-y", "@brainito/mcp@latest"],
      "env": {
        "BRAINITO_API_KEY": "brn_sa_YOUR_SECRET_KEY"
      }
    }
  }
}

Claude Code (CLI)

Anthropic's new terminal agent claude-code can automatically load MCP servers using the --mcp flag.

bash
claude --mcp "npx -y @brainito/mcp@latest"

Gemini CLI

If you use a Google Gemini-backed CLI tool, pass the environment variables securely:

bash
export BRAINITO_API_KEY=brn_sa_YOUR_SECRET_KEY
gemini-cli --mcp-server "npx -y @brainito/mcp@latest"

Codex / GitHub Copilot

GitHub Copilot doesn't natively support user-defined MCP servers yet, but you can bridge it using an MCP proxy extension or wait for GitHub's upcoming native MCP patch.

MCP Inspector (Testing)

To test the Brainito tools locally in a GUI debugger, use the official inspector:

bash
export BRAINITO_API_KEY=brn_sa_YOUR_SECRET_KEY
npx @modelcontextprotocol/inspector npx -y @brainito/mcp@latest

Code & Framework Integrations

Node.js / TypeScript

Connect to the remote Brainito MCP server using the official @modelcontextprotocol/sdk.

typescript
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";

const transport = new SSEClientTransport(
  new URL("https://brainito.com/api/mcp"),
  { headers: { Authorization: "Bearer brn_sa_YOUR_SECRET_KEY" } }
);

const client = new Client({ name: "my-app", version: "1.0.0" }, { capabilities: {} });
await client.connect(transport);

// Trigger a website scan
const result = await client.callTool({
  name: "scan_website",
  arguments: { url: "https://example.com" }
});
console.log(result);

Python

Use the mcp pip package to connect over SSE.

python
from mcp.client.sse import sse_client
from mcp.client.session import ClientSession

url = "https://brainito.com/api/mcp"
headers = {"Authorization": "Bearer brn_sa_YOUR_SECRET_KEY"}

async with sse_client(url, headers=headers) as (read, write):
    async with ClientSession(read, write) as session:
        await session.initialize()
        
        # Call tool
        result = await session.call_tool("scan_website", {"url": "https://example.com"})
        print(result)

LangChain

LangChain makes it easy to turn MCP tools into Agent tools.

python
from langchain_mcp import MCPToolkit
from langchain_openai import ChatOpenAI
from langgraph.prebuilt import create_react_agent

# Initialize toolkit connecting to Brainito
toolkit = MCPToolkit(
    url="https://brainito.com/api/mcp",
    headers={"Authorization": "Bearer brn_sa_YOUR_SECRET_KEY"}
)
tools = toolkit.get_tools()

# Create agent
llm = ChatOpenAI(model="gpt-4")
agent = create_react_agent(llm, tools)

# Run!
response = agent.invoke({
    "messages": [("user", "Can you scan example.com and tell me its marketing score?")]
})

LlamaIndex

Wrap Brainito tools for LlamaIndex query engines.

python
from llama_index.agent.openai import OpenAIAgent
from llama_index.tools.mcp import MCPToolSpec

# Load tools from Brainito MCP
mcp_spec = MCPToolSpec(
    url="https://brainito.com/api/mcp",
    headers={"Authorization": "Bearer brn_sa_YOUR_SECRET_KEY"}
)
tools = mcp_spec.to_tool_list()

# Initialize agent
agent = OpenAIAgent.from_tools(tools, verbose=True)
agent.chat("Start a marketing scan for https://example.com")

Go & Rust

If you are using Go or Rust, you can interact with our /api/mcp endpoint directly by implementing the JSON-RPC 2.0 HTTP specification or by utilizing community-built MCP client libraries for your respective languages.