codespelunker (cs) 标志

codespelunker (cs)

社区热门
boyter

codespelunker - CLI code search tool that understands code structure and ranks results by relevance. No indexing required with CLI, TUI, MCP and HTTP support.

发布者boyter
代码仓库cs
语言Go
复刻数
24
星标数
1.1K
可用工具
0
传输类型stdio
分类
许可协议MIT
链接
  • 将工具接入 AI 工作流

    codespelunker (cs) 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 1.1K 个 Star 和 24 个 Fork。

codespelunker (cs)

cs powers searchcode.com — structured code intelligence over any repo, built for AI agents.

CLI code search tool that understands code structure and ranks results by relevance. No indexing required

Ever searched for authenticate and gotten 200 results from config files, comments, and test stubs before finding the actual implementation? cs fixes that.

It combines the speed of CLI tools with the relevance ranking usually reserved for heavy indexed search engines like Sourcegraph or Zoekt, but without needing to maintain an index.

shell
cs "authenticate" --gravity=brain           # Find the complex implementation, not the interface
cs "FIXME OR TODO OR HACK" --only-comments  # Search only in comments, not code or strings
cs "error" --only-strings                   # Find where error messages are defined
cs "handleRequest" --only-declarations      # Jump straight to where it's defined
cs "handleRequest" --only-usages            # Find every call site, skip the definition
cs "error" --dedup                          # Collapse duplicated matches into one result

Licensed under MIT.

Go Report Card Coverage Status Cs Count Badge

cs TUI demo

https://github.com/user-attachments/assets/3b7f4bb2-d542-406d-9c53-29c0430dd60a

Pitch: Why use cs?

Most search tools treat code as plain text. cs doesn't.

It parses every file on the fly to understand what is a comment, what is a string, and what is code then uses that structure to rank by relevance, not just list them by occurrence.

shell
cs "authenticate"                    # BM25-ranked variant results, best match first
cs "authenticate" --gravity=brain    # Boost complex implementations over interfaces
cs "TODO" --only-comments            # Only matches inside comments
cs "error" --only-strings            # Only matches inside string literals
cs "config OR setup" lang:go         # Boolean queries with language filters
cs "handleRequest" --only-declarations  # Jump to definitions (func, class, def, etc.)
cs "config" --dedup                     # Collapse byte-identical matches

It comes with a TUI and HTTP mode for Interactive Exploration.

shell
cs      # enter TUI mode from this location
cs -d   # enter HTTP mode on port 8080 by default

What makes it different from ripgrep or grep?

ripgrep is a fast text matcher. It finds lines and prints them. It's the best at what it does.

cs is a search engine. It finds files, ranks by relevance, extracts the best snippet, and shows the most relevant results. Think Sourcegraph-quality ranked search as a CLI tool, no index required.

They solve different problems. You'll probably want both.

Key capabilities

  • Structural Awareness: A match in code ranks higher than the same word in a comment (1.0 vs 0.2) - and it's configurable. Or filter strictly: --only-code, --only-comments, --only-strings.
  • Complexity Gravity: Uses cyclomatic complexity as a ranking signal. Searching for Authenticate? The complex implementation file ranks above the interface definition. (--gravity=brain)
  • Smart Ranking: BM25 relevance scoring, file-location boosting, noise penalty for data blobs, and automatic test-file dampening - all on the fly with no pre-built index.
  • Multiple interfaces: Console output, a built-in TUI, an HTTP server with syntax highlighting, or an MCP server for LLM tooling.

Key Features

Structural Filtering

Stop grepping through false positives.

shell
cs "database" --only-code        # Ignore matches in comments/docs
cs "FIXME" --only-comments       # Ignore matches in code/strings
cs "error" --only-strings        # Find where error messages are defined
cs "handleRequest" --only-declarations  # Jump to where it's defined (func, class, def, etc.)
cs "handleRequest" --only-usages        # Every call site, skipping the definition

These are mutually exclusive with --only-code, --only-comments, and --only-strings.

The structural ranker also uses declaration detection to boost matches that appear on declaration lines (e.g. func, class, def) over plain usages. This currently works for the following languages:

