9 Commits

Author SHA1 Message Date
appleboy
5dbfe21127 refactor: refactor logging and server setup for clarity and structure (#64)
- Refactor server initialization calls in Run to use multiline construction style and explicitly pass options in HTTP mode
- Fix logic in Default to prevent redundant logger initialization
- Remove unused Logger function and introduce a Logger struct with Infof and Errorf methods for structured logging
- Add a New function for creating instances of the Logger struct

Signed-off-by: appleboy <appleboy.tw@gmail.com>

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/64
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-06-22 10:27:09 +00:00
Bo-Yi Wu
94aa8dc572 fix: harden log directory creation and path resolution (#61)
- Ensure the log directory is created with secure permissions, falling back to the temp directory if creation fails
- Update log file path to use the resolved log directory

fix https://gitea.com/gitea/gitea-mcp/issues/58

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/61
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-committed-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-06-13 19:30:14 +00:00
appleboy
f25cc0de8c feat: add HTTP server mode with updated docs and localization (#45)
- Update download instructions for clarity and consistency in all README files
- Add example configuration for HTTP mode to all README files
- Expand transport type support to include "http" in command-line flags and documentation
- Implement HTTP server mode in the application entrypoint
- Update log output behavior to include "http" mode alongside "sse" for stdout logging
- Refine Chinese README translations for greater accuracy and localization

Signed-off-by: appleboy <appleboy.tw@gmail.com>

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/45
Co-authored-by: appleboy <appleboy.tw@gmail.com>
Co-committed-by: appleboy <appleboy.tw@gmail.com>
2025-05-27 12:17:37 +00:00
hiifong
e3307adbdf Add Dockerfile (#16)
Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/16
Co-authored-by: hiifong <f@ilo.nz>
Co-committed-by: hiifong <f@ilo.nz>
2025-04-06 04:54:56 +00:00
hiifong
afada4435e Add Dockerfile (#15)
Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/15
Co-authored-by: hiifong <f@ilo.nz>
Co-committed-by: hiifong <f@ilo.nz>
2025-04-06 04:46:27 +00:00
hiifong
5bbf8e0afb Add Dockerfile (#13)
Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/13
Co-authored-by: hiifong <f@ilo.nz>
Co-committed-by: hiifong <f@ilo.nz>
2025-04-06 04:06:34 +00:00
hiifong
72d9b5a8dd Add debug mode and upgrade mcp-go to v0.14.1 2025-03-20 23:01:05 +08:00
appleboy
c52f8649a2 refactor: add hot reloading and improve logging functions
- Add command to install `air` for hot reloading in `Makefile`
- Add `dev` command to run the application with hot reload in `Makefile`
- Add `vendor` command to tidy and verify module dependencies in `Makefile`
- Update log synchronization method to use `log.Default().Sync()` in `cmd/cmd.go`
- Change variadic parameter type from `interface{}` to `any` in logging functions
- Remove `Sync` function from `pkg/log/log.go`

ref: https://github.com/uber-go/zap/issues/880
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-03-16 14:18:58 +08:00
hiifong
2dd4aa94ad Initialize commit 2025-03-16 00:21:29 +08:00