Skip to content

Commit 25e1c6a

Browse files
authored
Merge pull request #4 from FreePeak/hotfix/stdio-server
Hotfix/stdio server Former-commit-id: f68a228 Former-commit-id: ee59e1b275250581dc7dbdcdb06ace01627baca2
2 parents a0d6a7d + 9e8025c commit 25e1c6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+10314
-4453
lines changed

.cursor/mcp.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"mcpServers": {
3-
"my-testing-db-mcp-server": {
4-
"url": "http://localhost:9090/sse"
3+
"stido-db-mcp-server": {
4+
"command": "/Users/harvey/Work/dev/FreePeak/Opensource/db-mcp-server/debug-mcp.sh"
55
}
66
}
77
}

.cursor/mcp.json.example

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"mcpServers": {
3+
"stido-db-mcp-server": {
4+
"command": "/Users/harvey/Work/dev/FreePeak/Opensource/db-mcp-server/debug-mcp.sh"
5+
},
6+
"sse-db-mcp-server": {
7+
"url": "http://127.0.0.1:9090/sse"
8+
},
9+
"local-sse-db-mcp-server": {
10+
"url": "http://localhost:9090/sse"
11+
}
12+
}
13+
}

.github/workflows/go.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,18 @@ jobs:
1414
- name: Set up Go
1515
uses: actions/setup-go@v4
1616
with:
17-
go-version: '1.18'
17+
go-version: '1.22'
1818
check-latest: true
1919

2020
- name: Check out code
2121
uses: actions/checkout@v3
2222

23+
- name: Update go.mod
24+
run: |
25+
go mod edit -go=1.22
26+
go mod edit -replace=github.com/mark3labs/mcp-go=./hack/mcp-go
27+
go mod tidy
28+
2329
- name: Get dependencies
2430
run: go mod download
2531

@@ -36,14 +42,20 @@ jobs:
3642
- name: Set up Go
3743
uses: actions/setup-go@v4
3844
with:
39-
go-version: '1.18'
45+
go-version: '1.22'
4046
check-latest: true
4147

4248
- name: Check out code
4349
uses: actions/checkout@v3
4450

51+
- name: Update go.mod
52+
run: |
53+
go mod edit -go=1.22
54+
go mod edit -replace=github.com/mark3labs/mcp-go=./hack/mcp-go
55+
go mod tidy
56+
4557
- name: Install golangci-lint
46-
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
58+
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.64.8
4759

4860
- name: Run golangci-lint
4961
run: golangci-lint run --timeout=5m

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
.env
2-
config/
2+
logs/

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ linters-settings:
2323
goimports:
2424
local-prefixes: github.com/FreePeak/db-mcp-server
2525
govet:
26-
check-shadowing: true
2726
revive:
2827
rules:
2928
- name: var-naming

Makefile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
.PHONY: build run-stdio run-sse clean test client client-simple test-script
1+
.PHONY: build run-stdio run-sse clean test client client-simple test-script build-example
22

33
# Build the server
44
build:
5-
go build -o mcp-server cmd/server/main.go
6-
GOOS=linux GOARCH=amd64 go build -o server cmd/server/main.go
5+
go build -o server cmd/server/main.go
6+
GOOS=linux GOARCH=amd64 go build -o server-linux cmd/server/main.go
7+
8+
# Build the example stdio server
9+
build-example:
10+
cd examples && go build -o mcp-example mcp_stdio_example.go
711

812
# Run the server in stdio mode
913
run-stdio: build
10-
./mcp-server -t stdio
14+
./server -t stdio
1115

1216
# Run the server in SSE mode
1317
run-sse: clean build
14-
./mcp-server -t sse -port 9090
18+
./server -t sse -p 9090 -h 127.0.0.1
1519

1620
# Build and run the example client
1721
client:
@@ -33,8 +37,17 @@ test:
3337

3438
# Clean build artifacts
3539
clean:
36-
rm -f mcp-server mcp-client mcp-simple-client
40+
rm -f server server-linux mcp-client mcp-simple-client
3741
# lsof -i :9090 | grep LISTEN | awk '{print $2}' | xargs kill -9
3842

43+
# Run linter
44+
lint:
45+
golangci-lint run ./...
46+
47+
# Setup
48+
setup:
49+
go mod tidy
50+
go mod download
51+
3952
# Default target
4053
all: build

0 commit comments

Comments
 (0)