Go, Python, JavaScript, TypeScript, TSX, Rust, Java, C, C++, C#, Ruby, PHP, Kotlin, Swift, Shell, Lua, Scala, Elixir, Haskell, Perl, Zig, Dart, Julia, Clojure, Erlang, Groovy, OCaml, MATLAB, Powershell, Nim, Crystal, V

For unsupported languages, all matches are treated as usages and ranked by text relevance only. Structural filtering (--only-code, --only-comments, --only-strings) still works for any language recognised by scc.

Complexity Gravity

Find where the work happens.

shell
cs "login" --gravity=brain       # Boosts complex files (the implementation)
cs "login" --gravity=low         # Boosts simple files (configs/interfaces)

Ranking Profiles

Preset ranking strategies that tune multiple parameters at once.

shell
cs "authenticate" --profile=precise   # Short, focused source files
cs "authenticate" --profile=broad     # Cast a wide net, include tests
cs "authenticate"                     # Balanced (default, same as always)
ProfileBest forWhat it does
balancedGeneral use (default)Standard BM25 tuning, moderate complexity boost, test files dampened
precise"Find the one file that matters"Saturates quickly on term frequency, penalises long files, aggressively filters noise and test files
broad"Show me everything relevant"Rewards repeated matches, boosts long files slightly, includes test files at full weight

When --profile is set it overrides --gravity, --noise, and --test-penalty.

Git Sync

Keep your search targets up to date automatically. When running in a long-lived mode (TUI, HTTP, or MCP), --git-sync periodically runs git pull on repositories found in the search directory.

shell
# Single repo — pulls the repo at /path/to/repo on a schedule
cs -d --git-sync --dir /path/to/repo

# Directory of repos — pulls every repo under /path/to/projects
cs -d --git-sync --dir /path/to/projects

# Custom interval and concurrency
cs -d --git-sync --git-sync-interval 2m --git-sync-workers 4 --dir /path/to/projects

# TUI mode
cs --git-sync --dir /path/to/projects

# MCP mode
cs --mcp --git-sync --dir /path/to/codebase

Discovery rules:

  • If the directory itself contains .git, that single repo is synced.
  • Otherwise, immediate child directories containing .git are synced (one level deep only).
FlagDefaultDescription
--git-syncoffEnable periodic git pull
--git-sync-interval5mTime between pulls (e.g. 30s, 2m, 1h)
--git-sync-workers1Number of concurrent git pull workers

Sync runs immediately on startup, then repeats at the configured interval. Errors are logged to stderr but do not stop the process. Each pull has a 2-minute timeout and runs non-interactively (will not prompt for credentials). Ignored in console mode since it exits immediately.

In MCP mode, only the --dir directory is discovered and synced. An agent that searches somewhere else via the search tool's path parameter gets that directory exactly as it is on disk, and the response carries a git_sync_note saying so. Use --mcp-lock-dir if you want searches confined to the synced tree.

Similar to Sourcegraph: Clone your team's repos into a single directory, point cs at it with --git-sync, and you have a self-updating, relevance-ranked code search across all of them — no indexing server, no infrastructure, no configuration beyond a single command:

shell
mkdir -p ~/code-search && cd ~/code-search
git clone https://github.com/your-org/repo-a.git
git clone https://github.com/your-org/repo-b.git
git clone https://github.com/your-org/repo-c.git

# Start HTTP search across all repos, auto-updating every 5 minutes
cs -d --git-sync --dir ~/code-search

This gives you ranked, structural code search across your entire codebase — similar to what Sourcegraph or Hound provide — with zero setup beyond cloning the repos.

Deduplication

Collapse byte-identical matches into a single result.

shell
cs "Copyright" --dedup                  # One result per unique copyright notice
cs "error" --dedup                      # Skip vendored/copied duplicates

Smart Ranking Results are sorted by BM25 (relevance), dampened by file length, and boosted by code structure. Some effort to dampen test files (when you are not looking for them) is taken into account as well.

Non-Smart Ranking You can switch the ranking algorithm to pure BM25, TFIDF, or simple most match ranking on the fly.

Install

If you want to create a package to install, please make it. Let me know, and I will ensure I add it here.

