Add example servers for SEP-2053 variant patterns (#4)
Add four new example servers demonstrating different SEP-2053 variant patterns: - model-optimized (same tools, different descriptions per LLM family) - trading (API versioning with deprecation lifecycle) - research (context budget management) - Refactor the existing variants-http example into a GitHub-style server with custom ranking. Signed-off-by: Kurt Degiorgio <kdegiorgio@bloomberg.net>
This commit is contained in:
parent
c01fd188d2
commit
e1c17e047f
1 changed files with 1218 additions and 147 deletions
36
go/sdk/examples/server/trading/README.md
Normal file
36
go/sdk/examples/server/trading/README.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# Trading Platform
|
||||
|
||||
A variant-aware MCP server demonstrating API versioning and lifecycle management. Uses all three variant statuses (`stable`, `experimental`, `deprecated`) and `DeprecationInfo` to guide clients through API migrations.
|
||||
|
||||
**Pattern demonstrated:** Variant lifecycle, deprecation info, API versioning.
|
||||
|
||||
## Variants
|
||||
|
||||
| Variant | Status | Tools | Description |
|
||||
|---|---|---|---|
|
||||
| `v2-stable` | Stable | `place_order`, `get_quotes`, `get_portfolio`, `cancel_order` | Production API |
|
||||
| `v3-preview` | Experimental | `place_order_v3`, `stream_quotes`, `get_portfolio_v3` | Next-gen API with streaming |
|
||||
| `v1-legacy` | Deprecated | `trade`, `quote`, `balance` | Legacy API, removal date 2026-06-30 |
|
||||
| `analysis-only` | Stable | `get_quotes`, `get_portfolio`, `get_historical_data` | Read-only analytics subset |
|
||||
|
||||
## Deprecation Info
|
||||
|
||||
The `v1-legacy` variant includes `DeprecationInfo` with a replacement and scheduled removal date, demonstrating how servers communicate migration paths to clients:
|
||||
|
||||
```json
|
||||
{
|
||||
"deprecationInfo": {
|
||||
"message": "v1 API is deprecated. Migrate to v2-stable for improved order types, multi-symbol quotes, and portfolio tracking.",
|
||||
"replacement": "v2-stable",
|
||||
"removalDate": "2026-06-30"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
go run ./examples/server/trading
|
||||
```
|
||||
|
||||
The server listens on `http://localhost:8080`.
|
||||
Loading…
Reference in a new issue