| 1 |
start the gopls MCP server in headless mode |
| 2 |
|
| 3 |
Usage: |
| 4 |
gopls [flags] mcp [mcp-flags] |
| 5 |
|
| 6 |
Starts the gopls MCP server in headless mode, without needing an LSP client. |
| 7 |
Starts the server over stdio or sse with http, depending on whether the listen flag is provided. |
| 8 |
|
| 9 |
Examples: |
| 10 |
$ gopls mcp -listen=localhost:3000 |
| 11 |
$ gopls mcp //start over stdio |
| 12 |
-instructions |
| 13 |
if set, print gopls' MCP instructions and exit |
| 14 |
-listen=string |
| 15 |
the address on which to run the mcp server |
| 16 |
-logfile=string |
| 17 |
filename to log to; if unset, logs to stderr |
| 18 |
-rpc.trace |
| 19 |
print MCP rpc traces; cannot be used with -listen |