Use Snipara with AI agents
Run npx create-snipara once, choose your assistant, and Snipara generates the Hosted MCP config, rules, templates, checks, and workflow helpers that assistant needs.
create-snipara is the setup router; local stdio packages and companion workflows are compatibility or workstation helpers, not separate onboarding products.npx create-snipara records the agent, generates the hosted MCP reference, and keeps merge-ready instruction templates without overwriting existing AGENTS.md or CLAUDE.md.
Choose compatible hooks in Snipara project settings, then apply the selected bundle locally with npx -y snipara-companion@latest automations install.
Use npx create-snipara doctor --client <client> for local wiring. The AI client still owns whether MCP tools are visible inside the chat.
Snipara is hosted MCP project intelligence for AI coding agents. It gives agents the right code, docs, project context, diagrams, reviewed memory, and durable decisions across sessions without locking customers to one LLM provider.
Connect agents to https://api.snipara.com/mcp/YOUR_PROJECT_SLUG and authenticate with a Snipara project API key. Prefer environment variables over inline secrets.
Agent compatibility
Snipara does not assume every assistant exposes the same lifecycle hooks. The configured agent determines which files are generated and which automation options stay enabled. Unsupported hook bundles remain disabled by default with an explicit reason.
This matrix is derived from the shared Snipara compatibility contract. It keeps docs, dashboard states, and generated automation bundles aligned around the configured agent.
| Agent | Generated by create-snipara | Hook install status | Caveat |
|---|---|---|---|
Claude Code Hosted MCP, project instructions, and verified lifecycle hooks. | AGENTS.md, CLAUDE.md, .mcp.json, .claude/settings.json, .claude/hooks/*.sh | Supported now | Claude Code is the verified full-hook baseline for Snipara automation. |
OpenAI Codex Hosted MCP, AGENTS.md, Codex config, and native hook automation. | AGENTS.md, .codex/config.toml, .codex/hooks.json, .codex/hooks/*.sh | Supported now | Codex documents native hooks and Snipara ships a bundle for supported lifecycle events; compaction-specific hooks remain unavailable. |
Cursor Hosted MCP, project rules, and native hook automation. | AGENTS.md, .cursor/mcp.json, .cursor/rules/snipara.mdc, .cursor/hooks.json, .cursor/hooks/*.sh | Supported now | Cursor documents project hooks and Snipara ships a bundle for supported lifecycle events; blocking/enforce decisions remain adapter-limited. |
VS Code / Copilot Hosted MCP and Copilot instructions; hook support is preview-gated. | .vscode/mcp.json, .github/copilot-instructions.md | Preview gated | VS Code agent hooks are preview and can be organization-disabled; Snipara does not install them by default. |
Gemini CLI Hosted MCP, GEMINI.md, and native hook automation. | GEMINI.md, .gemini/settings.json, .gemini/hooks/*.sh | Supported now | Gemini CLI documents native hooks and Snipara ships a supported bundle; review scripts and enable only in trusted repositories. |
Mistral Le Chat / Vibe Hosted MCP for Le Chat and Vibe plus ChatMistralAI tool calling templates. | AGENTS.md, MISTRAL.md, .vibe/config.toml, mistral-le-chat-mcp.json, mistral-langchain-tools.ts | MCP only | Mistral request hooks wrap model HTTP requests; they are not local agent lifecycle hooks, so Snipara installs MCP and instruction files only. |
MCP-only / Custom Hosted MCP tools and explicit commands only. | mcp-config.json | MCP only | MCP standardizes tools, resources, and prompts, not universal host lifecycle hooks. |
Snipara workflow
Treat Snipara as the agent task lifecycle, not only as a search box. Agents should retrieve project truth, execute against the current working tree, verify locally, then persist only durable outcomes.
Validate Hosted MCP with a tool-oriented call, recall durable memory with snipara_recall, then retrieve source truth with a targeted snipara_context_query.
Use snipara_get_chunk for cited sections, snipara_code_* for canonical structure, paid symbol cards for important symbols, and companion code impact before risky code changes when a shell checkout is available.
Use snipara_plan for complex work, write a plan file with companion when useful, then register the visible plan with snipara-companion workflow start when companion manages the run.
Use local files, rg, git, tests, lint, and type-checks for exact working-tree truth.
Use Snipara Sandbox only when sandboxed execution, repeatable validation, or isolated transformations materially help.
Persist every managed phase with workflow phase-commit, resume after compaction with workflow resume, re-enter the active phase with workflow phase-start, and close with final-commit.
For end-of-task persistence, prefer snipara_end_of_task_commit for a substantial task summary. Use snipara_remember_if_novel for one reusable memory when duplicate avoidance matters, and snipara_remember only for explicit direct memory writes.
Managed companion workflow
When the agent has already produced a visible plan, snipara-companion can make that plan operational. snipara-companion workflow start writes the phase state to .snipara/workflow/current.json. Prefer a JSON machine plan when phase ids need to stay stable. Each phase then starts with hosted context, uses companion code impact or symbol cards when needed, and ends with a hosted phase commit. After resume, rerun workflow phase-start; Companion resumes workflow/memory continuity, not Snipara Sandbox or REPL runtime state.
snipara-companion plan --query "ship auth hardening" --write-plan-file ./plan.json snipara-companion workflow start --goal "ship auth hardening" --plan-file ./plan.json snipara-companion workflow phase-start context snipara-companion workflow run --mode full --include-session-context --query "load context for auth hardening" snipara-companion code impact --changed-files src/auth.ts tests/auth.test.ts --diff-summary "auth hardening" snipara-companion workflow phase-commit context --summary "Loaded context and mapped impacted files" --files src/auth.ts snipara-companion workflow resume --include-session-context snipara-companion workflow phase-start implementation snipara-companion workflow run --mode full --include-session-context --query "implement auth hardening and rerun targeted checks" snipara-companion final-commit --summary "Shipped auth hardening and tests" --files src/auth.ts tests/auth.test.ts
Agent code context (Pro)
Structural code graph tools answer topology questions such as callers, imports, neighbors, and shortest paths. Paid Context plans add agent-ready code context: compact symbol cards before editing and change impact plans before risky multi-file changes or PR reviews.
When an agent has shell access, the primary impact command is snipara-companion code impact. It selects the local overlay for dirty or ahead worktrees, hosted MCP for clean indexed code, and reports that choice in sourceSelection. The hosted snipara_code_impact tool below is the fallback when companion is unavailable and the canonical hosted graph check after push and reindex.
Every code-context response states the indexed commit, indexing time, included file sample, coverage, and freshness warnings. When current local edits matter, use snipara-companion code callers/imports/neighbors/shortest-path/impact; it auto-selects hosted MCP or the local overlay and reports sourceSelection. Agents should still use local reads, rg, git status --short, and tests for exact working-tree truth.
| Tool | When an agent should use it | Plan |
|---|---|---|
| snipara_code_callers / imports / neighbors / shortest_path | Explore canonical structural relationships before deciding which files or symbols matter. | Free and paid |
| snipara_code_symbol_card | Load a compact briefing for one symbol: layer, role, risk hints, tests, docs, routes, config, and MCP-related context. | Pro, Team, Enterprise |
| snipara_code_impact | Hosted impact tool. Pass changed_files and a diff_summary to get risk scoring, recommended actions, evidence counts, and coverage gaps for committed or canonical graph context. | Pro, Team, Enterprise |
Free projects still receive tool metadata and can use the basic structural graph tools. Symbol cards and impact plans return upgrade metadata instead of full output because they run heavier repository graph traversal and planning logic.
On the Snipara repository after the May 2026 infrastructure upgrade, hostedsnipara_code_impact completed a 3-concurrent batch at roughly 3.30s p95. An 8-concurrent overload returned retryable busy guards instead of database capacity errors. Treat this as a hosted-tool capacity signal, not a direct claim about developer productivity.
Copy-ready templates
These snippets keep agent behavior consistent across the main AI development clients. Public copies are also available under /templates/ai-agents/ for direct linking.
Codex: AGENTS.md
Codex reads AGENTS.md before work starts. Put this at the repository root or merge it into an existing project instruction file.
# AGENTS.md
## Snipara Context Workflow
This project uses Snipara Hosted MCP for project context and reviewed memory.
- Endpoint: https://api.snipara.com/mcp/YOUR_PROJECT_SLUG
- Auth: use `SNIPARA_API_KEY` from the environment. Never commit keys.
- For Codex, expose the endpoint as a streamable HTTP MCP server and load the
key from `SNIPARA_API_KEY`.
- At the start of every new thread, validate hosted MCP with a tool-oriented
call such as `snipara_settings`, `tools/list`, or a lightweight
`snipara_context_query`. Do not treat empty MCP resources/templates as an
outage because Snipara may be tool-only.
- If a session appears to expose only a subset of expected Snipara tools, call
`snipara_help(list_all=true)` and compare exact tool names before concluding
that a tool is unavailable. Do not infer absence from one broad discovery
pass or a ranked tool-search result.
Agent task lifecycle:
1. Start every new thread by validating hosted MCP availability, then use
project-scoped `snipara_recall` and a targeted `snipara_context_query` before
falling back to local documentation search.
2. Use `snipara_context_query` for docs, project truth, architecture notes, runbooks, and narrative source material.
3. When `snipara_context_query` returns `answer_pack`, treat it as the first-pass response plan: use its source facts, caveats, source map, and verification checklist before drafting claims.
4. Use `snipara_get_chunk` to load cited source sections returned by reference-based queries before relying on precise wording.
5. For coding tasks, choose a workflow mode before editing: LITE for small
single-phase changes, FULL managed workflow for multi-file, risky,
release/deploy, architectural, compaction-prone, or future-maintainer-sensitive
work.
6. Use whichever structural code graph tools are exposed in the current session
for callers, imports, neighbors, and path questions. Tool exposure can vary.
7. On paid Context plans, use `snipara_code_symbol_card` for agent-ready symbol
context. For impact, use `snipara-companion code impact` first when
companion is installed; it selects the local overlay for dirty/ahead worktrees
and hosted MCP for clean indexed code. Use hosted `snipara_code_impact` only
when companion is unavailable or after push/reindex for canonical graph impact.
8. Use `snipara_plan` for complex work in any plan when exposed; reserve
`snipara_decompose` for FULL-mode work when the hosted server exposes it.
9. When the LLM has produced a visible multi-phase plan and `snipara-companion`
is installed, keep the machine plan in JSON and run
`snipara-companion workflow start --goal "<goal>" --plan-file <plan_json_file>`.
Use `workflow phase-start` / `workflow phase-commit` per phase, and after
compaction run `workflow resume` then `workflow phase-start` before editing
again.
10. Use local file reads, `rg`, git commands, and test commands for exact edits,
current working-tree state, and verification.
11. Treat every `snipara_code_*` response as indexed context: check indexed
commit SHA, indexing time, included file sample, coverage, freshness warnings,
and sync guidance before relying on it. If `git status --short` is dirty,
warn that the indexed graph may not include local edits.
12. If `snipara-companion` is installed and local commits or a dirty worktree
matter, use `snipara-companion code callers/imports/neighbors/shortest-path/impact`.
It auto-selects hosted MCP or the local overlay and reports `sourceSelection`.
Treat local overlays as non-canonical; they do not change hosted
`snipara_code_*` answers until pushed code is reindexed.
13. Use Snipara Sandbox only when sandboxed execution, repeatable validation, or
isolated transformations materially help.
14. If a broad query is slow, retry once with a narrow keyword query before
falling back to local search.
15. When generated hooks are enabled, `snipara-companion pre-tool`, `post-tool`,
and `stuck-guard status` provide runtime Rescue Pack checks for repeated
failures, empty searches, and risky workflows.
16. End each substantial phase with `snipara_end_of_task_commit` or
`snipara-companion workflow phase-commit` when companion manages the plan.
End the whole managed workflow with `snipara-companion final-commit`.
17. Use `snipara_remember_if_novel` for one reusable memory while avoiding
duplicates, and use `snipara_remember` for explicit direct memory writes.
18. When remembered knowledge is obsolete or replaced, use
`snipara-companion memory invalidate <memory-id>` or
`snipara-companion memory supersede <old-memory-id> <new-memory-id>`
when companion is installed; otherwise use hosted `snipara_memory_invalidate`
or `snipara_memory_supersede`.
19. Do not store secrets, tokens, passwords, private keys, raw logs, transient
command output, or unreviewed guesses in memory.
Claude Code: CLAUDE.md
Claude Code can use CLAUDE.md as a compatibility layer while keepingAGENTS.md as the canonical cross-agent instruction file.
# CLAUDE.md
Canonical project context is in AGENTS.md. This file exists for Claude Code compatibility.
## Snipara
Use Snipara Hosted MCP before answering project-specific questions.
- Endpoint: https://api.snipara.com/mcp/YOUR_PROJECT_SLUG
- Start substantial work with snipara_recall and a targeted snipara_context_query.
- Use snipara_context_query for source truth and snipara_get_chunk for exact cited sections.
- When snipara_context_query returns answer_pack, use its facts, caveats, source map, and verification checklist before drafting claims.
- Use snipara_code_callers, snipara_code_imports, snipara_code_neighbors, or snipara_code_shortest_path for canonical structural code questions.
- On paid Context plans, use snipara_code_symbol_card before editing important symbols. For impact, use snipara-companion code impact first when companion is installed; it selects the local overlay for dirty/ahead worktrees and hosted MCP for clean indexed code. Use hosted snipara_code_impact only when companion is unavailable or after push/reindex for canonical graph impact.
- Check every snipara_code_* response for indexed commit SHA, indexing time, included files, coverage, and freshness warnings.
- Companion code commands report sourceSelection on every response. Hosted snipara_code_* answers remain canonical until pushed code is reindexed.
- Use local file reads, rg, git status --short, and tests for exact edits/current working tree; use Snipara for architecture and indexed code graph context.
- When the plan is visible and snipara-companion is installed, keep the machine plan in JSON, use snipara-companion workflow start, phase-start, and phase-commit per phase, and after workflow resume rerun workflow phase-start before editing again.
- Use Snipara Sandbox only when sandboxed execution or repeatable validation materially helps.
- For runtime-bound phases, capture compact rehydratable state with workflow runtime-checkpoint <phase_id> --summary "<state>" --rehydrate-file <state.json>. Then workflow resume restores workflow and memory continuity plus the recorded Sandbox binding and prints a reattach or rehydrate plan. It does not snapshot or exactly restore a live Snipara Sandbox or REPL process.
- End substantial work with snipara_end_of_task_commit when available; for managed workflows, end every phase with snipara-companion workflow phase-commit and the task with snipara-companion final-commit.
- Use snipara_remember_if_novel or snipara_remember only for narrow durable memories.
- When remembered knowledge is obsolete or replaced and snipara-companion is installed, use snipara-companion memory invalidate <memory-id> or snipara-companion memory supersede <old-memory-id> <new-memory-id>; otherwise use hosted snipara_memory_invalidate or snipara_memory_supersede.
- Do not store secrets, one-off command output, raw logs, or unreviewed guesses in memory.
- Use the Snipara Claude Code plugin only when slash commands, skills, or hooks are helpful; Hosted MCP remains the normal agent path.
Cursor: project rule
Cursor project rules live in .cursor/rules. Use an always-applied rule when every agent chat should know that Snipara is the source for context and reviewed memory.
---
description: Use Snipara Hosted MCP for project context and reviewed memory.
alwaysApply: true
---
# Snipara Agent Workflow
This workspace uses Snipara Hosted MCP for current project context and reviewed memory.
- Check the configured Snipara MCP server before answering project-specific questions.
- Use `snipara_recall` for durable decisions, preferences, and validated learnings.
- Use `snipara_context_query` for docs, current project truth, and narrative source material.
- When `snipara_context_query` returns `answer_pack`, use its facts, caveats, source map, and verification checklist before drafting claims.
- Use `snipara_get_chunk` before relying on exact cited wording from reference-based results.
- Use `snipara_code_callers`, `snipara_code_imports`, `snipara_code_neighbors`, or `snipara_code_shortest_path` for canonical structural code questions.
- On paid Context plans, use `snipara_code_symbol_card` before editing important symbols. For impact, use `snipara-companion code impact` first when companion is installed; it selects the local overlay for dirty/ahead worktrees and hosted MCP for clean indexed code. Use hosted `snipara_code_impact` only when companion is unavailable or after push/reindex for canonical graph impact.
- Check every `snipara_code_*` response for indexed commit SHA, indexing time, included files, coverage, and freshness warnings.
- Companion code commands report `sourceSelection` on every response. Hosted `snipara_code_*` answers remain canonical until pushed code is reindexed.
- Use `snipara_plan` for complex work when available; use `snipara_decompose` when deeper decomposition is needed and the hosted server exposes it.
- Use local file reads, `rg`, `git status --short`, and tests for exact code edits and current working-tree state.
- When `snipara-companion` is installed and the LLM has a visible multi-phase plan, keep the machine plan in JSON, use `snipara-companion workflow start`, `phase-start`, and `phase-commit` per phase, and after `workflow resume` rerun `workflow phase-start` before editing again.
- Use Snipara Sandbox only when sandboxed execution or repeatable validation materially helps.
- For runtime-bound phases, capture compact rehydratable state with `workflow runtime-checkpoint <phase_id> --summary "<state>" --rehydrate-file <state.json>`. Then `workflow resume` restores workflow and memory continuity plus the recorded Sandbox binding and prints a reattach or rehydrate plan. It does not snapshot or exactly restore a live Snipara Sandbox or REPL process.
- End substantial work with `snipara_end_of_task_commit` when available; for managed workflows, end every phase with `snipara-companion workflow phase-commit` and the task with `snipara-companion final-commit`. Use `snipara_remember_if_novel` or `snipara_remember` only for narrow durable memories. When remembered knowledge is obsolete or replaced, use `snipara-companion memory invalidate <memory-id>` or `snipara-companion memory supersede <old-memory-id> <new-memory-id>` when companion is installed; otherwise use hosted `snipara_memory_invalidate` or `snipara_memory_supersede`. Never store secrets.
ChatGPT and OpenAI MCP
Use the Hosted MCP endpoint directly when the client supports HTTP MCP. For Codex config, use bearer auth from an environment variable. For clients that accept custom headers, useX-API-Key.
[mcp_servers.snipara]
type = "streamable_http"
url = "https://api.snipara.com/mcp/YOUR_PROJECT_SLUG"
bearer_token_env_var = "SNIPARA_API_KEY"
{
"name": "snipara",
"url": "https://api.snipara.com/mcp/YOUR_PROJECT_SLUG",
"headers": {
"X-API-Key": "YOUR_SNIPARA_PROJECT_API_KEY"
}
}Mistral: Le Chat, Vibe, and LangChain
Use Snipara as a Hosted MCP server for Mistral Le Chat Custom MCP Connectors and Mistral Vibe. For LangChain JavaScript, bind snipara_context_query, snipara_recall, and snipara_settings to ChatMistralAI with bindTools. Mistral request hooks such as beforeRequestHooks, requestErrorHooks, and responseHooks wrap model HTTP requests; they are not local agent lifecycle hooks.
Generate automatically
Run npx create-snipara in a project to generate Hosted MCP config, local Snipara helper files, agent instruction templates, client-specific MCP references, a Cursor rule, a Codex config snippet, and Mistral Le Chat/Vibe/LangChain references. The CLI avoids overwriting existing instruction files and stores mergeable copies under .snipara/templates when a file already exists.
npx create-sniparanpx create-snipara doctorMCP and app metadata
Snipara tool metadata should be precise enough for model discovery. Tool descriptions should say when to use snipara_context_query, snipara_recall, and code graph tools, and read-only tools should expose MCP annotations so clients can rank and approve calls correctly.
Describe Snipara as context and reviewed memory infrastructure for AI agents, not as an LLM provider. State that customers keep Claude, Cursor, ChatGPT, Codex, or any MCP-compatible client.
Monitoring
Public AI discovery only improves if you measure it. Track crawler and referral behavior separately from product usage.
- Confirm /llms.txt, /llms-full.txt, /robots.txt, and /sitemap.xml return 200 in production.
- Watch server logs for OAI-SearchBot, ChatGPT-User, GPTBot, ClaudeBot, Claude-User, and Claude-SearchBot.
- Review referrals and direct traffic to /docs/integration/ai-agents, /docs/integration/openai, /docs/integration/claude-code, and /docs/integration/cursor.
- Replay prompts monthly: What is Snipara?, How do I use Snipara with Cursor?, and Does Snipara replace Claude or ChatGPT?
- Update tool descriptions and public docs when recurring wrong-tool calls or stale answers appear.