Go Get

If you have Go >= 1.25.2 installed

go install github.com/boyter/cs/v3@latest

Nixos

nix-shell -p codespelunker

https://github.com/NixOS/nixpkgs/pull/236073

Manual

Binaries for Windows, GNU/Linux, and macOS are available from the releases page.

FAQ

Is this as fast as

No.

You didn't let me finish, I was going to ask if it's as fast as

The answer is probably no. It's not directly comparable. No other tool I know of works like this outside of full indexing tools such as hound, searchcode, sourcegraph etc... None work on the fly like this does.

As far as I know what cs does is unique for a command line tool.

cs runs a full lexical analysis and complexity calculation from scc on every matching file. This is expensive compared to the raw byte-scanning of ripgrep, but probably not as slow as you may think.

On a modern machine (such as Apple Silicon M1), it can search and rank the entire Linux kernel source in ~3 seconds. Using a 9950x3D it can search the kernel in ~400 milliseconds.

Does it work on normal documents?

So long as they are text. I wrote it to search code, but it works just as well on full-text documents. The snippet extraction, for example, was tested on Pride and Prejudice, a text I know more about than I probably should considering I'm male.

Where is the index?

There is none. Everything is brute force calculated on the fly. There is some caching to speed things up, but should in practice never affect the results.

How does the ranking work?

cs uses a weighted BM25 algorithm.

Standard BM25 weights matches based on "fields" (so title, body, category). cs generates fields dynamically by parsing the code syntax.

  • A match in code gets full weight (1.0).
  • A match in a string gets partial weight (0.5).
  • A match in a comment gets lower weight (0.2).

This means a file where your search term appears in the logic will rank higher than a file where the term only appears in the documentation, even if the word count is the same.

You can tweak the values as needed via the CLI, or on the fly change what fields cs searches.

What is complexity gravity?

Complexity gravity is a ranking boost that uses each file's cyclomatic complexity to influence result ordering.

In code search, the best result is usually where the logic is implemented. These files usually have higher algorithmic density (branches, loops, conditions). cs uses this so implementation files generally outrank data/config/interface files all things being equal.

The --gravity flag accepts named intent:

IntentStrengthPurpose
brain2.5Aggressively surface complex core logic
logic1.5Standard boost toward complex code
default1.0Balanced (applied when flag not set)
low0.2Flatten gravity, find simple boilerplate
off0.0Pure text relevance, no complexity boost
shell
cs --gravity=brain "search term"   # find complex implementations
cs --gravity=off "search term"     # pure text relevance

How do you get the snippets?

It's not fun... see https://github.com/boyter/cs/blob/master/pkg/snippet/snippet.go and https://github.com/boyter/cs/blob/master/pkg/snippet/snippet_lines.go

It works by passing the document content to extract the snippet from and all the match locations for each term. It then looks through each location for each word, and checks on either side looking for terms close to it. It then ranks on the term frequency for the term we are checking around and rewards rarer terms. It also rewards more matches, closer matches, exact case matches, and matches that are whole words.

For more info read the "Snippet Extraction AKA I am PHP developer" section of this blog post https://boyter.org/posts/abusing-aws-to-make-a-search-engine/

What does HTTP mode look like?

It's a little brutalist.

You can change its look and feel using --template-style for built-in themes (dark, light, bare), or provide custom templates with --template-display and --template-search. See https://github.com/boyter/cs/tree/master/asset/templates for example templates you can use to modify the look and feel.

shell
cs -d --template-style light
cs -d --template-display ./asset/templates/display.tmpl --template-search ./asset/templates/search.tmpl

Default operator

Adjacent terms with no explicit AND/OR between them are combined with the default operator, set by --default-operator:

  • and (default) requires all terms, so foo bar matches files containing both.
  • or matches any term, so foo bar matches files containing either.

or is handy for tools and agents that issue broad multi-keyword queries, where the default AND is often too restrictive and returns zero results.

shell
cs --default-operator=or foo bar baz

Even with or, metadata filters (path:, ext:, file:, lang:, complexity:, …) still constrain the whole query rather than being OR'd with individual terms. For example foo bar path:pkg is treated as (foo OR bar) AND path:pkg, so the filter applies no matter where it appears in the query. An explicit foo OR path:pkg is left as written.

