@@ -3,6 +3,7 @@ package main
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "github.com/harness/harness-mcp/pkg/harness/tools"
6
7
"io"
7
8
"log"
8
9
"log/slog"
78
79
Toolsets : toolsets ,
79
80
LogFilePath : viper .GetString ("log_file" ),
80
81
Debug : viper .GetBool ("debug" ),
82
+ EnabledModules : harness .EnabledModules ,
81
83
}
82
84
83
85
if err := runStdioServer (ctx , cfg ); err != nil {
@@ -124,13 +126,14 @@ var (
124
126
125
127
cfg := config.Config {
126
128
// Common fields
127
- Version : version ,
128
- ReadOnly : true , // we keep it read-only for now
129
- Toolsets : toolsets ,
130
- LogFilePath : viper .GetString ("log_file" ),
131
- Debug : viper .GetBool ("debug" ),
132
- Internal : true ,
133
- AccountID : session .Principal .AccountID ,
129
+ Version : version ,
130
+ ReadOnly : true , // we keep it read-only for now
131
+ Toolsets : toolsets ,
132
+ EnabledModules : harness .EnabledModules ,
133
+ LogFilePath : viper .GetString ("log_file" ),
134
+ Debug : viper .GetBool ("debug" ),
135
+ Internal : true ,
136
+ AccountID : session .Principal .AccountID ,
134
137
// Internal mode specific fields
135
138
BearerToken : viper .GetString ("bearer_token" ),
136
139
PipelineSvcBaseURL : viper .GetString ("pipeline_svc_base_url" ),
@@ -342,7 +345,7 @@ func runStdioServer(ctx context.Context, config config.Config) error {
342
345
343
346
// Create server
344
347
// WithRecovery makes sure panics are logged and don't crash the server
345
- harnessServer := harness .NewServer (version , server .WithHooks (hooks ), server .WithRecovery ())
348
+ harnessServer := tools .NewServer (version , server .WithHooks (hooks ), server .WithRecovery ())
346
349
347
350
// Initialize toolsets
348
351
toolsets , err := harness .InitToolsets (& config )
@@ -354,7 +357,7 @@ func runStdioServer(ctx context.Context, config config.Config) error {
354
357
toolsets .RegisterTools (harnessServer )
355
358
356
359
// Set the guidelines prompts
357
- harness .RegisterPrompts (harnessServer )
360
+ tools .RegisterPrompts (harnessServer )
358
361
359
362
// Create stdio server
360
363
stdioServer := server .NewStdioServer (harnessServer )
0 commit comments