MCP Server Setup

Connect the Alterspective Brand Guidelines to Claude, Gemini, OpenAI, and any MCP-compatible AI assistant.

✅ VERIFIED & WORKING

Build Status: ✅ Builds successfully

Test Results: All 10 tools functional with accurate data

WCAG Validation: ✅ Correct contrast calculations

Transport: Streamable HTTP (MCP 2024-11-05)

Production Endpoint

https://brand.alterspective.com.au/mcp

Transport: Streamable HTTP | Rate limit: 100 req/15min | Auth: Optional

Choose Your Platform

Gemini CLI

Gemini

Direct SSE connection via .mcp.json

  • ✅ Remote URL connection
  • ✅ SSE transport
  • ✅ Project-level config
Setup Gemini →
OpenAI / Custom

API Integration

Use MCP SDK or REST API for any AI platform

  • ✅ MCP SDK client
  • ✅ REST-style API
  • ✅ Any language/platform
Setup API →

Claude Setup

Works with Claude Desktop and Claude Code (CLI).

Option A: Remote Connection (Recommended)

1

Configure Claude Desktop

Edit your Claude Desktop configuration file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {
    "alterspective-brand": {
      "url": "https://brand.alterspective.com.au/mcp",
      "transport": "http"
    }
  }
}
✅ That's it! No build step required. Restart Claude Desktop and ask: "What Alterspective brand tools are available?"
2

Claude Code (CLI)

Add to your project's .mcp.json:

{
  "mcpServers": {
    "alterspective-brand": {
      "url": "https://brand.alterspective.com.au/mcp",
      "transport": "http"
    }
  }
}

Option B: Local Connection (For Development)

1

Build and Configure Locally

# Build the MCP server
cd alterspective-ai-brand-guide
npm run build --workspace=packages/mcp-server

Then add to Claude Desktop config:

{
  "mcpServers": {
    "alterspective-brand-local": {
      "command": "node",
      "args": ["<path-to-repo>/packages/mcp-server/dist/index.js"]
    }
  }
}
⚠️ Important: Use absolute paths. On Windows, use double backslashes or forward slashes.

Gemini CLI Setup

Gemini CLI connects directly to SSE endpoints.

1

Add to .mcp.json

Create or edit .mcp.json in your project root:

{
  "mcpServers": {
    "alterspective-brand": {
      "url": "https://brand.alterspective.com.au/mcp",
      "transport": "sse"
    }
  }
}
✅ Done! Gemini CLI will discover and connect to the MCP server automatically.

API / OpenAI / Custom Integration

Use the MCP endpoint from any language or platform.

1

Using the MCP SDK (Node.js)

Connect with the official MCP SDK:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  new URL("https://brand.alterspective.com.au/mcp")
);
const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(transport);

// List available tools
const tools = await client.listTools();
console.log(tools);

// Call a tool
const result = await client.callTool("validate_colors", {
  foreground: "#FFFFFF",
  background: "#ABDD65"
});
console.log(result); // { isValid: false, violations: [...] }
2

Direct HTTP (Any Language)

The MCP endpoint accepts standard JSON-RPC over HTTP:

# Step 1: Initialize session
curl -X POST https://brand.alterspective.com.au/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-app","version":"1.0"}},"id":1}'

# Response includes Mcp-Session-Id header — use it for subsequent requests

# Step 2: List tools
curl -X POST https://brand.alterspective.com.au/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: <session-id>" \
  -d '{"jsonrpc":"2.0","method":"tools/list","params":{},"id":2}'

# Step 3: Call a tool
curl -X POST https://brand.alterspective.com.au/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Mcp-Session-Id: <session-id>" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_critical_rules","arguments":{"category":"logo"}},"id":3}'
3

OpenAI Function Calling Bridge

Convert MCP tools to OpenAI function-calling format:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import OpenAI from "openai";

// Connect to MCP
const transport = new StreamableHTTPClientTransport(
  new URL("https://brand.alterspective.com.au/mcp")
);
const mcpClient = new Client({ name: "openai-bridge", version: "1.0.0" });
await mcpClient.connect(transport);

// Get tools and convert to OpenAI format
const { tools } = await mcpClient.listTools();
const openaiTools = tools.map(t => ({
  type: "function",
  function: {
    name: t.name,
    description: t.description,
    parameters: t.inputSchema
  }
}));

