Skip to content

Commit 6d51ec0

Browse files
committed
docs: Simplify remote URL templating example
Focus the example on just demonstrating the core templating functionality rather than complex multi-transport/multi-variable scenarios. The minimal example clearly shows how {tenant_host} resolves from environmentVariables.
1 parent 32140fa commit 6d51ec0

File tree

1 file changed

+9
-79
lines changed

1 file changed

+9
-79
lines changed

docs/reference/server-json/generic-server-json.md

Lines changed: 9 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -670,102 +670,32 @@ For MCP servers that follow a custom installation path or are embedded in applic
670670
}
671671
```
672672

673-
### Multi-Tenant Remote Server with URL Templating
673+
### Remote Server with URL Templating
674674

675-
This example demonstrates how to use URL templating for remote servers deployed across multiple tenants or regions, addressing scenarios where each deployment has its own endpoint:
675+
This example demonstrates URL templating for remote servers, useful for multi-tenant deployments where each instance has its own endpoint:
676676

677677
```json
678678
{
679-
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-16/server.schema.json",
680-
"name": "io.github.example/multi-tenant-analytics",
681-
"description": "Multi-tenant analytics MCP server with region-specific endpoints",
682-
"repository": {
683-
"url": "https://github.com/example/multi-tenant-analytics",
684-
"source": "github",
685-
"id": "tenant-abc123-def456-789012-345678-901234567890"
686-
},
687-
"version": "2.1.0",
679+
"name": "io.github.example/multi-tenant-server",
680+
"description": "MCP server with configurable remote endpoint",
681+
"version": "1.0.0",
688682
"remotes": [
689683
{
690684
"type": "streamable-http",
691-
"url": "https://{tenant_host}/api/ai/v1/mcp/",
692-
"headers": [
693-
{
694-
"name": "X-API-Key",
695-
"description": "API key for authentication",
696-
"isRequired": true,
697-
"isSecret": true
698-
},
699-
{
700-
"name": "X-Region",
701-
"value": "{deployment_region}",
702-
"description": "Deployment region identifier"
703-
}
704-
],
705-
"environmentVariables": [
706-
{
707-
"name": "TENANT_HOST",
708-
"description": "Tenant-specific hostname (e.g., 'us-cell1.example.com', 'emea-cell1.example.com')",
709-
"isRequired": true
710-
},
711-
{
712-
"name": "DEPLOYMENT_REGION",
713-
"description": "Deployment region code",
714-
"default": "us-east-1",
715-
"choices": [
716-
"us-east-1",
717-
"us-west-2",
718-
"eu-west-1",
719-
"ap-southeast-1"
720-
]
721-
}
722-
],
723-
"arguments": [
724-
{
725-
"type": "positional",
726-
"valueHint": "tenant_host",
727-
"description": "Override tenant host from environment",
728-
"isRequired": false
729-
},
730-
{
731-
"type": "positional",
732-
"valueHint": "deployment_region",
733-
"description": "Override deployment region from environment",
734-
"isRequired": false
735-
}
736-
]
737-
},
738-
{
739-
"type": "sse",
740-
"url": "https://{tenant_host}/api/ai/v1/mcp/events",
685+
"url": "https://{tenant_host}/api/mcp",
741686
"environmentVariables": [
742687
{
743688
"name": "TENANT_HOST",
744-
"description": "Tenant-specific hostname",
689+
"description": "Tenant-specific hostname (e.g., 'us-cell1.example.com')",
745690
"isRequired": true
746691
}
747692
]
748693
}
749-
],
750-
"_meta": {
751-
"io.modelcontextprotocol.registry/publisher-provided": {
752-
"tool": "multi-tenant-deployer",
753-
"version": "1.5.0",
754-
"build_info": {
755-
"timestamp": "2023-12-15T10:45:00Z",
756-
"supported_tenants": ["us-cell1", "us-cell2", "emea-cell1", "apac-cell1"],
757-
"deployment_strategy": "multi-region"
758-
}
759-
}
760-
}
694+
]
761695
}
762696
```
763697

764-
This configuration allows clients to:
765-
- Set `TENANT_HOST=us-cell1.example.com` to connect to US Cell 1
766-
- Set `TENANT_HOST=emea-cell1.example.com` to connect to EMEA Cell 1
767-
- Specify the deployment region for proper routing
768-
- Use either streamable-http or SSE transports with the same tenant-specific endpoints
698+
Clients can set `TENANT_HOST=us-cell1.example.com` to connect to US Cell 1, or `TENANT_HOST=emea.example.com` to connect to the EMEA deployment. The `{tenant_host}` variable in the URL will be replaced with the environment variable value.
769699

770700
### Deprecated Server Example
771701

0 commit comments

Comments
 (0)