Commit Graph

704 Commits

Author SHA1 Message Date
Sam Morrow d8ed060413 Extract names from var/const declarations in Go
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
var_declaration and const_declaration nodes contain spec children
(var_spec, const_spec) with name fields. The Go name extractor now
handles these the same way as type_declaration, so nested diffs show
'var_declaration storeLine' instead of '_var_declaration_25'.
2026-02-09 23:45:55 +01:00
Sam Morrow 4b0cd4c6ac Add inline diffs and recursive nesting for structural diff
Modified declarations now show what changed inside them:
- Inline line-level diffs using LCS for precise change detection
- Whitespace-normalized comparison for brace languages (Go, JS, etc.)
  so indentation-only changes collapse to '(whitespace/formatting only)'
- Exact comparison for whitespace-significant languages (Python)
- Recursive nesting into classes/modules to pinpoint which method changed
  e.g. 'class Dog: modified > method bark: modified > line change'
- Max depth of 5 prevents unbounded recursion
- Added method_definition to JS/TS/TSX declaration kinds for class methods
2026-02-09 23:43:27 +01:00
Sam Morrow 317c44cea5 Fix Docker build: statically link CGO binary for distroless
The CGO-enabled binary was dynamically linked against musl libc from
Alpine, but the distroless runtime image uses glibc. This caused
'no such file or directory' at runtime because the dynamic linker
couldn't be found. Fix by passing -linkmode external -extldflags
'-static' to produce a fully static binary.
2026-02-09 23:23:03 +01:00
Sam Morrow d608c4b99b Add tree-sitter structural diff for code files
Extends the compare_file_contents tool with AST-based structural
diffing for code files using tree-sitter. Instead of line-based diffs,
this shows declaration-level changes (functions, classes, types) which
gives models more concise and semantically meaningful context.

Supported languages: Go, Python, JavaScript, TypeScript, Ruby, Rust,
Java, C/C++.

Requires CGO_ENABLED=1 for the tree-sitter C bindings. Windows builds
are removed from goreleaser as CGO cross-compilation is not supported
without additional toolchain setup.

For unsupported languages, falls back to unified line-based diff.
2026-02-09 23:20:55 +01:00
Sam Morrow cec7b00dfb Promote yaml.v3 and go-toml/v2 to direct dependencies
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
go mod tidy correctly marks these as direct imports now that
semantic_diff.go uses them for YAML and TOML parsing.
2026-02-09 22:54:23 +01:00
github-actions[bot] 020a51f04c chore: regenerate license files
Auto-generated by license-check workflow
2026-02-09 21:53:00 +00:00
Sam Morrow 1777da6eba Add feature-flagged compare_file_contents tool with semantic diffs
Add a new compare_file_contents MCP tool that compares two versions of a
file across refs (branches, tags, or SHAs). For structured data formats
(JSON, YAML, CSV, TOML), it produces semantic diffs that show only
meaningful changes, ignoring formatting differences. For unsupported
formats, it falls back to unified diff.

Key features:
- Semantic diffs for JSON, YAML, CSV, TOML files
- Unified diff fallback for code and other text files
- Handles new files (base not found) and deleted files (head not found)
- 1MB max file size to prevent excessive server-side processing
- Gated behind 'compare_file_contents' feature flag

This helps AI models by:
- Reducing token usage (formatting noise eliminated)
- Providing unambiguous before/after semantics
- Enabling self-verification of edits to config/data files

