Skip to content
Open
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
5 changes: 3 additions & 2 deletions cmd/mcp-http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/teamwork/mcp/internal/auth"
"github.com/teamwork/mcp/internal/cli"
"github.com/teamwork/mcp/internal/config"
"github.com/teamwork/mcp/internal/logsafe"
"github.com/teamwork/mcp/internal/request"
"github.com/teamwork/mcp/internal/toolsets"
"github.com/teamwork/mcp/internal/twchat"
Expand Down Expand Up @@ -321,7 +322,7 @@ func logMiddleware(logger *slog.Logger, next http.Handler) http.Handler {
slog.String("request_url", r.URL.String()),
slog.String("request_method", r.Method),
slog.Any("request_headers", headers),
slog.String("request_body", string(reqBody)),
slog.String("request_body", logsafe.String(string(reqBody))),
slog.Int("response_status", rw.StatusCode()),
slog.Any("response_headers", rw.Header()),
slog.String("response_body", string(rw.Body())),
Expand Down Expand Up @@ -388,7 +389,7 @@ func sseLogMiddleware(logger *slog.Logger, next http.Handler) http.Handler {
slog.String("request_url", r.URL.String()),
slog.String("request_method", r.Method),
slog.Any("request_headers", headers),
slog.String("request_body", string(reqBody)),
slog.String("request_body", logsafe.String(string(reqBody))),
slog.Int("response_status", rw.StatusCode()),
slog.Any("response_headers", rw.Header()),
slog.String("response_body", string(rw.Body())),
Expand Down
10 changes: 10 additions & 0 deletions cmd/mcptest/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copy this file to .env (or copy ..\sdktest\.env here) and fill in.
# .env is gitignored.

TWAPI_SERVER=https://yoursite.teamwork.com
TWAPI_TOKEN=your-token-here
PROJECT_ID=12345

# Optional: override auth detection. Defaults to basic if token starts
# with "twp_", bearer otherwise.
# TWAPI_AUTH=basic
1 change: 1 addition & 0 deletions cmd/mcptest/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
Loading