Skip to content

Commit e72bf6f

Browse files
authored
CalmHub MCP Default Off (finos#2533)
* fix(calm-hub): default calm.mcp.enabled to false (experimental feature) * fix(calm-hub): default calm.mcp.enabled to false in TimelineTools (experimental feature) * fix(calm-hub): enable calm.mcp.enabled in MCP integration test profiles * docs(calm-hub): clarify calm.mcp.enabled gates tool invocations not HTTP endpoint
1 parent a5225d3 commit e72bf6f

15 files changed

Lines changed: 33 additions & 26 deletions

calm-hub/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,18 +214,18 @@ at [http://localhost:8080/q/dev-ui](http://localhost:8080/q/dev-ui).
214214
215215
#### Enabling / disabling
216216
217-
The whole MCP surface is gated by a single config property (default `true`):
217+
MCP is an **experimental feature** and is disabled by default. `calm.mcp.enabled` gates **tool invocations** — when `false`, every `@Tool` method returns a disabled error to the MCP client. The `/mcp` HTTP endpoint itself remains reachable regardless of this flag; network-level controls or authentication are needed to restrict endpoint access.
218218
219219
```properties
220-
calm.mcp.enabled=true
220+
calm.mcp.enabled=false
221221
```
222222

223-
Disable it from the command line or environment:
223+
Enable it from the command line or environment:
224224

225225
```shell
226-
../mvnw quarkus:dev -Dcalm.mcp.enabled=false
226+
../mvnw quarkus:dev -Dcalm.mcp.enabled=true
227227
# or
228-
export CALM_MCP_ENABLED=false
228+
export CALM_MCP_ENABLED=true
229229
```
230230

231231
#### Exposing your local MCP via ngrok
@@ -249,7 +249,7 @@ local CalmHub:
249249

250250
The ngrok URL changes each session unless you use a reserved domain.
251251

252-
> **⚠ Security note** — under the default profile the MCP endpoint runs
252+
> **⚠ Security note**when enabled, under the default profile the MCP endpoint runs
253253
> **without authentication**, the same as the default-profile REST API. The
254254
> `secure` profile enforces JWT authentication on `/mcp/*` (see
255255
> `application-secure.properties`), but does **not** yet apply per-tool
@@ -258,8 +258,8 @@ The ngrok URL changes each session unless you use a reserved domain.
258258
> follow-up. Exposing CalmHub through ngrok publishes the endpoint to the
259259
> public internet, so when demoing protect the tunnel with ngrok-side controls
260260
> (for example `ngrok http 8080 --basic-auth 'user:password'`, an OAuth edge,
261-
> or an IP allowlist), tear the tunnel down when you're done, or set
262-
> `calm.mcp.enabled=false` while the server is reachable.
261+
> or an IP allowlist), tear the tunnel down when you're done, or keep
262+
> `calm.mcp.enabled=false` (the default) while the server is reachable.
263263
264264
### Building for Deployment
265265

calm-hub/src/integration-test/java/integration/IntegrationTestProfile.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public String getConfigProfile() {
2525
public Map<String, String> getConfigOverrides() {
2626
// Enable the PUT/upsert paths so the MCP updateArchitecture tool and the
2727
// equivalent REST PUT endpoint can be exercised by the integration suite.
28-
return Map.of("allow.put.operations", "true");
28+
return Map.of(
29+
"allow.put.operations", "true",
30+
"calm.mcp.enabled", "true"
31+
);
2932
}
3033
}
3134

calm-hub/src/integration-test/java/integration/NitriteIntegrationTestProfile.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public List<TestResourceEntry> testResources() {
2525

2626
@Override
2727
public Map<String, String> getConfigOverrides() {
28-
return Map.of("allow.put.operations", "true");
28+
return Map.of(
29+
"allow.put.operations", "true",
30+
"calm.mcp.enabled", "true"
31+
);
2932
}
3033
}

calm-hub/src/main/java/org/finos/calm/mcp/tools/AdrTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class AdrTools {
3838
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper().registerModule(new JavaTimeModule());
3939

4040
@Inject
41-
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "true")
41+
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "false")
4242
boolean mcpEnabled;
4343

4444
@Inject

calm-hub/src/main/java/org/finos/calm/mcp/tools/ArchitectureTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class ArchitectureTools {
3030
private static final Logger logger = LoggerFactory.getLogger(ArchitectureTools.class);
3131

3232
@Inject
33-
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "true")
33+
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "false")
3434
boolean mcpEnabled;
3535

3636
@Inject

calm-hub/src/main/java/org/finos/calm/mcp/tools/ControlTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class ControlTools {
3030
private static final Logger logger = LoggerFactory.getLogger(ControlTools.class);
3131

3232
@Inject
33-
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "true")
33+
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "false")
3434
boolean mcpEnabled;
3535

3636
@Inject

calm-hub/src/main/java/org/finos/calm/mcp/tools/DecoratorTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class DecoratorTools {
2727
private static final Logger logger = LoggerFactory.getLogger(DecoratorTools.class);
2828

2929
@Inject
30-
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "true")
30+
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "false")
3131
boolean mcpEnabled;
3232

3333
@Inject

calm-hub/src/main/java/org/finos/calm/mcp/tools/DomainTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class DomainTools {
2525
private static final Logger logger = LoggerFactory.getLogger(DomainTools.class);
2626

2727
@Inject
28-
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "true")
28+
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "false")
2929
boolean mcpEnabled;
3030

3131
@Inject

calm-hub/src/main/java/org/finos/calm/mcp/tools/InterfaceTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class InterfaceTools {
3131
private static final Logger logger = LoggerFactory.getLogger(InterfaceTools.class);
3232

3333
@Inject
34-
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "true")
34+
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "false")
3535
boolean mcpEnabled;
3636

3737
@Inject

calm-hub/src/main/java/org/finos/calm/mcp/tools/NamespaceTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class NamespaceTools {
2525
private static final Logger logger = LoggerFactory.getLogger(NamespaceTools.class);
2626

2727
@Inject
28-
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "true")
28+
@ConfigProperty(name = "calm.mcp.enabled", defaultValue = "false")
2929
boolean mcpEnabled;
3030

3131
@Inject

0 commit comments

Comments
 (0)