// Use with OpenAI
const openai = new OpenAI();
const response = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [{ role: "user", content: "Check if white text on #ABDD65 is accessible" }],
  tools: openaiTools
});

Rate Limiting

The MCP server has rate limits to prevent abuse:

  • Unauthenticated: 100 requests per 15 minutes per IP
  • Authenticated: 1,000 requests per 15 minutes (pass Authorization: Bearer <key>)

For higher limits or API key access, contact the Alterspective team.

Available Tools (10)

Once connected, your AI assistant will have access to these brand guideline tools:

get_critical_rules

Returns non-negotiable brand rules that MUST be followed.

Example: "Get all logo-specific brand rules"
Parameters:
  • theme (optional): Theme name (default: 'alterspective')
  • category (optional): Filter by logo, color, typography, icons, accessibility

get_design_tokens

Returns design tokens (colors, typography, spacing, motion).

Example: "Get all color tokens in CSS format"
Parameters:
  • theme (optional): Theme name
  • category (optional): Filter by colors, typography, spacing, motion
  • format (optional): Output format (json, css, tailwind)

get_css_variables

Generates CSS custom properties from design tokens.

Example: "Generate CSS variables for Alterspective theme"
Parameters:
  • theme (optional): Theme name
  • scope (optional): Filter by colors, typography, spacing

validate_colors

Validates color combinations for WCAG compliance.

Example: "Check if white text on citrus background is accessible"
Parameters:
  • foreground (required): Foreground color (hex)
  • background (required): Background color (hex)
  • fontSize (optional): Font size for context

get_asset_info

Returns information about brand assets (logos, icons, patterns, fonts).

Example: "Where are the Alterspective logo files located?"
Parameters:
  • theme (optional): Theme name
  • assetType (optional): Filter by logos, icons, patterns, fonts

get_rule_by_id

Retrieves a specific rule by its ID.

Example: "What is rule LOGO-001?"
Parameters:
  • theme (optional): Theme name
  • ruleId (required): Rule ID (e.g., 'LOGO-001', 'COLOR-001')

get_rules_summary

Returns a summary of all rules grouped by category.

Example: "Give me a summary of all brand rules"
Parameters:
  • theme (optional): Theme name

list_themes

Lists all available themes in the system.

Example: "What themes are available?"
Parameters: None

get_component_status

Returns lifecycle status and metadata for components.

Example: "What is the status of the Button component?"
Parameters:
  • theme (optional): Theme name
  • componentName (optional): Specific component
  • status (optional): Filter by experimental, beta, stable, legacy, deprecated

search_icons

Search for brand icons by name, tags, or category.

Example: "Search for validation icons"
Parameters:
  • theme (optional): Theme name
  • query (optional): Search query
  • category (optional): actions, navigation, status, objects, communication, concepts
  • limit (optional): Max results

Real-World Usage Examples

Example 1: Implementing a Button Component

"I'm implementing a primary button for Alterspective. What color should I use for the background, and what font should I use for 16px button text?"
Claude with MCP will:
  1. Use get_design_tokens to get Marine color (#075156)
  2. Use get_critical_rules with typography filter
  3. Recommend Montserrat for 16px text (TYPO-001)
  4. Provide CSS variables: --as-marine and --as-font-body

Example 2: Validating a Design

"I want to use white text on a citrus (#ABDD65) background. Is this allowed?"
Claude with MCP will:
  1. Use validate_colors to check contrast (returns 1.58:1)
  2. Use get_rule_by_id for COLOR-001
  3. Reject the design - fails WCAG AA (needs 4.5:1)
  4. Suggest alternative: Navy text (#17232D) with 10.09:1 ratio

Example 3: Logo Placement

"How should I position the Alterspective logo on a landing page?"
Claude with MCP will:
  1. Use get_rule_by_id for LOGO-001
  2. Enforce: LEFT or RIGHT alignment ONLY
  3. Prohibit: Center alignment
  4. Provide rationale: Brand identity consistency

Troubleshooting

Server won't start

# Rebuild the server
cd packages/mcp-server
npm run build

# Check for TypeScript errors
npm run typecheck

Claude can't see the tools

  • Verify config file path is correct
  • Use absolute paths (not relative)
  • Restart Claude Desktop completely
  • Check Claude Desktop logs

Tools return errors

# Verify theme data exists
ls themes/alterspective/

# Test manually
node packages/mcp-server/dist/index.js

Additional Resources

Style
Theme