Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Conformance Test

on:
pull_request:

permissions:
contents: read

jobs:
conformance:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v6
with:
# Fetch full history to access merge-base
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: "go.mod"

- name: Download dependencies
run: go mod download

- name: Run conformance test
id: conformance
run: |
# Run conformance test, capture stdout for summary
script/conformance-test > conformance-summary.txt 2>&1 || true

# Output the summary
cat conformance-summary.txt

# Check result
if grep -q "RESULT: ALL TESTS PASSED" conformance-summary.txt; then
echo "status=passed" >> $GITHUB_OUTPUT
else
echo "status=differences" >> $GITHUB_OUTPUT
fi

- name: Generate Job Summary
run: |
# Add the full markdown report to the job summary
echo "# MCP Server Conformance Report" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Comparing PR branch against merge-base with \`origin/main\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

# Extract and append the report content (skip the header since we added our own)
tail -n +5 conformance-report/CONFORMANCE_REPORT.md >> $GITHUB_STEP_SUMMARY

echo "" >> $GITHUB_STEP_SUMMARY
echo "---" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

# Add interpretation note
if [ "${{ steps.conformance.outputs.status }}" = "passed" ]; then
echo "✅ **All conformance tests passed** - No behavioral differences detected." >> $GITHUB_STEP_SUMMARY
else
echo "⚠️ **Differences detected** - Review the diffs above to ensure changes are intentional." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Common expected differences:" >> $GITHUB_STEP_SUMMARY
echo "- New tools/toolsets added" >> $GITHUB_STEP_SUMMARY
echo "- Tool descriptions updated" >> $GITHUB_STEP_SUMMARY
echo "- Capability changes (intentional improvements)" >> $GITHUB_STEP_SUMMARY
fi
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ bin/
# binary
github-mcp-server

.history
.history
conformance-report/
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,11 @@ The following sets of tools are available:
- `owner`: Repository owner (string, required)
- `repo`: Repository name (string, required)

- **get_label** - Get a specific label from a repository.
- `name`: Label name. (string, required)
- `owner`: Repository owner (username or organization name) (string, required)
- `repo`: Repository name (string, required)

- **issue_read** - Get issue details
- `issue_number`: The number of the issue (number, required)
- `method`: The read operation to perform on a single issue.
Expand Down
16 changes: 8 additions & 8 deletions cmd/github-mcp-server/generate_docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"

"github.com/github/github-mcp-server/pkg/github"
"github.com/github/github-mcp-server/pkg/toolsets"
"github.com/github/github-mcp-server/pkg/registry"
"github.com/github/github-mcp-server/pkg/translations"
"github.com/google/jsonschema-go/jsonschema"
"github.com/modelcontextprotocol/go-sdk/mcp"
Expand Down Expand Up @@ -50,8 +50,8 @@ func generateReadmeDocs(readmePath string) error {
// Create translation helper
t, _ := translations.TranslationHelper()

// Create toolset group - stateless, no dependencies needed for doc generation
r := github.NewRegistry(t)
// Build registry - stateless, no dependencies needed for doc generation
r := github.NewRegistry(t).Build()

// Generate toolsets documentation
toolsetsDoc := generateToolsetsDoc(r)
Expand Down Expand Up @@ -104,7 +104,7 @@ func generateRemoteServerDocs(docsPath string) error {
return os.WriteFile(docsPath, []byte(updatedContent), 0600) //#nosec G306
}

func generateToolsetsDoc(r *toolsets.Registry) string {
func generateToolsetsDoc(r *registry.Registry) string {
var buf strings.Builder

// Add table header and separator
Expand All @@ -123,7 +123,7 @@ func generateToolsetsDoc(r *toolsets.Registry) string {
return strings.TrimSuffix(buf.String(), "\n")
}

func generateToolsDoc(r *toolsets.Registry) string {
func generateToolsDoc(r *registry.Registry) string {
// AllTools() returns tools sorted by toolset ID then tool name.
// We iterate once, grouping by toolset as we encounter them.
tools := r.AllTools()
Expand All @@ -133,7 +133,7 @@ func generateToolsDoc(r *toolsets.Registry) string {

var buf strings.Builder
var toolBuf strings.Builder
var currentToolsetID toolsets.ToolsetID
var currentToolsetID registry.ToolsetID
firstSection := true

writeSection := func() {
Expand Down Expand Up @@ -299,8 +299,8 @@ func generateRemoteToolsetsDoc() string {
// Create translation helper
t, _ := translations.TranslationHelper()

// Create toolset group - stateless
r := github.NewRegistry(t)
// Build registry - stateless
r := github.NewRegistry(t).Build()

// Generate table header
buf.WriteString("| Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func setupMCPClient(t *testing.T, options ...clientOption) *mcp.ClientSession {
// so that there is a shared setup mechanism, but let's wait till we feel more friction.
enabledToolsets := opts.enabledToolsets
if enabledToolsets == nil {
enabledToolsets = github.NewRegistry(translations.NullTranslationHelper).DefaultToolsetIDs()
enabledToolsets = github.NewRegistry(translations.NullTranslationHelper).Build().DefaultToolsetIDs()
}

ghServer, err := ghmcp.NewMCPServer(ghmcp.MCPServerConfig{
Expand Down
Loading