veyra-snippets
veyra-snippets
一个为 AI 智能体设计的持久化代码片段管理器 MCP 工具,支持语言过滤、标签搜索和全文代码搜索。读取操作始终免费。写入操作需要 Veyra 提交模式授权。
概述
veyra-snippets 为 AI 智能体提供了一个基于 SQLite 的可靠代码库。智能体可以自由浏览和搜索代码片段。保存、更新和删除代码片段受到 Veyra 提交模式的保护,确保写入操作是有意且可追溯的。
Related MCP server: Snippets MCP
安装
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"]
}
}
}工具
工具 | 输入 | 分类 | 价格 |
|
| — | 免费 |
|
| — | 免费 |
|
| — | 免费 |
|
| A | €0.005 |
|
| A | €0.005 |
|
| 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 智能体的提交模式授权层。当智能体尝试执行写入操作时:
智能体在不带
veyra_token的情况下调用工具,并收到带有authorize_endpoint的VeyraCommitRequired错误。智能体(或代表它的用户)调用授权端点以获取令牌。
智能体使用设置好的
veyra_token重试工具调用。veyra-snippets在执行写入前通过@veyrahq/sdk-node验证令牌。
完整文档请参阅 veyra.to。
许可证
MIT
托管包(推荐)
建议使用托管包以实现单 URL 集成:
{
"mcpServers": {
"veyra": {
"url": "https://mcp.veyra.to/sse"
}
}
}一个 URL。48 个工具。24 个免费读取。24 个受保护的写入。
包清单: https://mcp.veyra.to/.well-known/veyra-pack.json
当你希望在所有 Veyra 工具系列中获得最快的 MCP 集成路径时,请使用托管包。 当你专门需要单独使用此工具时,请使用此独立包。
Veyra 生态系统的一部分
Veyra 是生产级 AI 智能体操作的提交模式。 所有工具:读取免费,写入需要 Veyra 提交模式。
工具 | 描述 | 安装 |
键值存储 |
| |
带标签的笔记记录 |
| |
任务管理 |
| |
书签管理器 |
| |
联系人管理 |
| |
表单构建器 |
| |
Webhook 发送器 |
|
SDK: npm install @veyrahq/sdk-node 网站: veyra.to
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Shared memory for AI coding agents. Save once, reuse from Cursor, Claude Code, Codex.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseAqualityFmaintenanceProvides code repository indexing and semantic search capabilities, allowing natural language queries to find relevant code snippets with automatic incremental indexing and multi-language support.15 npm359ISC
- AlicenseNot gradedqualityCmaintenanceEnables storing, searching, and managing code snippets using hybrid semantic search and keyword matching with automatic language detection and tag-based organization.4 npm2MIT
- AlicenseNot gradedqualityDmaintenanceProvides intelligent code context management and semantic search capabilities for software development, enabling natural language queries to find relevant code snippets, functions, and classes across Python, JavaScript, TypeScript, and SQL codebases.MIT
- AlicenseNot gradedqualityBmaintenanceIndexes codebases and lets AI agents retrieve precise code snippets (functions, classes, routes) instead of reading entire files, reducing token usage and improving accuracy.169 npm7MIT