A filter inside parentheses is scoped to that group: (foo path:pkg) bar means (foo AND path:pkg) OR bar, so path:pkg constrains only foo while bar matches anywhere. A filter outside any group still applies to the whole query.

Usage

Command line usage of cs is designed to be as simple as possible. Full details can be found in cs --help or cs -h. Note that the below reflects the state of master not a release, as such features listed below may be missing from your installation.

$ cs -h
code spelunker (cs) code search.
Version 3.1.0
Ben Boyter <ben@boyter.org>

cs recursively searches the current directory using some boolean logic
optionally combined with regular expressions.

Works via command line where passed in arguments are the search terms
or in a TUI mode with no arguments. Can also run in HTTP mode with
the -d or --http-server flag.

Searches by default use AND boolean syntax for all terms
 - use --default-operator=or (or a settings file) to combine terms with OR
 - exact match using quotes "find this"
 - fuzzy match within 1 or 2 distance fuzzy~1 fuzzy~2
 - negate using NOT such as pride NOT prejudice
 - OR syntax such as catch OR throw
 - group with parentheses (cat OR dog) NOT fish
 - note: NOT binds to next term, use () with OR
 - regex with toothpick syntax /pr[e-i]de/

Searches can filter which files are searched by adding
the following syntax
 - file:test              (substring match on filename)
 - filename:.go           (substring match on filename)
 - path:pkg/search        (substring match on full file path)

Example search that uses all current functionality
 - darcy NOT collins wickham~1 "ten thousand a year" /pr[e-i]de/ file:test path:pkg

The default input field in tui mode supports some nano commands
- CTRL+a move to the beginning of the input
- CTRL+e move to the end of the input
- CTRL+k to clear from the cursor location forward

- F1 cycle ranker (simple/tfidf/bm25/structural)
- F2 cycle code filter (default/only-code/only-comments/only-strings/only-declarations/only-usages)
- F3 cycle gravity (off/low/default/logic/brain)
- F4 cycle noise (silence/quiet/default/loud/raw)

Usage:
  cs [flags]

