feat: mcp-server credential fallback, chat reuse docs#92
Merged
Conversation
jflayhart
force-pushed
the
stainless/release
branch
from
July 26, 2026 20:00
dca098d to
161a904
Compare
jflayhart
force-pushed
the
stainless/release
branch
from
July 26, 2026 21:22
161a904 to
8810f53
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Regenerated by stlc. This release carries one hand-written change and one spec change.
1. mcp-server falls back to the
linqCLI credentialpackages/mcp-server/src/linq-cli-credentials.ts(new), wired inindex.ts.MCP clients launch the server as a detached child process, so it never inherits a login shell. On macOS a GUI-launched editor does not see
export LINQ_API_V3_API_KEY=...from a shell profile — which leaves the env var, the only supported credential source, unreachable for most desktop users.The server now reads the token
linq loginalready wrote to~/.linq/config.jsonwhen the env var is unset, honouringLINQ_PROFILEand the config's active profile. An explicitly provided key still wins. Every failure path — file absent, unreadable, malformed, or tokenless — falls through to the previous behaviour, so the SDK still reports the missing credential itself.This was driven by a concrete finding: a relative script path in a Cursor plugin's
mcp.jsondoes not resolve to the plugin root (Cursor looks in the open workspace; the spawned processcwdis$HOME), so a launcher script could not be used to supply the key. Resolving it in the server removes the need for one, and Claude Code and Codex get the same fix.Verified end to end with no env var set: the server logged
Using the API key from ~/.linq/config.json, the Deno sandbox booted, and an authenticatedphone_numberscall returned live data.This is sealed as custom code
The patch lives in
linq-sdksatstainless/custom-code/typescript/, so a future regeneration re-applies it instead of reverting it. That matters here specifically:f8bdf2dfixed the Deno sandbox by hand,567485d1regenerated over it, and0.29.0shipped withexecutebroken on every call. The same tracking file also carries that--allow-netfix, already released in0.30.0.Please do not hand-edit
packages/mcp-server/src/linq-cli-credentials.tsor the--allow-netflag incode-tool.tsonmain— edits there are erased by the next regeneration. Change them viastlc build --commitinlinq-sdks.2. Document chat reuse and named-group behaviour
src/resources/chats/chats.tsand the mcp-server docs index, regenerated from the OpenAPI spec change in synapse. Documentation only; no behaviour change.Checks
lintandbuildpass. Merging cuts0.31.0via release-please.