Skip to content

feat: add MCP version to GitHub issue reporting#70

Closed
binggg wants to merge 2 commits intomainfrom
claude/issue-69-20250711_032415
Closed

feat: add MCP version to GitHub issue reporting#70
binggg wants to merge 2 commits intomainfrom
claude/issue-69-20250711_032415

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Jul 11, 2025

Fixes the missing MCP version information in GitHub issue reporting when MCP tools encounter errors.

Changes

  • Add getMcpVersion() function to read version from package.json
  • Include MCP version in environment info section of GitHub issues
  • Enhance error reporting with version information for better debugging

Closes #69

Generated with Claude Code

- Add getMcpVersion() function to read version from package.json
- Include MCP version in environment info section of GitHub issues
- Enhance error reporting with version information for better debugging

Co-authored-by: Booker Zhao <binggg@users.noreply.github.com>
@binggg
Copy link
Copy Markdown
Member Author

binggg commented Jul 11, 2025

@claude 改一下吧,不用这么复杂

// 从构建时注入的版本号获取MCP版本信息
const mcpVersion = process.env.npm_package_version || MCP_VERSION || 'unknown';

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Jul 11, 2025

Claude finished @binggg's task —— View job


MCP version detection simplified ✅

Todo List:

  • Read current implementation in mcp/src/utils/tool-wrapper.ts
  • Replace complex version detection with simpler approach
  • Commit and push changes to PR branch

Changes Made

Successfully simplified the getMcpVersion() function as requested:

  • Before: Complex file system operations reading package.json
  • After: Simple environment variable approach: process.env.npm_package_version || __MCP_VERSION__ || 'unknown'
  • Removed: Unnecessary imports (readFileSync, dirname, join, fileURLToPath)

The new implementation is much cleaner and avoids file system operations, relying on build-time environment variables instead.

Commit: 95d4e5b - "refactor: simplify MCP version detection to use environment variables"


Replace complex file system operations with simpler approach using process.env.npm_package_version and build-time constants.

Co-authored-by: Booker Zhao <binggg@users.noreply.github.com>
@binggg binggg closed this Jul 11, 2025
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.

MCP工具错误: getFunctionLogs

1 participant