Flags:
      --address string               address and port to listen on (default ":8080")
  -A, --after-context int            lines of context after each match (grep mode)
  -B, --before-context int           lines of context before each match (grep mode)
      --binary                       set to disable binary file detection and search binary files
  -c, --case-sensitive               make the search case sensitive
      --color string                 color output mode [auto, always, never] (default "auto")
  -C, --context int                  lines of context before and after each match (grep mode)
      --cpu-profile string           write CPU profile to file (for use with go tool pprof or PGO)
      --dedup                        collapse byte-identical search matches, keeping the highest-scored representative
      --default-operator string      how to combine adjacent terms with no explicit AND/OR [and, or]. 'or' is useful for broad multi-keyword searches (default "and")
      --dir string                   directory to search, if not set defaults to current working directory
      --exclude-dir strings          directories to exclude (default [.git,.hg,.svn])
  -x, --exclude-pattern strings      file and directory locations matching case sensitive patterns will be ignored [comma separated list: e.g. vendor,_test.go]
  -r, --find-root                    attempts to find the root of this repository by traversing in reverse looking for .git or .hg
  -f, --format string                set output format [text, json, vimgrep] (default "text")
      --git-sync                     periodically git pull repositories found in the search directory (TUI/HTTP/MCP only)
      --git-sync-interval duration   interval between git sync pulls (e.g. 5m, 30s, 1h) (default 5m0s)
      --git-sync-workers int         number of concurrent git pull workers (default 1)
      --gravity string               complexity gravity intent: brain (2.5), logic (1.5), default (1.0), low (0.2), off (0.0) (default "default")
  -h, --help                         help for cs
      --hidden                       include hidden files
  -d, --http-server                  start the HTTP server
  -i, --include-ext strings          limit to file extensions (N.B. case sensitive) [comma separated list: e.g. go,java,js,C,cpp]
      --line-limit int               max matching lines per file in grep mode (-1 = unlimited) (default -1)
      --max-read-size-bytes int      number of bytes to read into a file with the remaining content ignored (default 1000000)
      --mcp                          start as an MCP (Model Context Protocol) server over stdio
      --mcp-lock-dir                 restrict the MCP server to --dir: reject searching or reading outside that tree
      --min                          include minified files
      --min-line-length int          number of bytes per average line for file to be considered minified (default 255)
      --no-gitignore                 disables .gitignore file logic
      --no-ignore                    disables .ignore file logic
      --no-syntax                    disable syntax highlighting in output
      --noise string                 noise penalty intent: silence (0.1), quiet (0.5), default (1.0), loud (2.0), raw (off) (default "default")
      --only-code                    only rank matches in code (auto-selects structural ranker)
      --only-comments                only rank matches in comments (auto-selects structural ranker)
      --only-declarations            only show matches on declaration lines (func, type, var, const, class, def, etc.)
      --only-strings                 only rank matches in string literals (auto-selects structural ranker)
      --only-usages                  only show matches on usage lines (excludes declarations)
  -o, --output string                output filename (default stdout)
      --profile string               ranking profile [balanced, precise, broad] — overrides --gravity, --noise, and --test-penalty when set
      --ranker string                set ranking algorithm [simple, tfidf, bm25, structural] (default "structural")
      --result-limit int             maximum number of results to return (-1 for unlimited) (default -1)
      --reverse                      reverse the result order
  -s, --snippet-count int            number of snippets to display (default 1)
  -n, --snippet-length int           size of the snippet to display (default 300)
      --snippet-mode string          snippet extraction mode: auto, snippet, lines, or grep (default "auto")
      --template-display string      path to a custom display template
      --template-search string       path to a custom search template
      --template-style string        built-in theme for the HTTP server UI [dark, light, bare] (default "dark")
      --test-penalty float           score multiplier for test files when query has no test intent (0.0-1.0, 1.0=disabled) (default 0.4)
  -t, --type strings                 limit to language types [comma separated list: e.g. Go,Java,Python]
  -v, --version                      version for cs
      --weight-code float            structural ranker: weight for matches in code (default 1.0) (default 1)
      --weight-comment float         structural ranker: weight for matches in comments (default 0.2) (default 0.2)
      --weight-string float          structural ranker: weight for matches in strings (default 0.5) (default 0.5)

Searches work on single or multiple words with a logical AND applied between them. You can negate with NOT before a term. You can combine terms with OR and use parentheses to control grouping. You can do an exact match with quotes and do regular expressions using toothpicks.

Example searches,

shell
cs t NOT something test~1 "ten thousand a year" "/pr[e-i]de/" file:test
cs (cat OR dog) AND NOT bird
cs path:vendor main           # search only under vendor/
cs "func main" path:cmd       # find main functions under cmd/
cs handler lang:go            # search only Go files
cs TODO lang:go,python        # search Go and Python files
cs NOT lang:go test           # search all languages except Go
cs handler complexity:>=50    # find complex files containing "handler"
cs "json" --only-code         # find "json" in code, ignoring string literals
cs "hack" --only-comments     # find "hack" in comments only
cs "func main" --only-declarations      # find main function declarations
cs "logger" --only-usages               # find where logger is called, not defined
cs "Copyright" --dedup                   # collapse identical copyright headers

You can use it in a similar manner to fzf in TUI mode if you like, since cs will return the matching document path if you hit the enter key one you have highlighted a result.

shell
cat `cs`  # cat out the matching file
vi `cs`   # edit the selected file

MCP Server Mode

cs can run as an MCP (Model Context Protocol) server over stdio, allowing LLM tools like Claude Desktop, Claude Code, Cursor, and others to use it as a code search tool.

shell
cs --mcp                        # search the working directory
cs --mcp --dir /path/to/codebase  # set a different default directory

The calling agent chooses which directory to search per call via the search tool's path parameter, the same way it would with grep. --dir sets the default directory used when path is omitted — it is not a restriction. To restrict the server to a single tree, add --mcp-lock-dir, which rejects any path or get_file outside --dir.

