Skip to content
Merged
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
36 changes: 29 additions & 7 deletions docs/user/safety-and-ecosystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,17 +218,39 @@ The Spec dashboard is available from an inspected `MCP` object. It shows:
- server status and port
- debug mode
- registered tools and descriptions
- observability enabled by default
- observability status
- per-tool timing metrics
- traces for errors, outliers, and output overruns
- recent logs

Configure `mcp monitoringExportDirectory: aDirectory` to override the default
`~/pharo-mcp-observability` export root for instance metadata,
`logs.jsonl`, `metrics.json`, and `traces.jsonl`.
MCP starts with a no-op observability backend. Enable the built-in JSON
observability backend explicitly:

```smalltalk
mcp observabilityEnabled: true
```

By default, JSON observability exports under the image-local
`pharo-local/mcp/observability` directory. Configure
`mcp observabilityExportDirectory: aDirectory` to override that export root for
instance metadata, `logs.jsonl`, `metrics.json`, and `traces.jsonl`.

OpenTelemetry support is optional. Load the `OpenTelemetry` group, then enable
the OpenTelemetry backend for an MCP instance:

```smalltalk
Metacello new
baseline: 'MCP';
repository: 'github://Evref-BL/MCP:main/src';
load: 'OpenTelemetry'.

mcp useOpenTelemetryObservability
```

## Version Compatibility

The baseline loads PharoCompatibility, JRPC, and TinyLogger. CI covers Pharo 12,
13, and 14. Code that depends on version-sensitive Pharo APIs should go through
PharoCompatibility rather than assuming the Pharo 13 API is present everywhere.
The core baseline loads PharoCompatibility, JRPC, and PCRE2.
OpenTelemetry is loaded only by the optional `OpenTelemetry` group. CI covers
Pharo 12, 13, and 14. Code that depends on version-sensitive Pharo APIs should
go through PharoCompatibility rather than assuming the Pharo 13 API is present
everywhere.
14 changes: 8 additions & 6 deletions src/BaselineOfMCP/BaselineOfMCP.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ BaselineOfMCP >> defineDependencies: spec [
spec
repository: 'github://juliendelplanque/JRPC:v3.2.1/src';
loads: #( 'Deployment' ) ];
baseline: 'TinyLogger' with: [
spec
repository: 'github://jecisc/TinyLogger:v1.x.x/src';
loads: #( 'Core' ) ];
baseline: 'PCRE2' with: [
spec
repository: 'github://Gabriel-Darbord/pharo-pcre2:v1.0.0/src';
loads: #( 'Core' ) ]
loads: #( 'Core' ) ];
baseline: 'OpenTelemetryPharo' with: [
spec
repository: 'github://Gabriel-Darbord/opentelemetry-pharo:main/src';
loads: #( 'traces' 'metrics' 'logs' ) ]
]

{ #category : 'baselines' }
Expand All @@ -42,6 +42,7 @@ BaselineOfMCP >> defineGroups: spec [
spec
group: 'Core' with: #( 'MCP' );
group: 'UI' with: #( 'MCP-UI' );
group: 'OpenTelemetry' with: #( 'MCP-OpenTelemetry' );
group: 'Tests' with: #( 'MCP-Tests-Resources' 'MCP-Tests-RunResources' 'MCP-Tests' 'MCP-Tests-Resources-Extensions' );
group: 'UI Tests' with: #( 'MCP-UI-Tests' );
group: 'default' with: #( 'Core' 'UI' 'Tests' 'UI Tests' )
Expand All @@ -51,8 +52,9 @@ BaselineOfMCP >> defineGroups: spec [
BaselineOfMCP >> definePackages: spec [
"common"

spec package: 'MCP' with: [ spec requires: #( 'PharoCompatibility' 'JRPC' 'TinyLogger' 'PCRE2' ) ].
spec package: 'MCP' with: [ spec requires: #( 'PharoCompatibility' 'JRPC' 'PCRE2' ) ].
spec package: 'MCP-UI' with: [ spec requires: #( 'MCP' ) ].
spec package: 'MCP-OpenTelemetry' with: [ spec requires: #( 'MCP' 'OpenTelemetryPharo' ) ].
spec package: 'MCP-Tests-Resources' with: [ spec requires: #( 'MCP' ) ].
spec package: 'MCP-Tests-RunResources' with: [ spec requires: #( 'MCP-Tests-Resources' ) ].
spec package: 'MCP-Tests' with: [ spec requires: #( 'MCP' 'MCP-Tests-Resources' 'MCP-Tests-RunResources' ) ].
Expand Down
8 changes: 8 additions & 0 deletions src/MCP-OpenTelemetry/MCP.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : 'MCP' }

{ #category : '*MCP-OpenTelemetry' }
MCP >> useOpenTelemetryObservability [

self observability: MCPOpenTelemetryObservabilityBackend new.
^ self observability
]
Loading
Loading