@sniper.ai/mcp-knowledge
v3.0.1
Published
SNIPER MCP server for domain knowledge indexing and retrieval
Downloads
209
Readme
@sniper.ai/mcp-knowledge
MCP server for domain knowledge indexing and retrieval in SNIPER-enabled projects. Indexes Markdown knowledge files from .sniper/knowledge/ and exposes them to Claude Code agents via search, list, and get tools.
Installation
npm install @sniper.ai/mcp-knowledgeUsage
Add the server to your Claude Code MCP configuration:
{
"mcpServers": {
"sniper-knowledge": {
"command": "npx",
"args": ["sniper-mcp-knowledge"]
}
}
}Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| SNIPER_KNOWLEDGE_DIR | .sniper/knowledge | Path to the knowledge files directory (must be within the project) |
MCP Tools
The server exposes three tools to Claude Code agents:
knowledge_search
Search the knowledge base using a text query. Returns matching entries ranked by relevance.
| Parameter | Required | Description |
|-----------|----------|-------------|
| query | Yes | Search query |
| max_results | No | Maximum number of results (default: 10) |
| max_tokens | No | Maximum total tokens in results (default: 4000) |
knowledge_list
List all knowledge entries, optionally filtered by topic.
| Parameter | Required | Description |
|-----------|----------|-------------|
| topic | No | Filter entries by topic |
knowledge_get
Get a specific knowledge entry by its ID.
| Parameter | Required | Description |
|-----------|----------|-------------|
| id | Yes | Entry ID |
MCP Resources
| URI | Description |
|-----|-------------|
| sniper-knowledge://topics | List all topics in the knowledge base |
| sniper-knowledge://entry/{id} | Get a specific knowledge entry |
How It Works
- On first query, the server indexes all Markdown files in the knowledge directory
- The index is cached to
knowledge-index.jsonin the knowledge directory - When source files change, the index is automatically rebuilt
- Agents can search, list, and retrieve domain knowledge entries at runtime
Development
# From the monorepo root
pnpm build # Build
pnpm dev # Watch modeDocumentation
Full documentation is available at sniperai.dev.
License
MIT
