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
51 changes: 51 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent
name: "Copilot Setup Steps"

on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Download Go dependencies
run: go mod download

- name: Build server
run: go build -v ./cmd/github-mcp-server

- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install MCP Inspector
run: npm install -g @modelcontextprotocol/inspector@0.7.0

- name: Verify tools
run: |
echo "Go version: $(go version)"
echo "goimports: $(which goimports)"
echo "MCP Inspector: $(which mcp-inspector || echo 'installed via npx')"
echo "Server binary: $(ls -la github-mcp-server)"
37 changes: 36 additions & 1 deletion .github/copilot-instructions.md → AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# GitHub MCP Server - Copilot Instructions
# GitHub MCP Server - Agent Instructions

> This file follows the [agents.md](https://agents.md) convention for AI agent instructions.

## AI Disclosure Requirement

> **If you are using AI assistance to contribute to this repository, you must disclose it in the pull request or issue body.**

Include a brief statement like:
- "This PR was written with assistance from [agent name]."
- "I used [tool] to help generate this code."

This helps maintainers understand the context and apply appropriate review scrutiny.

## Project Overview

Expand Down Expand Up @@ -59,6 +71,29 @@ go test ./pkg/github -v
go test ./pkg/github -run TestGetMe
```

### Testing with MCP Inspector

Use the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) CLI to test the server:

```bash
# Build the server first
go build -v ./cmd/github-mcp-server

# List available tools
npx @modelcontextprotocol/inspector@0.7.0 --cli \
--config '{"mcpServers":{"github":{"command":"./github-mcp-server","args":["stdio"],"env":{"GITHUB_PERSONAL_ACCESS_TOKEN":"your-token"}}}}' \
--server github \
--method tools/list

# Call a specific tool (e.g., get authenticated user)
npx @modelcontextprotocol/inspector@0.7.0 --cli \
--config '{"mcpServers":{"github":{"command":"./github-mcp-server","args":["stdio"],"env":{"GITHUB_PERSONAL_ACCESS_TOKEN":"your-token"}}}}' \
--server github \
--method tools/call --tool-name get_me
```

Note: Replace `your-token` with a valid GitHub Personal Access Token.

## Project Structure

### Directory Layout
Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,18 @@ Here are a few things you can do that will increase the likelihood of your pull
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
- [GitHub Help](https://help.github.com)

## AI Contributions

We welcome contributions that use AI assistance. However, **if you are using any kind of AI assistance** (e.g., GitHub Copilot, Claude, ChatGPT, or other AI agents), **you must disclose this in your pull request or issue**.

Include a brief statement describing:
- Which AI tool(s) you used
- The extent of AI assistance (e.g., "code generation", "documentation help", "debugging suggestions")

Example disclosures:
> This PR was written with assistance from GitHub Copilot.

> I used Claude to help draft the initial implementation, which I then reviewed and modified.

This transparency helps maintainers understand context and apply appropriate review. Trivial fixes (typos, formatting) don't require disclosure.