Skip to content

feat: pass LANGWATCH_API_KEY to MCP server config#84

Merged
rogeriochaves merged 4 commits intomainfrom
feat/langwatch-mcp-api-key
Feb 22, 2026
Merged

feat: pass LANGWATCH_API_KEY to MCP server config#84
rogeriochaves merged 4 commits intomainfrom
feat/langwatch-mcp-api-key

Conversation

@rogeriochaves
Copy link
Copy Markdown
Collaborator

@rogeriochaves rogeriochaves commented Feb 22, 2026

Summary

  • Pass LANGWATCH_API_KEY via the env field in the LangWatch MCP server config, as required by the updated docs
  • Gitignore .mcp.json (and .cursor/mcp.json) since it now contains API key secrets
  • Generate a .mcp.json.example with placeholder values so the config shape is committed for team reference
  • Update the initial prompt to instruct the coding agent to include .mcp.json.example copy instructions in the project README
  • Replace single-line input for project goal with a custom raw-stdin textarea prompt that supports:
    • Shift+Enter for newlines (detects \n vs \r — works in Warp and other terminals)
    • Bracketed paste mode for pasting multiline text without submitting
    • Arrow key navigation, backspace across lines, Home/End, Delete
    • CSI u / kitty keyboard protocol support for Shift+Enter
  • Reorder coding assistant choices: move Kilocode after Cursor

Test plan

  • Run better-agents init and verify .mcp.json contains the real API key in env.LANGWATCH_API_KEY
  • Verify .mcp.json.example is generated with "your_langwatch_api_key_here" placeholder
  • Verify .gitignore includes .mcp.json and .cursor/mcp.json
  • Verify the LangWatch MCP server connects successfully with the new config format
  • Run init on a project with an existing .gitignore and confirm .mcp.json entry is appended
  • Test textarea: type single line + Enter → submits
  • Test textarea: Shift+Enter → adds newline, continues editing
  • Test textarea: paste multiline text → all lines appear, no premature submit
  • Test textarea: backspace on empty line → merges with previous line
  • Test textarea: empty input + Enter → validation error shows
  • Verify coding assistant list shows Kilocode after Cursor

The LangWatch MCP server now requires the API key to be passed via the
env field. Since .mcp.json now contains secrets, gitignore it and
generate a .mcp.json.example with placeholders for team sharing.
…istants

Replace single-line input with raw-stdin textarea that supports
bracketed paste (multiline paste without submitting) and Shift+Enter
for newlines. Also move Kilocode after Cursor in the assistant list.
Warp (and likely other terminals) sends 0x0a for Shift+Enter vs 0x0d
for Enter. Use this to reliably detect Shift+Enter for newlines.
@rogeriochaves rogeriochaves merged commit 8ab576e into main Feb 22, 2026
3 checks passed
@rogeriochaves rogeriochaves deleted the feat/langwatch-mcp-api-key branch February 22, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant