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.
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.
Best when the client accepts plain remote MCP over HTTP and you want the simplest setup.
https://api.snipara.com/mcp/YOUR_PROJECT_SLUGUse only for clients that explicitly require streaming Server-Sent Events transport.
https://api.snipara.com/mcp/YOUR_PROJECT_SLUG/sseUse 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_SLUGWhat 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 dashboardYOUR_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.
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 listmy-project (http) - https://api.snipara.com/mcp/YOUR_PROJECT_SLUGTest the connection:
claude mcp test my-project✓ Connection successful (45ms)✓ 125 tools availableUsing Snipara Tools
Once connected, Claude Code will automatically use Snipara tools when appropriate. You can also explicitly request them:
claudeUse 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:
| Category | Tool | Description |
|---|---|---|
| Context Optimization | ||
| Primary | snipara_context_query | Full semantic search with token budgeting |
| Primary | snipara_ask | Quick query with predictable tokens (~2.5K) |
| Primary | snipara_search | Regex pattern search across docs |
| Agent Memory | ||
| Memory | snipara_remember | Store facts, decisions, learnings for later |
| Memory | snipara_recall | Semantically recall relevant memories |
| Memory | snipara_memories | List and browse stored memories |
| Planning & Multi-Query | ||
| Planning | snipara_plan | Generate execution plan for complex tasks |
| Planning | snipara_decompose | Break queries into sub-queries with deps |
| Planning | snipara_multi_query | Execute multiple queries in parallel |
| Session & Utility | ||
| Session | snipara_inject | Set persistent session context |
| Session | snipara_context | Show current session context |
| Utility | snipara_stats | Documentation statistics |
| Utility | snipara_sections | List all document sections |
Context Optimization
snipara_context_queryFull semantic search with token budgeting
snipara_askQuick query with predictable tokens (~2.5K)
snipara_searchRegex pattern search across docs
Agent Memory
snipara_rememberStore facts, decisions, learnings for later
snipara_recallSemantically recall relevant memories
snipara_memoriesList and browse stored memories
Planning & Multi-Query
snipara_planGenerate execution plan for complex tasks
snipara_decomposeBreak queries into sub-queries with deps
snipara_multi_queryExecute multiple queries in parallel
Session & Utility
snipara_injectSet persistent session context
snipara_contextShow current session context
snipara_statsDocumentation statistics
snipara_sectionsList 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 ~/.bashrcexport 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
- Run
claude mcp listto verify the server is added - Check the URL is correct and accessible
- Try
claude mcp remove my-projectand add it again
- 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-mcpplussnipara-mcp-loginas a compatibility path.
- 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-loginwas run for the right project
- 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