Integration Guide

Snipara works with any MCP-compatible client. This guide covers setup for the most popular clients including Claude Code, Cursor, Gemini CLI, Continue.dev, VS Code, and custom integrations.

Before you begin, make sure you have created a project and generated an API key.

Installation Methods

Snipara offers two ways to connect your MCP client:

HTTP Direct (Recommended)

No installation required. Connect directly via URL.

  • ✓ Works with Claude Code, Cursor, ChatGPT
  • ✓ Zero setup on your machine
  • ✓ Always up-to-date

stdio PackagePyPI

Install locally for Claude Desktop and universal support.

  • ✓ Works with ALL MCP clients
  • ✓ Required for Claude Desktop
  • pip install snipara-mcp
pip install snipara-mcp
or run without installing:
uvx snipara-mcp

Claude Code

Claude Code is Anthropic's official CLI for Claude. It supports HTTP transport for direct connection.

Option A: HTTP Direct (Recommended)

{
  "mcpServers": {
    "snipara": {
      "type": "http",
      "url": "https://api.snipara.com/mcp/YOUR_PROJECT_ID",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Option B: stdio Package

{
  "mcpServers": {
    "snipara": {
      "command": "uvx",
      "args": ["snipara-mcp"],
      "env": {
        "SNIPARA_API_KEY": "YOUR_API_KEY",
        "SNIPARA_PROJECT_ID": "YOUR_PROJECT_ID"
      }
    }
  }
}

Security Note

Replace YOUR_PROJECT_ID and YOUR_API_KEY with your actual values from the Snipara dashboard.

Step 3: Verify Connection

Restart Claude Code and verify the connection:

claude-code --list-mcp-tools
snipara: rlm_context_query, rlm_ask, rlm_search, rlm_inject...

Step 4: Start Querying

Claude will now automatically use Snipara to query your documentation when relevant. Try asking a question about your docs:

claude-code
How does authentication work in this project?
[Using snipara.rlm_context_query]
Based on your documentation, authentication works by...

Claude Desktop

Claude Desktop requires the stdio package since it doesn't support HTTP transport directly.

Configuration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "snipara": {
      "command": "uvx",
      "args": ["snipara-mcp"],
      "env": {
        "SNIPARA_API_KEY": "YOUR_API_KEY",
        "SNIPARA_PROJECT_ID": "YOUR_PROJECT_ID"
      }
    }
  }
}

Requires Python

You need Python 3.10+ and uv installed. Install uv with: curl -LsSf https://astral.sh/uv/install.sh | sh

Cursor

Cursor supports both HTTP direct and stdio. HTTP is recommended.

Option A: HTTP Direct (v0.48.0+)

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "snipara": {
      "transport": "sse",
      "url": "https://api.snipara.com/mcp/YOUR_PROJECT_ID",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Option B: stdio Package

{
  "mcpServers": {
    "snipara": {
      "command": "uvx",
      "args": ["snipara-mcp"],
      "env": {
        "SNIPARA_API_KEY": "YOUR_API_KEY",
        "SNIPARA_PROJECT_ID": "YOUR_PROJECT_ID"
      }
    }
  }
}

Gemini CLI

Gemini CLI is Google's official open-source AI agent with native MCP support. It's free to use with generous rate limits.

Step 1: Install Gemini CLI

Install Gemini CLI globally:

npm install -g @google/gemini-cli

Step 2: Configure MCP Server

Add Snipara to your Gemini settings. Open or create the configuration file:

code ~/.gemini/settings.json

Add the Snipara server configuration:

{
  "mcpServers": {
    "snipara": {
      "transportType": "sse",
      "url": "https://api.snipara.com/mcp/YOUR_PROJECT_ID/sse",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Step 3: Verify Connection

List available MCP servers to verify the connection:

gemini mcp list
snipara: connected (7 tools available)

Step 4: Start Querying

Gemini will now use Snipara tools when querying your documentation:

gemini
How does authentication work in this project?
[Calling snipara.rlm_context_query]
Based on your documentation, authentication works by...

Free Tier

Gemini CLI offers 60 requests/minute and 1,000 requests/day on the free tier.

Custom Integration

Building your own MCP client? Here is the protocol specification for Snipara.

Connection

Snipara uses Server-Sent Events (SSE) for the MCP transport layer.

// Connect to MCP endpoint
const eventSource = new EventSource(
  'https://api.snipara.com/mcp/YOUR_PROJECT_ID/sse',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

Tool Invocation

Invoke tools using HTTP POST:

const response = await fetch(
  'https://api.snipara.com/mcp/YOUR_PROJECT_ID/tools/invoke',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: JSON.stringify({
      name: 'rlm_context_query',
      arguments: {
        query: 'How does authentication work?',
        max_tokens: 4000
      }
    })
  }
);

Available Endpoints

EndpointMethodDescription
/mcp/:projectId/sseGETSSE connection for real-time updates
/mcp/:projectId/toolsGETList available tools
/mcp/:projectId/tools/invokePOSTInvoke a tool
/mcp/:projectId/resourcesGETList available resources

Environment Variables

For production deployments, we recommend storing your API key in environment variables:

.env.local
SNIPARA_API_KEY=sk_live_xxxxxxxxxxxxxxxx
SNIPARA_PROJECT_ID=proj_abc123

Then reference them in your configuration:

{
  "mcpServers": {
    "snipara": {
      "url": "https://api.snipara.com/mcp/${SNIPARA_PROJECT_ID}",
      "headers": {
        "Authorization": "Bearer ${SNIPARA_API_KEY}"
      }
    }
  }
}

Troubleshooting

Connection refused or timeout
  • Check that your API key is valid and not expired
  • Verify the project ID in the URL is correct
  • Ensure your firewall allows outbound HTTPS connections
  • Try the health check endpoint: GET /mcp/:projectId/health
401 Unauthorized error
  • Verify your API key is correct (check for extra spaces)
  • Ensure the header format is Authorization: Bearer YOUR_KEY
  • Check if the API key has expired in your dashboard
  • Regenerate the API key if issues persist
Tools not appearing in client
  • Restart your MCP client after configuration changes
  • Check the client logs for connection errors
  • Verify the MCP configuration file syntax is valid JSON
  • Test the tools endpoint directly with curl
Slow or empty responses
  • Check if your documentation has been indexed (use rlm_stats)
  • Try a simpler query to test connectivity
  • Reduce the max_tokens parameter for faster responses
  • Check the Snipara dashboard for query logs

Need Help?