Deixis

io.github.jolars由 GitHub 账号 jolars 发布v0.2.2更新于 Oct 24, 2026

Typed LSP operations for MCP clients.

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

为编码代理提供类型化的语言服务器协议操作,例如定义、引用、诊断、符号以及受保护的改名流程。

可以做什么
Deixis 是一个本地 MCP 服务器,为单个项目管理显式配置的语言服务器,并暴露其语义能力。默认提供十五个只读工具,包括悬停、签名帮助、定义、声明、类型定义、实现、引用、传入与传出调用、诊断、文档符号、工作区符号,以及改名准备与预览。以 --allow-mutation 启动时会增加第十六个工具 apply_rename。它会协商位置编码、从磁盘同步文档、按语言服务器声明的能力限制操作,并在结果中保留来源服务器信息。
适用场景
当编码代理需要来自真实语言服务器的语义代码理解而非文本搜索时使用:查找定义与引用、查看类型与调用层级、读取诊断信息,或预览符号改名。它面向一个项目根目录以及一个或多个已配置的语言服务器。
运行要求
由 MCP 主机通过 stdio 直接启动的本地二进制文件,项目通过 --root 或工作目录指定。语言服务器是独立程序,必须安装并在主机环境中可见。TOML 配置文件列出服务器与文件扩展名路由,通过 --config 传入或安装到平台用户配置路径。仅从源码构建时需要 Rust 1.98.0 或更高版本。
安装前请注意
Deixis 处于 pre-alpha 阶段,没有稳定性保证。改名是两步变更:apply_rename 仅在 --allow-mutation 下可用,预览 ID 只授权该次精确预览,十分钟后过期,并在第一次应用尝试时被消耗,包括失败的尝试。应用是进程内事务,不保证断电安全。日志由 RUST_LOG 控制并输出到 stderr。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Deixis,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Deixis

Deixis is a Model Context Protocol (MCP) server that gives coding agents typed access to Language Server Protocol (LSP) operations. It manages explicitly configured language servers for one project and exposes their semantic capabilities without adding another filesystem, shell, editor, index, or memory layer.

[!WARNING] Deixis is pre-alpha. Its semantic tools and guarded rename workflow work, but no stability guarantees are available yet.

Capabilities

A configured Deixis session exposes fifteen read-only MCP tools by default. Starting it with --allow-mutation adds apply_rename as a sixteenth tool.

ToolPurpose
deixis_server_statusList attached servers or inspect one server in detail.
hoverReturn hover markup at a zero-based UTF-8 position.
signature_helpReturn call signatures and structured parameter details.
definitionFind definitions.
declarationFind declarations.
type_definitionFind type definitions.
implementationFind implementations.
referencesFind references, with explicit declaration inclusion.
incoming_callsFind callers and their call sites.
outgoing_callsFind callees and their call sites.
diagnosticsRequest pull diagnostics or return cached push diagnostics.
document_symbolsInspect a file outline when its symbol structure is needed.
workspace_symbolsSearch attached servers, or one explicitly named server.
prepare_renameCheck whether a symbol can be renamed at a position.
preview_renameValidate edits and return a diff plus a one-shot preview ID.
apply_renameApply one exact preview (requires --allow-mutation).

Deixis negotiates UTF-8, UTF-16, and UTF-32 positions, synchronizes documents from disk before file-scoped requests, gates every operation on the language server's advertised capabilities, and preserves source-server provenance in results. Several language servers may serve one immutable project root.

Recoverable LSP cancellations are retried up to three times after a bounded readiness wait. Retries share the original request timeout and stop when the MCP caller cancels. If retries are exhausted, the error reports the attempt count and preserves the language server's error details.

Navigation, hover, signature help, references, symbols, and call-hierarchy preparation also retry empty results observed during indexing and ContentModified errors within the same timeout and three-retry limit. After an empty result, Deixis waits for readiness up to the request deadline instead of spending retries while indexing continues. A server that remains busy produces a request_timeout error (30 seconds by default). ContentModified errors wait up to five seconds for readiness per retry. File-scoped retries verify that both the synchronized document and its contents on disk are unchanged before reusing a position. Nonempty results and empty results from servers with ready or unknown status throughout the request return immediately.

Use definition, type_definition, implementation, and references directly for targeted symbol navigation. Use document_symbols only when you need a file outline, such as a view of its types, functions, and nested members. It is not a default navigation step or a prerequisite for other queries. This guidance is also included in the MCP initialization instructions and tool description.

Calling deixis_server_status without arguments lists attached servers in lexical order and counts the remaining configured servers:

text
attached: python, rustnot attached: 3

An empty list is shown as attached: none; the count is included even when zero. Structured output contains attached (an array of configured names) and notAttached (a count). A server is attached after Deixis has synchronized at least one document with its current process. Servers that have not started or have started without a synchronized document count as not attached. Pass server for its detailed lifecycle and capability snapshot; start: true also requires an explicit server name.

references, incoming_calls, outgoing_calls, document_symbols, and workspace_symbols accept an optional limit (default 100, maximum 500) and offset (default 0). Each page also caps the compact JSON result array at 64 KiB. The structured pagination object reports returned, total, truncated, and, when more results remain, nextOffset. Continue with that offset and the same query arguments. Each call reruns the query, so file edits, indexing progress, or changes to attached servers can shift results between pages. Text responses summarize the page.

Every nested document symbol counts toward the limit. Symbols retain their hierarchy within a page; index and parentIndex identify relationships across pages, and childCount reports the full number of direct children. Individual items too large for a page are omitted, with their indexes listed in pagination.omitted and truncated: true. Pagination advances past these items. Counts and byte limits apply to the normalized results returned by Deixis; language servers still compute their full responses.

See DESIGN.md for the protocol and architecture and TODO.md for planned work.

Installation

Language servers are separate programs; install the ones you configure and make them visible in the environment of the MCP host.

Prebuilt binaries

The latest GitHub release provides archives for x86-64 and ARM64 Linux, Intel and Apple silicon macOS, and x86-64 Windows. Linux releases include both glibc and static musl builds.

Install the appropriate release automatically on Linux or macOS:

console
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/jolars/deixis/releases/latest/download/deixis-installer.sh | sh

Or from PowerShell on Windows:

powershell
powershell -ExecutionPolicy Bypass -c "irm https://github.com/jolars/deixis/releases/latest/download/deixis-installer.ps1 | iex"

The installers place deixis in Cargo's binary directory. Each release also includes SHA-256 checksums and GitHub build attestations. Verify a downloaded archive with:

console
gh attestation verify deixis-aarch64-apple-darwin.tar.xz --repo jolars/deixis

Nix

Install the default flake package:

console
nix profile install github:jolars/deixis

Or run it without installing:

console
nix run github:jolars/deixis -- --root /path/to/project --config /path/to/config.toml

Cargo

Rust 1.98.0 or newer is required:

console
cargo install deixis --locked

The crates.io package belongs to the MCP Registry identity mcp-name: io.github.jolars/deixis.

To build a checkout instead:

console
git clone https://github.com/jolars/deixis.gitcd deixiscargo build --release --locked

The resulting binary is target/release/deixis (deixis.exe on Windows).

Configure language servers

Start with the tested example configuration, or define a single server:

toml
[servers.rust]command = "rust-analyzer"file_extensions = { ".rs" = "rust" }

Pass the file explicitly with --config, or install it as the user configuration:

PlatformDefault path when XDG_CONFIG_HOME is unset
Linux and other Unix~/.config/deixis/config.toml
macOS~/Library/Application Support/deixis/config.toml
Windows%APPDATA%\deixis\config.toml

$XDG_CONFIG_HOME/deixis/config.toml takes precedence on every platform when that variable is set. An explicit --config takes precedence over the user configuration. Deixis never discovers configuration in the project tree.

The configuration is strict: unknown fields, empty commands, invalid routes, and zero-valued bounds stop startup with an error. The configuration reference documents every field, default, routing rule, and process limit.

Connect an MCP client

Deixis is a local stdio server. The MCP host must launch the binary directly; do not wrap it in a shell command. Set the project either with --root or by starting Deixis in the project directory. The root defaults to the current working directory and is canonicalized once at startup.

Codex

Add Deixis from the command line:

console
codex mcp add deixis --env RUST_LOG=deixis=info -- /absolute/path/to/deixis --root /absolute/path/to/project --config /absolute/path/to/config.toml

Or add a project-scoped .codex/config.toml:

toml
[mcp_servers.deixis]command = "/absolute/path/to/deixis"args = [  "--root",  "/absolute/path/to/project",  "--config",  "/absolute/path/to/config.toml",]tool_timeout_sec = 70
[mcp_servers.deixis.env]RUST_LOG = "deixis=info"

The 70-second host tool timeout accommodates the default 30-second LSP startup and request bounds when the first tool call starts a server lazily. Codex's startup_timeout_sec applies to the Deixis MCP handshake, not to a downstream language server. See the current Codex MCP documentation for all host-side options.

JSON-based MCP hosts

For a host that uses an mcpServers JSON object, use the equivalent stdio entry. Consult the host's documentation for its configuration file location.

json
{  "mcpServers": {    "deixis": {      "command": "/absolute/path/to/deixis",      "args": [        "--root",        "/absolute/path/to/project",        "--config",        "/absolute/path/to/config.toml"      ],      "env": {        "RUST_LOG": "deixis=info"      }    }  }}

Use absolute paths when the host does not inherit your interactive shell's PATH. The configured language-server commands must also resolve in the host's environment.

Home Manager