Refs: #1973
2026-02-09 22:50:59 +01:00
Adam Holt 121d50af05 Don't use privilaged ports or https for docs 2026-02-06 18:11:14 +00:00
Adam Holt 5b0fb9c883 Update docs/streamable-http.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 18:11:14 +00:00
Adam Holt 3df58879b6 Add Streamable HTTP documentation 2026-02-06 18:11:14 +00:00
Adam Holt 4d0d0ba45f Expose HTTP port (#1967) 2026-02-06 16:41:45 +01:00
Adam Holt aa302209b0 Add Streamable HTTP mode (#1849)
Adds new `http` command supporting Streamable HTTP support, OAuth Metadata handler and Scope filtering.

Co-authored-by: kerobbi <kerobbi@github.com>
Co-authored-by: Matt Holloway <mattdholloway@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 15:33:41 +01:00
Ilya Kamens a9edf9e04c Add reply to PR comment (#1856)
* Update snapshots

There was a change on `main` before I changed anything

* feat: add add_reply_to_pull_request_comment tool

Add a new tool that allows AI agents to reply to existing pull request comments. This tool uses GitHub's CreateCommentInReplyTo REST API to create threaded conversations on pull requests.

Features:

Reply to any existing PR comment using its ID
Proper error handling for missing parameters and API failures
Comprehensive test coverage (8 test cases)
Follows project patterns and conventions
Registered in pull_requests toolset as a write operation
Parameters:

owner: Repository owner (required)
repo: Repository name (required)
pullNumber: Pull request number (required)
commentId: ID of comment to reply to (required)
body: Reply text content (required)
This tool complements the existing add_comment_to_pending_review tool by enabling responses to already-posted comments, enhancing AI-powered code review workflows.

Closes: #635

* Update README

* fix types

---------

Co-authored-by: tommaso-moro <tommaso-moro@github.com>
Co-authored-by: Tommaso Moro <37270480+tommaso-moro@users.noreply.github.com>
Co-authored-by: plaskowski <1999603+plaskowski@users.noreply.github.com>
Co-authored-by: Rob Emanuele <2320142+lossyrob@users.noreply.github.com>
2026-02-04 17:46:21 +00:00
dependabot[bot] c1f8d4cd06 build(deps): bump docker/login-action from 3.6.0 to 3.7.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/5e57cd118135c172c3672efd75eb46360885c0ef...c94ce9fb468520275223c153574b00df6fe4bcc9)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-03 16:40:31 +00:00
Roberto Nacu fb53abdbe2 replace context.Background() (#1948)
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
MCP Server Diff / mcp-diff (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
v0.30.3
2026-02-03 15:42:14 +00:00
Tony Truong 9fcf93260b adding trailing slash to uploads url (#1947) 2026-02-03 12:09:31 +01:00
Christopher Harrison 1820a0ff11 Apply suggestion from @GeekTrainer 2026-01-28 00:06:55 +00:00
Christopher Harrison 4bb9691390 Update docs/installation-guides/install-copilot-cli.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-28 00:06:55 +00:00
Christopher Harrison fb9ccebc06 docs: add Copilot CLI installation guide 2026-01-28 00:06:55 +00:00
Sam Morrow 47412e5c4b Refactor buffer processing for clarity and add edge case tests
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
MCP Server Diff / mcp-diff (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
- Extract storeLine() and accumulate() helper closures to eliminate
  duplicated line processing and truncation logic
- Simplify main loop by using early return pattern (newlineIdx < 0 -> break)
- Add test for empty response body edge case
- Add test for exact maxLineSize boundary condition (10MB)

The refactored code reduces nesting and makes the flow clearer:
accumulate handles byte collection with truncation detection,
storeLine handles ring buffer storage with truncation markers.
v0.30.2
2026-01-27 12:20:47 +01:00
Matt Holloway 4bb1ba9e85 consolidate buffer logic 2026-01-27 12:20:47 +01:00
Matt Holloway a1e82e78f6 add line length truncate buffer 2026-01-27 12:20:47 +01:00
dependabot[bot] 51fc176c1b build(deps): bump golang from 1.25.4-alpine to 1.25.6-alpine
Bumps golang from 1.25.4-alpine to 1.25.6-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.25.6-alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 19:32:36 +01:00
dependabot[bot] 53a5f606ec build(deps): bump SamMorrowDrums/mcp-server-diff from 2.2.0 to 2.3.5
Bumps [SamMorrowDrums/mcp-server-diff](https://github.com/sammorrowdrums/mcp-server-diff) from 2.2.0 to 2.3.5.
- [Release notes](https://github.com/sammorrowdrums/mcp-server-diff/releases)
- [Commits](https://github.com/sammorrowdrums/mcp-server-diff/compare/v2.2.0...v2.3.5)

---
updated-dependencies:
- dependency-name: SamMorrowDrums/mcp-server-diff
  dependency-version: 2.3.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 19:31:45 +01:00
Sam Morrow b1a2b741e8 Add more toolset configurations to mcp-diff workflow
Add toolsets-context and toolsets-issues,context configurations to
improve test coverage for instruction generation with different
toolset combinations.
2026-01-26 18:27:22 +01:00
Sam Morrow e2640de31f Update mcp-server-diff action to v2.2.0
Updates to v2.2.0 which includes server instructions diff support for
detecting issues like #1897.
2026-01-26 18:27:22 +01:00
Sam Morrow 40e21ec565 Fix generateInstructions to use only enabled toolsets
Previously, generateInstructions() iterated over AvailableToolsets() which
returns all toolsets that have tools defined, rather than only the enabled
toolsets based on WithToolsets() configuration.

This caused instructions for all toolsets to be included regardless of which
toolsets were actually enabled, leading to bloated instructions (e.g., 5886
chars vs 1226 chars when only 'repos' toolset is enabled).

Changes:
- Add EnabledToolsets() method to return only enabled toolset metadata
- Update generateInstructions() to use EnabledToolsets()
- Add regression test for the fix

Fixes #1897
2026-01-26 18:27:22 +01:00
tonytrg a4670b0470 fix naming
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
MCP Server Diff / mcp-diff (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
v0.30.1
2026-01-26 16:28:36 +01:00
tonytrg 7af51a079a adding correct insiders-mode name 2026-01-26 16:28:36 +01:00
Matt Holloway 60a8c21b8a remove old flags 2026-01-26 16:02:20 +01:00
Jason 0caa26546f docs: add Windows notes for Claude MCP HTTP setup
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
MCP Server Diff / mcp-diff (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
Add a Windows/CLI note that `claude mcp add-json` may return "Invalid input"
when adding an HTTP server, and point users to the legacy `claude mcp add
--transport http ...` format.

Also add a Windows (PowerShell) example for the legacy command when the CLI
expects the MCP server name immediately after `claude mcp add`.
v0.30.0
2026-01-26 15:30:52 +01:00
Oleksandr Redko 7569d5cf41 Update Go version requirement in mcpcurl to 1.24 2026-01-26 15:28:04 +01:00
Lee Reilly 51745c5889 Fix typo in OpenAI Codex installation guide link 2026-01-26 15:26:10 +01:00
Oleksandr Redko b1d4aa34e5 chore: workaround LF for Windows 2026-01-26 15:25:49 +01:00
Oleksandr Redko 1410dc1b93 chore: remove unused github.com/fatih/color 2026-01-26 15:25:49 +01:00
Matt Holloway c7c0ee6d5b docs update (2) 2026-01-26 15:07:38 +01:00
Matt Holloway 8287d5fbfc update docs 2026-01-26 15:07:38 +01:00
Matt Holloway 0a62aabc94 default to consolidated actions/projects toolsets and add hold back flag 2026-01-26 15:07:38 +01:00
Tommaso Moro 15e66b3df3 Generate server instructions in Inventory (#1869)
* carry over from https://github.com/github/github-mcp-server/pull/1863

* remove unused inv

* update toolsnap

---------

Co-authored-by: Sam Morrow <info@sam-morrow.com>
2026-01-23 09:57:47 +00:00
Sam Morrow afc2396a0c Fix mcp-diff workflow triggers
Add push triggers to run on:
- Pushes to main branch (catches merges)
- Tag pushes (v*) for release comparisons against previous tags

The pull_request trigger alone doesn't run when commits are pushed
to PR branches via merge or direct push. Adding push triggers ensures
the diff runs in all expected scenarios.
2026-01-23 00:59:27 +01:00
Sam Morrow e559a36060 Rename workflow for mcp-server-diff action 2026-01-23 00:44:12 +01:00
Sam Morrow adfd83b12a Rename to mcp-diff.yml (action renamed to mcp-server-diff) 2026-01-23 00:44:12 +01:00
Sam Morrow 55d22d8320 chore: update mcp-conformance-action to v2 for security fixes 2026-01-23 00:44:12 +01:00
Sam Morrow f850ce31a4 chore: update mcp-conformance-action to v2.3.2 2026-01-23 00:44:12 +01:00
Sam Morrow f244b8a5f2 chore: update mcp-conformance-action to v2.3.0 2026-01-23 00:44:12 +01:00
Sam Morrow 4bbd84e74c ci: upgrade mcp-conformance-action to v2.2.0
v2.2.0 adds automatic HTTP server lifecycle management and
improved documentation for transport configuration.
2026-01-23 00:44:12 +01:00
Sam Morrow e1cde287d4 chore: update conformance action to v2.0.2 with Zod schema fix
Fixes custom message validation error:
'v3Schema.safeParse is not a function'
2026-01-23 00:44:12 +01:00
Sam Morrow a236b66465 chore: update conformance action to v2.0.1 with transport fix 2026-01-23 00:44:12 +01:00
Sam Morrow 2c2613c436 ci: update to mcp-conformance-action@v2.0.0 2026-01-23 00:44:12 +01:00
Sam Morrow bd541e3b0c chore: update mcp-conformance-action to v1.4.6
Uses named pipes for reliable server startup detection instead of
a blind sleep, fixing intermittent failures on slow startup.
2026-01-23 00:44:12 +01:00