Skip to content

Commit

Permalink
🔧 Enhance path output to include IDs and classes
Browse files Browse the repository at this point in the history
  • Loading branch information
wesen committed Jan 26, 2025
1 parent 78bb780 commit aca938a
Show file tree
Hide file tree
Showing 5 changed files with 336 additions and 32 deletions.
8 changes: 8 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
- [ ] dynamic loading / enabling / removing servers
- [ ] add resource templates
- [ ] add tools from openapi json
- [ ] support openai actions protocol
- [ ] Add type field to CommandDescription to allow go-go-mcp to load any number of them (escuse-me, sqleton, pinocchio, etc...)

- [X] Allow debug logging
- [x] Implement missing SSE methods
Expand All @@ -42,3 +44,9 @@
- [ ] Make it easy to register a struct with multiple tool handlers (say, to keep a single handle to a resource), linked to the session_id
- [x] Pass the session id to the tool (maybe as part of the context?)
- [ ] Track crashes in a log file


## MCP ideas

- [ ] Diary entries / summary
- [ ] Arduino connection
29 changes: 28 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,4 +443,31 @@ Added comprehensive documentation on registering tools with MCP:
Added a simple weather tool using reflection to demonstrate tool registration.

- Added getWeather reflect tool as an example
- Added WeatherData struct for weather information
- Added WeatherData struct for weather information

## URL Content Fetching Command

Added a new shell command `fetch-url` that uses lynx to fetch and extract text content from URLs. This command is designed to be LLM-friendly with detailed descriptions and supports multiple URLs and link handling options.

- Added `examples/shell-commands/fetch-url.yaml` with comprehensive documentation
- Supports batch URL processing
- Optional link reference removal
- Simple stdout output with URL separators

## Simple Diary Command

Added a new shell command `diary-append` that appends timestamped entries to a diary file in markdown format.

- Added `examples/shell-commands/diary-append.yaml` with markdown formatting
- Automatically adds timestamps as headings
- Supports markdown in messages
- Maintains clean formatting with proper spacing

## YouTube Transcript Fetching Command

Added a new shell command `fetch-transcript` that downloads transcripts/subtitles from YouTube videos using youtube-dl.

- Added `examples/shell-commands/fetch-transcript.yaml` with comprehensive options
- Supports multiple languages and auto-generated subtitles
- Includes language listing capability
- Downloads in SRT format for easy reading
25 changes: 13 additions & 12 deletions cmd/mcp-server/cmds/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"time"

cmds2 "github.com/go-go-golems/go-go-mcp/pkg/cmds"
"github.com/go-go-golems/go-go-mcp/pkg/tools/examples"

"github.com/go-go-golems/clay/pkg/repositories"
"github.com/go-go-golems/glazed/pkg/cmds"
Expand Down Expand Up @@ -130,18 +131,18 @@ func (c *StartCommand) Run(
srv.GetRegistry().RegisterToolProvider(toolRegistry)

// Register tools (DON'T DELETE)
// if err := examples.RegisterEchoTool(toolRegistry); err != nil {
// log.Error().Err(err).Msg("Error registering echo tool")
// return err
// }
// if err := examples.RegisterFetchTool(toolRegistry); err != nil {
// log.Error().Err(err).Msg("Error registering fetch tool")
// return err
// }
// if err := examples.RegisterSQLiteTool(toolRegistry); err != nil {
// log.Error().Err(err).Msg("Error registering sqlite tool")
// return err
// }
if err := examples.RegisterEchoTool(toolRegistry); err != nil {
log.Error().Err(err).Msg("Error registering echo tool")
return err
}
if err := examples.RegisterFetchTool(toolRegistry); err != nil {
log.Error().Err(err).Msg("Error registering fetch tool")
return err
}
if err := examples.RegisterSQLiteTool(toolRegistry); err != nil {
log.Error().Err(err).Msg("Error registering sqlite tool")
return err
}
// if err := cursor.RegisterCursorTools(toolRegistry); err != nil {
// log.Error().Err(err).Msg("Error registering cursor tools")
// return err
Expand Down
104 changes: 87 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,33 +1,103 @@
module github.com/go-go-golems/go-go-mcp
module github.com/wesen/corporate-headquarters/go-go-mcp

go 1.22.3
go 1.23

toolchain go1.23.3

require (
github.com/JohannesKaufmann/html-to-markdown v1.6.0
github.com/PuerkitoBio/goquery v1.9.2
github.com/antchfx/htmlquery v1.3.0
github.com/go-go-golems/clay v0.1.20
github.com/go-go-golems/geppetto v0.4.31
github.com/go-go-golems/glazed v0.5.24
github.com/go-go-golems/go-go-mcp v0.0.0-20250124151211-78bb7804fe3a
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.1
github.com/invopop/jsonschema v0.13.0
github.com/mattn/go-sqlite3 v1.14.24
github.com/pkg/errors v0.9.1
github.com/r3labs/sse/v2 v2.10.0
github.com/rs/zerolog v1.33.0
golang.org/x/term v0.28.0
github.com/spf13/cobra v1.8.1
golang.org/x/net v0.33.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/JohannesKaufmann/html-to-markdown v1.6.0 // indirect
github.com/PuerkitoBio/goquery v1.9.2 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/adrg/frontmatter v0.2.0 // indirect
github.com/alecthomas/chroma/v2 v2.14.0 // indirect
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/antchfx/xpath v1.2.3 // indirect
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/bahlo/generic-list-go v0.2.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/buger/jsonparser v1.1.1 // indirect
github.com/charmbracelet/glamour v0.7.0 // indirect
github.com/dlclark/regexp2 v1.11.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-openapi/errors v0.22.0 // indirect
github.com/go-openapi/strfmt v0.23.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/mattn/go-sqlite3 v1.14.24 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.9.0 // indirect
golang.org/x/net v0.33.0 // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
github.com/itchyny/gojq v0.12.12 // indirect
github.com/itchyny/timefmt-go v0.1.5 // indirect
github.com/jedib0t/go-pretty v4.3.0+incompatible // indirect
github.com/kopoli/go-terminal-size v0.0.0-20170219200355-5c97524c8b54 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/spf13/cobra v1.8.1
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.3-0.20240618155329-98d742f6907a // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/richardlehane/mscfb v1.0.4 // indirect
github.com/richardlehane/msoleps v1.0.3 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.19.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tj/go-naturaldate v1.3.0 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
github.com/xuri/efp v0.0.0-20220603152613-6918739fd470 // indirect
github.com/xuri/excelize/v2 v2.7.1 // indirect
github.com/xuri/nfp v0.0.0-20220409054826-5e722a1d9e22 // indirect
github.com/yuin/goldmark v1.7.8 // indirect
github.com/yuin/goldmark-emoji v1.0.3 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit aca938a

Please sign in to comment.