Skip to content

(vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) + upload improvements + GLM psuedo tags#25

Merged
voarsh2 merged 20 commits intoContext-Engine-AI:testfrom
voarsh2:vscode-extension-mcp-config-writer
Nov 25, 2025
Merged

(vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) + upload improvements + GLM psuedo tags#25
voarsh2 merged 20 commits intoContext-Engine-AI:testfrom
voarsh2:vscode-extension-mcp-config-writer

Conversation

@voarsh2
Copy link
Contributor

@voarsh2 voarsh2 commented Nov 22, 2025

Makes it easier to setup context engine MCP's configs and Claude CTX hook - by updating the mcp configs in workspace folder (for Claude Code and Windsurf IDE)

- Add `Write MCP Config (.mcp.json)` command to write project-local MCP server entries
- Support both Claude Code (.mcp.json) and Windsurf (mcp_config.json) MCP configurations
- Add settings for mcpIndexerUrl, mcpMemoryUrl, mcpClaudeEnabled, and mcpWindsurfEnabled
- Auto-update MCP configs when relevant settings change
- Handle Windows cmd wrapper for npx mcp-remote in Claude configs
- Support custom Windsurf MCP path
@voarsh2 voarsh2 changed the title Vscode extension mcp config writer (vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) Nov 22, 2025
@voarsh2 voarsh2 marked this pull request as draft November 22, 2025 15:23
…hook scripts

- Add `claudeHookEnabled` setting to enable automatic Claude Code hook configuration - Linux only
- Bundle ctx-hook-simple.sh and ctx.py into VSIX for reference
- Write .claude/settings.local.json with UserPromptSubmit hook when enabled (for CTX)
- Auto-update hook config when claudeHookEnabled setting changes
- Add onStartupFinished activation event for earlier extension initialization
@voarsh2 voarsh2 changed the title (vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) [NOT READY FOR MERGE] (vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) Nov 22, 2025
…nvironments

- Add configurable timeout and retry settings for remote uploads
- Implement robust timeout handling with server polling after timeout
- Enhance path resolution using origin metadata for accurate host/container mapping
- Add background processing for delta bundles to improve responsiveness
- Preserve dual-path metadata in search results for client preference
- Normalize repo name handling for slugged collections
- Remove client-side bundle size limits in favor of server-side enforcement
- Add group-writable permissions for shared workspace state
- Filter dev-workspace directories from file scanning in development mode
@voarsh2 voarsh2 changed the title [NOT READY FOR MERGE] (vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) (vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) Nov 25, 2025
Improves the Claude hook configuration logic to correctly update or add the hook.

Normalizes command paths to account for versioned directory names and deduplicates hook entries to avoid accidental double entries. Also ensures that only valid hook entries are persisted.
- Refactors file scanning logic for improved performance and accuracy, mimicking the standalone client's pruning logic.
- Standardizes decoder configuration, using a `decoderRuntime` setting instead of a boolean flag.
- Improves ctx_config.json and .env scaffolding, preserving existing user values and enforcing defaults to ensure remote upload compatibility.
Updates the README to reflect changes to Prompt+ usage,
including the bundled ctx.py execution and command palette.
Also clarifies the usage of command palette options and
status bar buttons.
@voarsh2 voarsh2 marked this pull request as ready for review November 25, 2025 15:15
Enhances file change detection by considering both the file system and the local cache.

This ensures that deleted files, which are only present in the cache, are also detected as changes, preventing inconsistencies during remote uploads.
Additionally, upon detecting and processing a file deletion, the corresponding cache entry is now removed to avoid repeated reporting of the same deletion in subsequent scans.
Adds a new configuration option, `rewrite_max_tokens`, to allow control over the maximum number of tokens used during content rewriting.
Implements support for the GLM runtime when generating pseudo tags, including a JSON-only prompt mode for GLM.

Also introduces command-line arguments for testing the pseudo tag generation with specific code snippets or files, facilitating debugging and validation. These test arguments will be removed once the GLM integration is stable.
@voarsh2 voarsh2 changed the title (vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) (vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) + upload improvements + GLM psuedo tags Nov 25, 2025
Increments the extension version from 0.1.25 to 0.1.26.
Drives Qdrant collection hint behavior via `ctx_config.json` instead of hook environment variables.

This change ensures consistent configuration and removes dependency on potentially unreliable hook configurations.
Introduces a guide for AI agents (like Claude) on using the MCP Qdrant-Indexer and Memory tools effectively.

The guide outlines when to use the Qdrant-Indexer versus `grep`, emphasizing semantic understanding, ranked results, and contextual awareness.
It provides practical tips, performance optimization strategies, and anti-patterns to avoid, ensuring efficient and accurate code exploration.
Refines the documentation for the `context_answer` tool within the MCP framework.

It clarifies its intended use for summarizing modules/tools and answering architecture questions, emphasizing the importance of specifying modules when relevant.

Also, provides guidance on formulating effective queries for better results and highlights the limitations of `context_answer` for low-level debugging, suggesting `repo_search` and direct code reading as alternatives.
@voarsh2 voarsh2 merged commit 083523b into Context-Engine-AI:test Nov 25, 2025
1 check passed
@voarsh2 voarsh2 deleted the vscode-extension-mcp-config-writer branch December 10, 2025 04:09
m1rl0k pushed a commit that referenced this pull request Mar 1, 2026
(vscode-ext) MCP config writer (Claude/Windsurf) + Claude Code Hook writing for CTX) + upload improvements + GLM psuedo tags
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.

2 participants