Install
$ agentstack add mcp-agwstin-vb6-lsp ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
VB6 Language Server
[](./package.json) [](./LICENSE) [](./tests)
vb6-lsp is a Visual Basic 6 language server plus MCP server for real-world legacy VB6 codebases.
It understands multi-project .vbp workspaces, indexes large source trees quickly, and exposes the same VB6 analysis engine both to editors and to agent tooling.
At a glance
| Surface | Use case | Includes | | --- | --- | --- | | LSP | editors and IDE workflows | definition, references, hover, completion, rename, diagnostics, member access, folding | | MCP | agents and tool-driven workflows | symbol lookup, bundled analysis, project info, call graph tracing, state mutations, summaries |
Features
.vbp-aware workspace discovery- Go to definition
- Find references
- Hover
- Document symbols
- Workspace symbols
- Completion
- Signature help
- Rename
- Member access on typed variables and UDTs
- Member access inside
Withblocks - Folding ranges for multiline VB6 symbols
- Semantic tokens for declarations and symbol usages
- Code actions for common diagnostics
- Diagnostics for missing block terminators, duplicate public symbols, and missing
Option Explicit - Diagnostics for unresolved routines
- Diagnostics for unresolved
Withreceivers - Diagnostics for missing external project references
- Basic type inference for common assignment patterns
.vbpproject metadata and external reference parsing- Basic
.frmdesigner/control awareness - Built-in stdio MCP server for indexed VB6 workflows
- Agent-first analysis tools for explanations, call flow, mutations, and entrypoints
- Specialized workflows for packet handlers and UI forms
- Bundled analysis tools for single-call symbol/module investigation
Quick Start
git clone https://github.com/your-user/vb6-lsp.git
cd vb6-lsp
npm install
npm test
Run the LSP server:
npm run lsp:stdio
Run the MCP server:
npm run mcp:stdio
Why LSP and MCP?
This project intentionally ships both:
- LSP is for editors. It powers interactive coding features like definition, hover, completion, rename, and diagnostics.
- MCP is for AI agents and other structured tooling. It exposes indexed operations like symbol lookup, references, code search, function reading, and module summaries.
They are not two separate analysis engines. Both are backed by the same VB6 parser, indexer, and symbol model.
Workspace discovery
By default, vb6-lsp:
- Uses the active workspace root.
- Discovers
.vbpfiles recursively. - Extracts source directories from
Module=,Class=,Form=and related entries. - Merges any extra
vb6.sourcePathsconfigured by the user.
Example settings:
{
"vb6.workspaceRoot": "C:/path/to/workspace",
"vb6.projectFiles": ["ProjectA/App.vbp", "Shared/Library.vbp"],
"vb6.sourcePaths": ["src", "shared", "legacy/forms"],
"vb6.preferProjectFiles": true
}
MCP tools
The built-in MCP server exposes:
find_symbollist_symbolsfind_referencessearch_coderead_functionsignaturemodule_infoproject_infolist_projectsreference_infotype_membersexplain_symbolfind_callersfind_calleestrace_flowfind_related_symbolsfind_state_mutationsfind_network_entrypointsfind_ui_entrypointssummarize_moduleanalyze_packet_handleranalyze_ui_formanalyze_symbolanalyze_moduletrace_inbound_flowtrace_outbound_flowanalyze_state_symbolanalyze_startup_flowanalyze_project_reference_impactindex_statsreindex_vb6
The stdio MCP transport has been validated with both Codex and Claude Code.
Telemetry
The MCP server supports local, opt-in telemetry for measuring real-world tool usage.
Enable it with environment variables:
VB6_LSP_TELEMETRY_ENABLED=true
VB6_LSP_TELEMETRY_DIR=/path/to/telemetry
It writes JSONL events to mcp-usage.jsonl with non-sensitive metadata such as:
- tool name
- duration
- result count
- output size
- cache hit state
- error presence
It does not log prompts, source file contents, or full MCP payload bodies.
Benchmark
The repository includes a reproducible benchmark script:
npm run benchmark -- --root "C:/path/to/vb6-workspace" --source-dirs "src;forms;shared"
Example snapshot from a large real-world VB6 workspace:
| Benchmark | vb6-lsp | git grep | Winner | | --- | ---: | ---: | --- | | Index startup | 448.92 ms | n/a | grep | | Exact symbol lookup | 0.00 ms | 122.17 ms | lsp | | Reference search | 2.18 ms | 116.36 ms | lsp | | Scoped text search | 0.54 ms | 67.00 ms | lsp | | Unscoped text search | 36.20 ms | 122.96 ms | lsp |
Full benchmark notes: [docs/benchmark.md](docs/benchmark.md)
Use with Codex
Example ~/.codex/config.toml entry:
[mcp_servers.vb6-lsp]
command = "node"
args = ["C:/path/to/vb6-lsp/out/mcp/mcp/server.js"]
env = { VB6_LSP_ROOT = "C:/path/to/your/vb6-workspace" }
If you want to force specific project files or source directories:
[mcp_servers.vb6-lsp]
command = "node"
args = ["C:/path/to/vb6-lsp/out/mcp/mcp/server.js"]
env = { VB6_LSP_ROOT = "C:/path/to/workspace", VB6_LSP_PROJECT_FILES = "ProjectA/App.vbp;ProjectB/Tools.vbp", VB6_LSP_SOURCE_DIRS = "src;shared;forms" }
Codex compatibility note:
- validated against the built-in stdio MCP flow
- no extra wrapper is required beyond a working
nodeexecutable in the environment
Use with Claude Code
Example ~/.claude/mcpServers.json entry:
{
"mcpServers": {
"vb6-lsp": {
"command": "node",
"args": ["C:/path/to/vb6-lsp/out/mcp/mcp/server.js"],
"env": {
"VB6_LSP_ROOT": "C:/path/to/your/vb6-workspace"
}
}
}
}
Claude Code note:
- if the MCP server does not appear after configuration changes, fully restart Claude Code
- on some Windows setups it can be more reliable to point the MCP config at an explicit
node.exepath
Example prompts
Find where ProcessOrder is defined and summarize what it does.List the public symbols in modInventory.bas.Find references to ApplyDamage.Read the full body of HandleConnection from clsSocketServer.cls.Show me the signature of WriteInteger.Summarize modCombat.bas before we change it.Search the VB6 codebase for MagicEffect in the server-side modules only.
Development
Common workflow:
npm install
npm run build:all
npm test
Useful scripts:
npm run build:all
npm run lsp:stdio
npm run mcp:stdio
npm run benchmark -- --root "C:/path/to/workspace" --source-dirs "src;forms;shared"
npm run package:vsix
npm test
Useful folders:
src/server/indexer/*for parsing and indexingsrc/server/providers/*for LSP featuressrc/mcp/*for MCP toolstests/*for automated validation
The repo also includes a VS Code launch configuration that starts an Extension Host against the fixture workspace in tests/fixtures/sample-workspace.
Scope
3.3.0 positions vb6-lsp as both a practical VB6 editor integration and a stable agent-first MCP analysis surface:
- portable workspace discovery via
.vbp - project-wide symbol search and navigation
- contextual local/parameter-aware resolution for the main authoring features
- member access when the receiver type is known
- member access inside
Withblocks - basic form/control awareness for
.frmfiles - project/reference awareness from
.vbp - richer MCP workflows for project and reference inspection
- higher-level agent-first analysis workflows
- specialized workflows for common legacy VB6 investigation tasks
- bundled one-call analyses for symbols and modules
- directional flow tracing and state-oriented analysis
- smarter ranking and trimming for heavy agent analyses
- project-level startup/reference impact workflows
- semantic tokens and richer quick fixes in the editor
- official stdio MCP server included in the repo
It is not a full VB6 compiler or full COM/type-inference engine.
Validation
Automated tests cover:
.vbpconfig discovery- indexer behavior for module symbols, properties, locals, and parameters
- member access on class modules and UDT fields
- folding ranges for multiline VB6 symbols
- semantic tokens for indexed declarations
- code actions for common diagnostics
- project metadata and external reference parsing
- basic type inference from common assignments
- richer MCP workflows for projects, references, and type members
- higher-level agent workflows for explanation, tracing, mutations, and entrypoint discovery
- specialized analysis workflows for packet handlers and UI-heavy forms
.frmdesigner control indexing- member access inside
Withblocks - missing external project reference diagnostics
- LSP end-to-end requests over stdio
- MCP stdio tool exposure, indexing, and richer tool workflows
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Agwstin
- Source: Agwstin/vb6-lsp
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.