Skip to main content
Glama
README.md
# webnav-ts-mcp

An MCP server that gives AI agents JavaScript, TypeScript, HTML and CSS navigation, a cross-file index of CSS custom properties and selectors, and editing tools that check changes before writing them.

![Infographic showing an MCP client sending requests to webnav, which uses language servers and a CSS and HTML index, then checks proposed edits before writing](assets/workflow.svg)

An MCP client sends requests to webnav. Webnav uses language servers for navigation and diagnostics, and a workspace index for CSS variables and selectors. For edits, it checks an in-memory proposal before applying it to files. [How it works and limits](docs/development.md#design-notes).

## Quick start

With Node.js 20 or later installed, register webnav with your MCP host. Run the command for your host from the project directory:

```bash
# Claude Code
claude mcp add webnav -- npx -y webnav-ts-mcp

# Codex
codex mcp add webnav -- npx -y webnav-ts-mcp

# OpenCode
opencode mcp add webnav -- npx -y webnav-ts-mcp
```

Your MCP host starts the server when needed. See the [setup guide](docs/setup.md) for manual configuration, Cursor, and project-local installation.

## What you can do

| Task | Start with |
| --- | --- |
| Explore JS/TS code | `symbol_info`, `outline`, `callers`, `implementations`, `search_symbol` |
| Navigate by position | `hover`, `definition`, `references`, `diagnostics` |
| Find CSS variables and selectors across files | `css_var`, `selector` |
| Change code with checks | `edit`, `edit_symbol`, `rename_symbol`, `move`, `quick_fix` |
| Review or group changes | `verify_changes`, `apply_edit`, `undo_edit`, `batch` |

The name-based navigation tools are JS/TS only; use the CSS and HTML index for markup and stylesheets. Positions are 1-indexed and columns use UTF-16 offsets. See the [tool reference](docs/tools.md) for write safeguards, previews, batching and scope.

## Requirements and limits

Node.js 20 or later is required. Language servers are npm dependencies; webnav uses a project's TypeScript 7 or newer when available, otherwise its own copy. The cross-file CSS/HTML index is regex-based, and write checks have limits around importers and path aliases. The project has been verified on Linux with Node 22; Windows, macOS and Node 20/24 have not been verified. See [configuration and language servers](docs/configuration.md) and [design notes and costs](docs/development.md#design-notes).

## Tests

For a checkout, run `npm install` and `npm run check` to run lint, type checking and the Vitest suite. The suite includes integration tests with language servers and MCP. See [development](docs/development.md) for more commands and test details.

## Documentation

- [Setup](docs/setup.md): manual host configuration, Cursor and project-local installation.
- [Tool reference](docs/tools.md): navigation, edits, safety and batching.
- [Configuration](docs/configuration.md): language servers and environment variables.
- [Development and design](docs/development.md): layout, tests, implementation notes and costs.
- [Source repository](https://github.com/illescasDaniel/webnav-ts-mcp).

## License

MIT. See [LICENSE](LICENSE).

TDQS

A3.9/5.0

Scored across 12 tools

Disambiguation4/5

Most tools map to distinct navigation operations, and descriptions explicitly delineate boundaries (e.g. callers is 'narrower than references', symbol_info is a one-call bundle). The main risk is overlap between symbol_info and the chained search_symbol/hover/definition/references set, plus references vs callers vs implementations, but the descriptions steer selection clearly.

Naming Consistency4/5

Names are uniformly lowercase, mostly bare LSP-style nouns (hover, definition, references, diagnostics, outline) with a few snake_case compound names (search_symbol, symbol_info, css_var). The style is predictable and readable despite not being a strict single verb_noun pattern.

Tool Count5/5

Twelve tools is well within the ideal 3-15 range and each tool earns its place (a distinct LSP capability or a deliberate cross-file index feature). No obvious redundancy or padding.

Completeness4/5

Covers the core navigation lifecycle: diagnostics, hover, definition, references, outline, symbol search, callers, implementations, plus CSS custom-property and selector cross-referencing. Missing rename/refactor, code actions, and workspace symbol search for non-JS/TS languages (a limitation the descriptions acknowledge), which are minor workaroundable gaps.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues