Skip to content
Merged
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
68 changes: 68 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: Bug Report
about: Create a report to help us improve gomcp
title: '[BUG] '
labels: 'type: bug, status: needs-triage'
assignees: ''
---

## Bug Description

A clear and concise description of what the bug is.

## Environment

- **gomcp version**: [e.g., 0.1.0]
- **Go version**: [e.g., 1.23.0]
- **OS**: [e.g., macOS 14.0, Ubuntu 22.04]
- **Transport**: [e.g., HTTP/SSE, stdio]
- **Client**: [e.g., Cursor IDE, Claude Desktop]

## Steps to Reproduce

1. Go to '...'
2. Run command '...'
3. Configure '...'
4. See error

## Expected Behavior

A clear and concise description of what you expected to happen.

## Actual Behavior

A clear and concise description of what actually happened.

## Logs/Error Output

```
Paste any relevant logs or error messages here
```

## Configuration

```env
# Relevant environment variables (redact secrets!)
MCP_TRANSPORT_PROTOCOL=
MCP_PORT=
CURSOR_COMPATIBLE_SSE=
```

## Screenshots

If applicable, add screenshots to help explain your problem.

## Additional Context

Add any other context about the problem here.

## Possible Solution

If you have ideas on how to fix this, please share them here.

## Checklist

- [ ] I have searched existing issues to ensure this is not a duplicate
- [ ] I have included all relevant environment information
- [ ] I have provided steps to reproduce the issue
- [ ] I have included relevant logs/error messages
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Question / Discussion
url: https://github.com/NP-compete/gomcp/discussions
about: Ask questions and discuss ideas in GitHub Discussions
- name: MCP Specification
url: https://modelcontextprotocol.io/specification/2025-06-18
about: Reference the official MCP specification
- name: Official Go SDK
url: https://github.com/modelcontextprotocol/go-sdk
about: Check the official MCP Go SDK documentation
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: Feature Request
about: Suggest an idea for gomcp
title: '[FEATURE] '
labels: 'type: feature, status: needs-triage'
assignees: ''
---

## Feature Description

A clear and concise description of the feature you'd like to see.

## Problem Statement

Is your feature request related to a problem? Please describe.
Example: "I'm always frustrated when [...]"

## Proposed Solution

A clear and concise description of what you want to happen.

## Use Case

Describe the use case(s) this feature would enable:

1. As a [type of user], I want [goal] so that [benefit]
2. ...

## Alternatives Considered

A clear and concise description of any alternative solutions or features you've considered.

## MCP Specification Alignment

Does this feature align with the MCP specification?

- [ ] This is part of the MCP spec (link to relevant section)
- [ ] This extends beyond the MCP spec (explain why it's valuable)
- [ ] Not applicable

## Implementation Ideas

If you have ideas on how to implement this, please share:

```go
// Example code or pseudocode
```

## Additional Context

Add any other context, mockups, or screenshots about the feature request here.

## Checklist

- [ ] I have searched existing issues/discussions to ensure this is not a duplicate
- [ ] I have clearly described the problem this feature would solve
- [ ] I have considered alternatives
- [ ] I am willing to help implement this feature (optional)
88 changes: 88 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
## Description

<!-- Provide a brief description of the changes in this PR -->

## Type of Change

<!-- Mark the relevant option with an "x" -->

- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
- [ ] CI/CD changes
- [ ] Other (please describe):

## Related Issues

<!-- Link any related issues using "Fixes #123" or "Relates to #123" -->

Fixes #

## Changes Made

<!-- List the specific changes made in this PR -->

-
-
-

## MCP Features Affected

<!-- Mark any MCP features this PR affects -->

- [ ] Tools
- [ ] Prompts
- [ ] Resources
- [ ] Roots
- [ ] Completion
- [ ] Logging
- [ ] Pagination
- [ ] Sampling
- [ ] Elicitation
- [ ] Progress
- [ ] Cancellation
- [ ] Transport (HTTP/SSE/stdio)
- [ ] None of the above

## Testing

<!-- Describe the tests you ran and how to reproduce them -->

### Test Commands Run

```bash
make test
make lint
```

### Manual Testing

<!-- Describe any manual testing performed -->

- [ ] Tested with Cursor IDE
- [ ] Tested with Claude Desktop
- [ ] Tested with HTTP client
- [ ] N/A

## Screenshots

<!-- If applicable, add screenshots to help explain your changes -->

## Checklist

<!-- Mark completed items with an "x" -->

- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Additional Notes

<!-- Add any additional notes for reviewers -->
157 changes: 157 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
GO_VERSION: '1.24'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true

- name: Run go vet
run: go vet ./...

- name: Run go fmt check
run: |
if [ -n "$(gofmt -l .)" ]; then
echo "The following files are not formatted:"
gofmt -l .
exit 1
fi

- name: Install golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
args: --timeout=5m

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true

- name: Download dependencies
run: go mod download

- name: Run tests
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.out
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test]
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true

- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
run: |
VERSION=$(cat VERSION)
GIT_COMMIT=$(git rev-parse --short HEAD)
BUILD_TIME=$(date -u '+%Y-%m-%d_%H:%M:%S')

BINARY_NAME=gomcp
if [ "$GOOS" = "windows" ]; then
BINARY_NAME=gomcp.exe
fi

go build \
-ldflags "-X github.com/NP-compete/gomcp/internal/version.Version=${VERSION} \
-X github.com/NP-compete/gomcp/internal/version.GitCommit=${GIT_COMMIT} \
-X github.com/NP-compete/gomcp/internal/version.BuildTime=${BUILD_TIME}" \
-trimpath \
-o bin/${GOOS}-${GOARCH}/${BINARY_NAME} \
./cmd/server

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gomcp-${{ matrix.goos }}-${{ matrix.goarch }}
path: bin/${{ matrix.goos }}-${{ matrix.goarch }}/
retention-days: 7

docker:
name: Docker Build
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: gomcp-server:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max

security:
name: Security Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true

- name: Run govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
Loading
Loading