Skip to main content
Glama

veyra-snippets

AIエージェント向けの永続的なコードスニペット管理MCPツールです。言語フィルタリング、タグ検索、コードの全文検索機能を備えています。読み取りは常に無料です。書き込み操作にはVeyraのコミットモード認証が必要です。

概要

veyra-snippetsは、SQLiteをバックエンドとした信頼性の高いコードライブラリをAIエージェントに提供します。エージェントは自由にスニペットを閲覧・検索できます。スニペットの保存、更新、削除はVeyraコミットモードによって保護されており、意図的で説明責任のある書き込みを保証します。

インストール

npm install
npm run build

スニペットは~/.veyra-snippets/data.dbに保存され、初回実行時に自動的に作成されます。

MCP設定 (Claude Desktop)

claude_desktop_config.jsonに以下を追加してください:

{
  "mcpServers": {
    "veyra-snippets": {
      "command": "node",
      "args": ["/absolute/path/to/veyra-snippets/dist/index.js"]
    }
  }
}

ツール

ツール

入力

クラス

価格

list_snippets

{ language?, tag? }

無料

get_snippet

{ id }

無料

search_snippets

{ query }

無料

save_snippet

{ title, code, language, tags?, veyra_token? }

A

€0.005

update_snippet

{ id, code?, title?, veyra_token? }

A

€0.005

delete_snippet

{ id, veyra_token? }

B

€0.02

読み取り (トークン不要)

// List all snippets
{ "tool": "list_snippets", "arguments": {} }

// List TypeScript snippets
{ "tool": "list_snippets", "arguments": { "language": "typescript" } }

// List snippets by tag
{ "tool": "list_snippets", "arguments": { "tag": "auth" } }

// Get a specific snippet
{ "tool": "get_snippet", "arguments": { "id": "1712345678-abc1234" } }

// Search across title, code, language, and tags
{ "tool": "search_snippets", "arguments": { "query": "debounce" } }

書き込み (Veyraトークンが必要)

// Save a new snippet
{
  "tool": "save_snippet",
  "arguments": {
    "title": "Debounce utility",
    "code": "function debounce(fn, ms) {\n  let timer;\n  return (...args) => {\n    clearTimeout(timer);\n    timer = setTimeout(() => fn(...args), ms);\n  };\n}",
    "language": "javascript",
    "tags": "utility,performance",
    "veyra_token": "vt_..."
  }
}

// Update snippet code
{
  "tool": "update_snippet",
  "arguments": {
    "id": "1712345678-abc1234",
    "code": "// updated code here",
    "veyra_token": "vt_..."
  }
}

// Delete a snippet
{
  "tool": "delete_snippet",
  "arguments": {
    "id": "1712345678-abc1234",
    "veyra_token": "vt_..."
  }
}

トークンがない場合のエラーレスポンス

{
  "error": "VeyraCommitRequired",
  "message": "Write operations require Veyra commit mode.",
  "currentMode": "open",
  "requiredMode": "commit",
  "transitionStrategy": "authorize_then_retry_with_x_veyra_token",
  "provider": "veyra",
  "authorize_endpoint": "https://api.veyra.to/v1/authorize-action",
  "docs_url": "https://veyra.to"
}

Veyraの仕組み

Veyraは、AIエージェントのためのコミットモード認証レイヤーです。エージェントが書き込み操作を試みると:

  1. エージェントがveyra_tokenなしでツールを呼び出し、authorize_endpointを含むVeyraCommitRequiredエラーを受け取ります。

  2. エージェント(またはユーザー)が認証エンドポイントを呼び出し、トークンを取得します。

  3. エージェントがveyra_tokenを設定してツール呼び出しを再試行します。

  4. veyra-snippetsが書き込みを実行する前に、@veyrahq/sdk-nodeを介してトークンを検証します。

詳細なドキュメントについてはveyra.toを参照してください。

ライセンス

MIT

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Aquariosan/veyra-snippets'

If you have feedback or need assistance with the MCP directory API, please join our Discord server