npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

treeseek

v0.3.4

Published

MCP server for semantic code search using local LanceDB and Ollama

Readme

treeseek

MCP server for semantic code search. Indexes a codebase using AST-aware chunking, generates embeddings via Ollama, and stores them in a local LanceDB vector database — 100% offline, no APIs or external services required.

Documentation

https://treeseek.sorianox2013.workers.dev/

Prerequisites

  1. Node.js 20 or 22 (do NOT use Node 24 — incompatible with the core)
  2. Ollama running locally: https://ollama.com
    ollama serve
  3. Embedding model pulled:
    ollama pull nomic-embed-text

Environment Variables

| Variable | Default | Description | |---|---|---| | OLLAMA_HOST | http://localhost:11434 | Ollama API endpoint | | EMBED_MODEL | nomic-embed-text | Ollama embedding model name | | LANCEDB_PATH | ~/.codebase-indexer | Base directory for LanceDB storage |

MCP Tools

index_codebase

Indexes a codebase directory.

{ "path": "/absolute/path/to/project" }

Returns: { indexed_files, total_chunks, status, duration_ms }

search_code

Semantic search across an indexed codebase.

{ "query": "database connection handler", "path": "/absolute/path/to/project", "top_k": 10 }

Returns: array of { file, start_line, end_line, content, language, score }

get_indexing_status

Check if a codebase has been indexed.

{ "path": "/absolute/path/to/project" }

Returns: { indexed, collection_name, total_chunks }

clear_index

Remove the index for a codebase.

{ "path": "/absolute/path/to/project" }

Returns: { success, message }

Setup

Claude Code

claude mcp add treeseek \
  -e OLLAMA_HOST=http://localhost:11434 \
  -e EMBED_MODEL=nomic-embed-text \
  -- npx treeseek

Or add manually to ~/.claude.json under mcpServers:

{
  "mcpServers": {
    "treeseek": {
      "type": "stdio",
      "command": "npx",
      "args": ["treeseek"],
      "env": {
        "OLLAMA_HOST": "http://localhost:11434",
        "EMBED_MODEL": "nomic-embed-text"
      }
    }
  }
}

OpenCode

Via CLI (interactive):

opencode mcp add

Preencha os campos quando solicitado:

  • type: local
  • name: treeseek
  • command: npx treeseek
  • environment: OLLAMA_HOST=http://localhost:11434, EMBED_MODEL=nomic-embed-text

Ou adicione manualmente ao ~/.config/opencode/opencode.json (global) ou opencode.json na raiz do projeto:

{
  "mcp": {
    "treeseek": {
      "type": "local",
      "command": ["npx", "treeseek"],
      "enabled": true,
      "environment": {
        "OLLAMA_HOST": "http://localhost:11434",
        "EMBED_MODEL": "nomic-embed-text"
      }
    }
  }
}

Nota: O OpenCode usa environment (não env) e command deve ser um array. Variáveis no campo env são silenciosamente ignoradas.

Para listar os MCPs configurados:

opencode mcp list

Cursor

Add to your .cursor/mcp.json:

{
  "mcpServers": {
    "treeseek": {
      "command": "npx",
      "args": ["treeseek"],
      "env": {
        "OLLAMA_HOST": "http://localhost:11434",
        "EMBED_MODEL": "nomic-embed-text"
      }
    }
  }
}

VS Code (Copilot)

Add to your .vscode/mcp.json:

{
  "servers": {
    "treeseek": {
      "type": "stdio",
      "command": "npx",
      "args": ["treeseek"],
      "env": {
        "OLLAMA_HOST": "http://localhost:11434",
        "EMBED_MODEL": "nomic-embed-text"
      }
    }
  }
}

Windsurf

Add to your MCP settings:

{
  "mcpServers": {
    "treeseek": {
      "command": "npx",
      "args": ["treeseek"],
      "env": {
        "OLLAMA_HOST": "http://localhost:11434",
        "EMBED_MODEL": "nomic-embed-text"
      }
    }
  }
}

Supported Languages

TypeScript, JavaScript, Python, Java, Go, Rust, C, C++, C#, Ruby, PHP, Swift, Kotlin, Scala, and more (via tree-sitter AST chunking).