Skip to content
Docs

CodeForge LSP

The CodeForge LSP plugin gives Claude access to the same code intelligence that powers your IDE — type checking, go-to-definition, find-references, and more. By connecting Claude to Language Server Protocol servers, it can navigate and understand your codebase with precision rather than relying on text search alone.

This is a purely declarative plugin — it has no hook scripts and no shell scripts. All configuration lives in plugin.json, where it registers LSP server definitions. Claude Code launches each server at startup if its binary is available on PATH. Missing servers are silently skipped, so the plugin never fails on a missing tool.

When Claude opens a file matching a registered extension, the corresponding LSP server provides rich language features for that file.

ServerCommandLanguagesFile Extensions
Pyrightpyright-langserver --stdioPython.py, .pyi
TypeScript Language Servertypescript-language-server --stdioTypeScript, JavaScript.ts, .tsx, .js, .jsx, .mts, .cts, .mjs, .cjs
goplsgopls serveGo.go, .mod, .sum

Each server maps file extensions to language identifiers. For example, .tsx files are identified as typescriptreact, while .js and .mjs files are both identified as javascript.

Once a server is running, Claude can use these operations for code navigation and understanding:

OperationDescriptionUse Case
goToDefinitionJump to where a symbol is definedFollowing imports, understanding API contracts
findReferencesFind every usage of a symbolImpact analysis before refactoring
hoverGet type info and documentationUnderstanding function signatures and types
documentSymbolList all symbols in a fileGetting a structural overview of a module
workspaceSymbolSearch symbols across the projectFinding classes, functions, or types by name
goToImplementationFind implementations of interfacesUnderstanding polymorphism and abstractions
prepareCallHierarchyGet the call hierarchy at a positionUnderstanding call chains
incomingCallsFind all callers of a functionUnderstanding who depends on a function
outgoingCallsFind all functions called from a positionUnderstanding a function’s dependencies

Different agent types leverage LSP in different ways:

  • Read-only agents (explorer, researcher, architect) use LSP extensively for goToDefinition, findReferences, and workspaceSymbol to understand codebases without modifying files
  • Implementation agents (generalist, refactorer, migrator) use LSP for navigation during refactoring and to verify that changes don’t break references
  • Analysis agents (security-auditor, dependency-analyst) use incomingCalls and findReferences to trace data flow and dependency chains

Servers activate only when their binary is found on PATH:

ServerBinaryPre-installed in CodeForge
Pyrightpyright-langserverYes (via npm i -g pyright)
TypeScript LStypescript-language-serverYes (via npm i -g typescript-language-server typescript)
goplsgoplsYes (via go install golang.org/x/tools/gopls@latest)

If you need LSP for additional languages, you can add server definitions to the plugin’s plugin.json following the same pattern.

You can extend the LSP plugin with additional servers by adding entries to the lspServers field in plugin.json. Each server definition needs three fields:

{
"my-server": {
"command": "my-language-server",
"args": ["--stdio"],
"extensionToLanguage": {
".ext": "language-id"
}
}
}

The command must be the binary name (resolved via PATH). The args array is passed to the command. The extensionToLanguage map tells Claude Code which files to route to this server.

Unlike most CodeForge plugins, the LSP plugin contains no hook scripts or shell scripts — just declarative configuration:

codeforge-lsp/
.claude-plugin/
plugin.json -- Plugin metadata + LSP server definitions
README.md

The lspServers field in plugin.json is all that’s needed. Claude Code reads this at startup and manages server lifecycles automatically.