Skip to content

Commit

Permalink
🚜 Move client into go-go-mcp
Browse files Browse the repository at this point in the history
  • Loading branch information
wesen committed Feb 10, 2025
1 parent 60c3fd1 commit 807663f
Show file tree
Hide file tree
Showing 23 changed files with 89 additions and 848 deletions.
6 changes: 3 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 2
project_name: XXX
project_name: go-go-mcp

before:
hooks:
Expand All @@ -10,8 +10,8 @@ before:
builds:
- env:
- CGO_ENABLED=0
main: ./cmd/XXX
binary: XXX
main: ./cmd/go-go-mcp
binary: go-go-mcp
goos:
- linux
# I am not able to test windows at the time
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/mcp-server",
"args": ["start", "--transport", "sse", "--repositories", "examples/html-extract", "--log-level", "debug"],
"program": "${workspaceFolder}/cmd/go-go-mcp",
"args": ["start", "--transport", "sse", "--repositories", "examples/prompto", "--log-level", "debug", "--port", "3000"],
"cwd": "${workspaceFolder}"
},
{
Expand Down Expand Up @@ -65,7 +65,7 @@
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/mcp-server",
"program": "${workspaceFolder}/cmd/go-go-mcp",
"args": ["run-command", "examples/html-extract/fetch-html.yaml", "--urls", "https://news.ycombinator.com/"],
"cwd": "${workspaceFolder}"
},
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ tag-patch:

release:
git push --tags
GOPROXY=proxy.golang.org go list -m github.com/go-go-golems/XXX@$(shell svu current)
GOPROXY=proxy.golang.org go list -m github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp@$(shell svu current)

bump-glazed:
go get github.com/go-go-golems/glazed@latest
go get github.com/go-go-golems/clay@latest
go mod tidy

XXX_BINARY=$(shell which XXX)
go-go-mcp_BINARY=$(shell which go-go-mcp)
install:
go build -o ./dist/XXX ./cmd/XXX && \
cp ./dist/XXX $(XXX_BINARY)
go build -o ./dist/go-go-mcp ./cmd/go-go-mcp && \
cp ./dist/go-go-mcp $(go-go-mcp_BINARY)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ First, build both the client and server:

```bash
# Build the client
go build -o mcp-client ./cmd/mcp-client/main.go
go build -o mcp-client ./cmd/go-go-mcp/client/main.go

# Build the server
go build -o mcp-server ./cmd/mcp-server/main.go
go build -o mcp-server ./cmd/go-go-mcp/main.go
```

### Basic Usage
Expand Down
69 changes: 65 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Added GitHub Pull Request Listing Command

Added a new command to list pull requests from GitHub repositories:
- Created list-github-pull-requests command with support for filtering by state, assignee, author, labels, and base branch
- Added draft PR filtering support
- Included comprehensive JSON output options for PR-specific fields

# Added Shell Tool Provider Debug Flags

Added command line flags to control ShellToolProvider debugging and tracing:
Expand Down Expand Up @@ -403,10 +410,10 @@ Refactored the start and schema commands to use the Glazed command framework for

# Extract start and schema commands to separate files

Moved start and schema commands to their own files in cmd/mcp-server/cmds for better code organization and maintainability.
Moved start and schema commands to their own files in cmd/go-go-mcp/cmds for better code organization and maintainability.

- Created cmd/mcp-server/cmds/start.go for start command
- Created cmd/mcp-server/cmds/schema.go for schema command
- Created cmd/go-go-mcp/cmds/start.go for start command
- Created cmd/go-go-mcp/cmds/schema.go for schema command
- Updated main.go to use the extracted commands
- Improved code organization and readability

Expand Down Expand Up @@ -711,4 +718,58 @@ HTML Selector Template Control
Added ability to disable template rendering in the HTML selector tool.

- Added --no-template flag to disable template rendering
- Template rendering can now be explicitly disabled even when config file or extract options are used
- Template rendering can now be explicitly disabled even when config file or extract options are used

## PubMed Search Command

Added a new shell command for searching PubMed and extracting structured data from search results.

- Added `examples/html-extract/pubmed.yaml` with search term and config file parameters
- Support for configurable maximum pages to scrape

## Prompto Shell Commands

Added shell command wrappers for prompto CLI:
- `prompto-list.yaml`: Lists all prompto entries
- `prompto-get.yaml`: Retrieves a specific prompto entry

## RAG Shell Commands

Added shell command wrappers for mento-service RAG operations:
- `rag-recent-documents.yaml`: Lists recent documents in the RAG system
- `rag-search.yaml`: Searches documents in the RAG system with a query

## Coaching Conversation Tools

Added shell command wrappers for accessing coaching conversation history:
- `recent-coaching-conversations.yaml`: Lists recent coaching conversations with detailed metadata
- `search-coaching-conversations.yaml`: Performs semantic search through coaching conversation history

These tools are specifically designed for LLMs to use in the context of coaching discussions.

## Google Calendar Integration

Added a new shell command for retrieving Google Calendar agenda using gcalcli with configurable date ranges.

