Menu

Claude Code Integration

Claude Code is Anthropic's official CLI for Claude with native MCP support. This guide covers the Hosted MCP path for connecting Snipara to Claude Code.

Primary path
For LLM agents: use Hosted MCP
Claude Code is an LLM agent client. The primary Snipara path is Hosted MCP with a project slug and API key.

Recommended Integration

Claude Code is one of the best ways to use Snipara. The primary setup path is direct Hosted MCP config with a project slug and API key.

Use local snipara-mcp only when you need stdio compatibility, client development, or advanced testing.

Transport Matrix

Use the project slug consistently across all MCP transports. Pick the transport your client actually supports instead of mixing setup stories.

Project slug
HTTP direct
Recommended

Best when the client accepts plain remote MCP over HTTP and you want the simplest setup.

https://api.snipara.com/mcp/YOUR_PROJECT_SLUG
SSE
Advanced

Use only for clients that explicitly require streaming Server-Sent Events transport.

https://api.snipara.com/mcp/YOUR_PROJECT_SLUG/sse
Local stdio
Local only

Use for stdio compatibility, client package development, and advanced tests powered by uvx snipara-mcp. Prefer Hosted MCP when remote MCP is supported.

SNIPARA_PROJECT_SLUG=YOUR_PROJECT_SLUG

What You Get

125 MCP Tools

Full access to context, memory automation, analytics, planning, and multi-agent features directly from Claude Code.

Zero Install

HTTP transport means no local packages needed. Just add configuration and you're ready.

Auto Tool Selection

Claude automatically uses Snipara tools when relevant to your questions about code and documentation.

Quick Setup (One Command)

The fastest manual HTTP path is using the claude mcp add command:

claude mcp add --scope project --transport http my-project "https://api.snipara.com/mcp/YOUR_PROJECT_SLUG" --header "X-API-Key: YOUR_API_KEY"

Replace the placeholders:

  • my-project - A name for this MCP server (use your project slug)
  • YOUR_PROJECT_SLUG - Your project slug from the Snipara dashboard
  • YOUR_API_KEY - Your Snipara API key with access to this project

Local stdio compatibility

If your setup specifically needs local stdio, install snipara-mcp, run snipara-mcp-login, then point Claude Code at the local stdio client.

Treat this as compatibility and testing tooling. Hosted MCP remains the product path.

Tip: Go to your project's Integrations tab to get a pre-filled command with your actual project slug, API key, and endpoint.

Manual Configuration

For more control, you can manually commit a project-scoped MCP config at .mcp.json:

{
  "mcpServers": {
    "my-project": {
      "type": "http",
      "url": "https://api.snipara.com/mcp/YOUR_PROJECT_SLUG",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Verify Installation

After adding the server, verify it's configured correctly:

claude mcp list
my-project (http) - https://api.snipara.com/mcp/YOUR_PROJECT_SLUG

Test the connection:

claude mcp test my-project
✓ Connection successful (45ms)
125 tools available

Using Snipara Tools

Once connected, Claude Code will automatically use Snipara tools when appropriate. You can also explicitly request them:

claude
Use snipara_ask to find how authentication works in this project
[Calling snipara_ask with question="How does authentication work?"]
Based on the documentation, authentication uses JWT tokens...

Available MCP Tools

Snipara provides 125 MCP tools. Here are the ones most commonly used in Claude Code:

Context Optimization

snipara_context_query

Full semantic search with token budgeting

snipara_ask

Quick query with predictable tokens (~2.5K)

snipara_search

Regex pattern search across docs

Agent Memory

snipara_remember

Store facts, decisions, learnings for later

snipara_recall

Semantically recall relevant memories

snipara_memories

List and browse stored memories

Planning & Multi-Query

snipara_plan

Generate execution plan for complex tasks

snipara_decompose

Break queries into sub-queries with deps

snipara_multi_query

Execute multiple queries in parallel

Session & Utility

snipara_inject

Set persistent session context

snipara_context

Show current session context

snipara_stats

Documentation statistics

snipara_sections

List all document sections

See the MCP Tools Reference for complete documentation of the full 125-tool contract.

Code Graph v1

In v1, snipara_context_query stays doc-first. It remains the right default for docs, notes, markdown, and narrative context.

For structural code questions, use snipara_code_callers, snipara_code_imports, snipara_code_neighbors, or snipara_code_shortest_path.

Multiple Projects

You can connect multiple Snipara projects to Claude Code:

claude mcp add --scope project --transport http frontend-docs ".../mcp/proj1" --header "..."
claude mcp add --scope project --transport http backend-docs ".../mcp/proj2" --header "..."
claude mcp add --scope project --transport http api-specs ".../mcp/proj3" --header "..."

Claude Code will intelligently route questions to the appropriate project based on context.

Using Environment Variables

For the direct HTTP path, store your API key in an environment variable:

~/.zshrc or ~/.bashrc
export SNIPARA_API_KEY="snp-your-api-key"

Then reference it in your configuration:

claude mcp add --scope project --transport http my-project "https://api.snipara.com/mcp/PROJECT_SLUG" --header "X-API-Key: $SNIPARA_API_KEY"

Troubleshooting

"Server not found" error
  • Run claude mcp list to verify the server is added
  • Check the URL is correct and accessible
  • Try claude mcp remove my-project and add it again
Authentication errors (401)
  • Verify your API key is correct and has access to this project (no extra spaces)
  • Check the header format: X-API-Key: snp-...
  • Ensure the API key hasn't expired
  • Try generating a new API key in the dashboard
  • If this client cannot use Hosted MCP in your environment, use local snipara-mcp plus snipara-mcp-login as a compatibility path.
Tools not being used by Claude
  • Use explicit prompts: "Use snipara_ask to..."
  • Check that documents are indexed in your project
  • Verify tools with claude mcp test my-project
  • If you are using local stdio compatibility, confirm snipara-mcp-login was run for the right project
Slow responses
  • Check your network connection
  • Large documentation sets may take longer to search
  • Use more specific queries for faster results

Claude Code Plugin

For an enhanced experience, install the Snipara Claude Code Plugin. The plugin adds 14 slash commands, 5 auto-invoked skills, and automation hooks on top of the MCP server integration.

14 Slash Commands

/snipara:lite-mode, /snipara:remember, /snipara:plan, and more.

5 Auto-Invoked Skills

Claude auto-queries docs, recalls context, and plans complex tasks.

Snipara Sandbox

Safe code execution in Docker with trajectory logging.

/plugin marketplace add Snipara/snipara-claude
/plugin install snipara@snipara-plugins
View Full Plugin Documentation

Next Steps