Claude Desktop Configuration

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "codespelunker": {
      "command": "/path/to/cs",
      "args": ["--mcp", "--dir", "/path/to/codebase"]
    }
  }
}

Claude Code Configuration

Add to your .mcp.json:

json
{
  "mcpServers": {
    "codespelunker": {
      "command": "/path/to/cs",
      "args": ["--mcp", "--dir", "/path/to/codebase"]
    }
  }
}

Exposed Tools

The MCP server exposes two tools:

search — Search code files recursively with relevance ranking.

ParameterTypeRequiredDescription
querystringyesSearch query (supports boolean logic, quotes, regex, fuzzy)
pathstringnoDirectory to search in, like grep. Absolute, or relative to the default directory; ~ is expanded. Defaults to --dir (or the working directory)
max_resultsnumbernoMaximum results to return (default 20)
snippet_lengthnumbernoSnippet size in characters
case_sensitivebooleannoCase sensitive search
include_extstringnoComma-separated file extensions (e.g. go,js,py)
languagestringnoComma-separated language types (e.g. Go,Python)
path_filterstringnoRestrict to files whose full path matches (substring or glob; comma-separated values are ORed). ANDed against the whole query
filestringnoRestrict to files whose filename matches (substring or glob; comma-separated values are ORed). ANDed against the whole query
gravitystringnoComplexity gravity intent: brain, logic, default, low, off
profilestringnoRanking profile: balanced (default), precise, broad - overrides gravity/noise/test-penalty

Note that path selects where to search and path_filter narrows what matches — passing a glob to path is an error that points you at path_filter.

The path_filter, file, include_ext, and language parameters apply to the whole query and are the robust way to scope a search — unlike in-query filters (path:, file:, ext:, lang:), which bind only to the adjacent term (a OR b path:src means a OR (b AND path:src)). Note there is no top-level ext parameter; use include_ext. Unknown parameters are rejected with an error rather than silently ignored.

Results are returned as JSON with the same fields as --format json: filename, location, score, snippet content, match locations, language, and code statistics, plus a searched_directory field echoing the directory that was walked.

get_file — Read the contents of a file.

ParameterTypeRequiredDescription
pathstringyesFile path, absolute or relative to the default directory. Restricted to --dir only when --mcp-lock-dir is set
start_linenumberno1-based start line number (reads from beginning if omitted)
end_linenumberno1-based end line number, inclusive (reads to end if omitted)

Returns JSON with line-numbered file content and, for recognised source files, language, lines, code, comment, blank, and complexity fields.

Support

Using cs commercially? If you want priority support for cs you can purchase a years worth https://boyter.gumroad.com/l/vvmyi which entitles you to priority direct email support from the developer.

If not, raise a bug report... or don't. I'm not the boss of you.

安装

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "boyter-cs": {
      "command": "npx",
      "args": [
        "-y",
        "cs"
      ]
    }
  }
}

将 codespelunker (cs) MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 codespelunker (cs) 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请保持终端窗口及其中的进程运行。
3

将 codespelunker (cs) 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 codespelunker (cs) MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "boyter-cs": {
      "command": "npx",
      "args": [
        "-y",
        "cs"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 codespelunker (cs) MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 codespelunker (cs) MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 codespelunker (cs) 帮我完成这项任务吗?
codespelunker (cs)
当然。我已阅读。
以下是我使用 codespelunker (cs) 得到的结果。

常见问题

codespelunker (cs) MCP 服务器有什么用途?

codespelunker (cs) 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 codespelunker (cs) MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您可以让 Claude、ChatGPT、Gemini 等不同 AI 模型,或您在 TypingMind 中配置的其他模型使用 codespelunker (cs),而无需为每个模型单独配置 MCP 服务器。

为什么在 TypingMind 中使用 codespelunker (cs) MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是优秀的大语言模型聊天前端之一。连接 codespelunker (cs) 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 codespelunker (cs) MCP 连接到 TypingMind?

codespelunker (cs) 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

codespelunker (cs) MCP 在 TypingMind 中提供哪些工具?

codespelunker (cs) 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 codespelunker (cs) MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行掌控模型提供商、API 密钥、提示词和 MCP 配置。如果 codespelunker (cs) 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