- Added `examples/google/get-calendar.yaml` with support for custom start and end dates
- Added `examples/google/add-calendar-event.yaml` with comprehensive event creation options
- Added `examples/google/search-calendar.yaml` with extensive search and display options

## GitHub Issue Management

Added shell command for listing GitHub issues with comprehensive filtering options:
- Added `examples/github/list-issues.yaml` with support for filtering by state, assignee, author, labels, etc.
- Added JSON output formatting and web browser viewing options

# Fix string joining in GitHub issues list command
Fixed the join syntax in the GitHub issues list command template to use proper Go template string joining.

- Fixed join syntax in list-github-issues.yaml to use printf with join function

## Merge MCP Client into Server

Merged the MCP client functionality into the server as a subcommand for better code organization and maintainability.

- Moved client commands to `cmd/go-go-mcp/cmds/client/`
- Added client subcommand to server binary
- Updated package names and imports
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmds

import (
"github.com/go-go-golems/glazed/pkg/help"
"github.com/go-go-golems/go-go-mcp/cmd/mcp-server/cmds/client"
"github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp/cmds/client"
"github.com/spf13/cobra"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

glazed_layers "github.com/go-go-golems/glazed/pkg/cmds/layers"
"github.com/go-go-golems/go-go-mcp/cmd/mcp-client/cmds/layers"
"github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp/cmds/client/layers"
"github.com/go-go-golems/go-go-mcp/pkg/client"
"github.com/go-go-golems/go-go-mcp/pkg/protocol"
"github.com/rs/zerolog/log"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"github.com/go-go-golems/glazed/pkg/cli"
"github.com/go-go-golems/glazed/pkg/cmds"
glazed_layers "github.com/go-go-golems/glazed/pkg/cmds/layers"
"github.com/go-go-golems/go-go-mcp/cmd/mcp-client/cmds/layers"
"github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp/cmds/client/layers"

"github.com/go-go-golems/glazed/pkg/cmds/parameters"
"github.com/go-go-golems/glazed/pkg/middlewares"
"github.com/go-go-golems/glazed/pkg/settings"
"github.com/go-go-golems/glazed/pkg/types"
"github.com/go-go-golems/go-go-mcp/cmd/mcp-client/cmds/helpers"
"github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp/cmds/client/helpers"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/go-go-golems/glazed/pkg/middlewares"
"github.com/go-go-golems/glazed/pkg/settings"
"github.com/go-go-golems/glazed/pkg/types"
"github.com/go-go-golems/go-go-mcp/cmd/mcp-client/cmds/helpers"
"github.com/go-go-golems/go-go-mcp/cmd/mcp-client/cmds/layers"
"github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp/cmds/client/helpers"
"github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp/cmds/client/layers"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/go-go-golems/glazed/pkg/middlewares"
"github.com/go-go-golems/glazed/pkg/settings"
"github.com/go-go-golems/glazed/pkg/types"
"github.com/go-go-golems/go-go-mcp/cmd/mcp-client/cmds/helpers"
"github.com/go-go-golems/go-go-mcp/cmd/mcp-client/cmds/layers"
"github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp/cmds/client/helpers"
"github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp/cmds/client/layers"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 4 additions & 10 deletions cmd/mcp-server/main.go → cmd/go-go-mcp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/go-go-golems/glazed/pkg/cmds/alias"
"github.com/go-go-golems/glazed/pkg/cmds/loaders"
"github.com/go-go-golems/glazed/pkg/help"
server_cmds "github.com/go-go-golems/go-go-mcp/cmd/mcp-server/cmds"
server_cmds "github.com/go-go-golems/go-go-mcp/cmd/go-go-mcp/cmds"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
Expand All @@ -35,9 +35,9 @@ var (
)

var rootCmd = &cobra.Command{
Use: "mcp-server",
Short: "MCP server implementation in Go",
Long: `A Model Context Protocol (MCP) server implementation in Go.
Use: "go-go-mcp",
Short: "MCP client and server implementation in Go",
Long: `A Model Context Protocol (MCP) client and server implementation in Go.
Supports both stdio and SSE transports for client-server communication.
The server implements the Model Context Protocol (MCP) specification,
Expand Down Expand Up @@ -66,12 +66,6 @@ func initRootCmd() (*help.HelpSystem, error) {
helpSystem := help.NewHelpSystem()
helpSystem.SetupCobraRootCommand(rootCmd)

rootCmd.PersistentFlags().StringVarP(&transport, "transport", "t", "stdio", "Transport to use (stdio or sse)")
rootCmd.PersistentFlags().IntVarP(&port, "port", "p", 8080, "Port to listen on (for sse transport)")
rootCmd.PersistentFlags().BoolVarP(&debug, "debug", "d", false, "Enable debug mode")
rootCmd.PersistentFlags().StringVar(&logLevel, "log-level", "info", "Log level (debug, info, warn, error)")
rootCmd.PersistentFlags().BoolVar(&withCaller, "with-caller", false, "Log caller information")

err := clay.InitViper("mcp", rootCmd)
if err != nil {
return nil, err
Expand Down
Loading

0 comments on commit 807663f

Please sign in to comment.