The flake provides homeManagerModules.default. A nonempty typed server catalog installs Deixis, writes its user configuration, and registers one root-agnostic command in programs.mcp.servers:

Add the flake input:

nix
inputs.deixis = {  url = "github:jolars/deixis";  inputs.nixpkgs.follows = "nixpkgs";};

Then import and configure the Home Manager module:

nix
{ inputs, ... }:
{  imports = [ inputs.deixis.homeManagerModules.default ];
  programs.deixis = {    enable = true;    servers = {      rust = {        command = "rust-analyzer";        fileExtensions.".rs" = "rust";      };      typescript = {        command = "typescript-language-server";        args = [ "--stdio" ];        fileExtensions.".ts" = "typescript";      };    };  };}

The generated command has no fixed root, so each MCP process binds to its working directory. Set programs.deixis.configFile instead of servers to install an existing TOML file. The two options are mutually exclusive.

Operation

Language servers start only when selected by a tool call. File-scoped tools accept a project-relative or root-contained absolute path and an optional configured server name. Position-based tools also accept:

json
{ "line": 12, "character": 8 }

Both values are zero-based; character is a UTF-8 byte offset. If several servers match a file, supply server or make the configuration routes unique. signature_help returns every server-provided signature and its structured parameter labels and documentation. Its text fallback contains only the active signature—or the first signature when the server does not select one—to keep agent context compact.

incoming_calls and outgoing_calls take path, a UTF-8 position, and an optional server. They prepare the call hierarchy internally, then expand all symbols returned for that position. Each entry in calls contains from (the caller), to (the callee), and fromRanges (call sites in from.uri, using from.positionEncoding). Both symbols include their name, kind, URI, ranges, server, and position encoding, plus any server-provided details or opaque data. Readable project files use UTF-8; other targets retain the server encoding. The tools require negotiated call-hierarchy support. Preparation, expansion, and retries share one request timeout. Pagination applies across all returned calls, and each caller/callee pair counts as one item.

Without a server, workspace_symbols fans out to capable attached servers without starting others and merges results in stable server-name order. Supply server to query that server alone, starting it if necessary.

Successful calls return structured JSON and a concise text fallback. Tool failures return isError: true with a stable structured error code. Null or empty semantic results may also report readiness and resultStability; a transient result means the language server has signaled that it is still working.

Symbol rename is deliberately a two-step mutation. By default, prepare_rename and preview_rename are available for read-only inspection, but apply_rename is neither advertised nor callable. Add --allow-mutation to the Deixis command when configuring the MCP host to opt into application. Then call preview_rename with the file, UTF-8 position, and newName; inspect its structured per-file edits and unified diff; and pass its opaque previewId to apply_rename. Previewing does not modify files. The ID authorizes only that exact preview, expires after ten minutes, and is consumed by the first apply attempt—including a failed attempt. A second apply requires a new preview.

Rename accepts only text edits to existing UTF-8 files contained by the immutable project root. It rejects file creation, deletion, rename operations, change annotations, external paths, overlapping edits, and stale file contents. Application stages every replacement before committing any file and attempts to restore all originals if a commit fails. This is an in-process transaction, not a power-loss guarantee; Deixis does not promise recovery after a process or machine crash. Server-initiated workspace/applyEdit requests remain rejected because they do not carry explicit preview authorization.

Logging

Deixis reserves stdout for MCP frames. Its logs and all child-process stderr go to stderr. Logging defaults to deixis=info; set RUST_LOG in the MCP host's environment to change the filter:

text
RUST_LOG=deixis=debug

Server names are attached to child-process and LSP log events. Normal info logs do not include source contents or protocol bodies. See Troubleshooting for startup, routing, timeout, diagnostic, and shutdown failures.

Development

The repository pins Rust 1.98.0. Entering the devenv shell supplies the complete toolchain and installs the pre-commit hooks:

console
devenv shelltask check

The opt-in compatibility suite exercises TypeScript Language Server, Pyright, gopls, clangd, and Deno using versions pinned by flake.lock:

console
task compatibility

Without Nix, install those five servers and run:

console
cargo test --test real_language_servers -- --ignored --test-threads=1

Executable paths may be overridden with DEIXIS_TYPESCRIPT_LANGUAGE_SERVER, DEIXIS_PYRIGHT_LANGSERVER, DEIXIS_GOPLS, DEIXIS_CLANGD, and DEIXIS_DENO.

The agent benchmark runs paired Codex trials with Deixis available or absent and with neutral or LSP-directed instructions. It records task success, model tokens, wall time, MCP calls, patches, and raw event streams in isolated Git worktrees.

See CONTRIBUTING.md for the complete development gate.

License

Licensed under either the Apache License, Version 2.0 or the MIT License, at your option.

来源:README.md,提交 4da82fe

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.2.2最新Sep 25, 2026
  2. v0.2.1Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分