feat: implement DNS namespace validation and remote URL uniqueness checks (#306)
## Summary - Add reverse-DNS namespace format validation for server names (namespace/name) - Validate remote URLs match the DNS namespace derived from hostname - Prevent duplicate remote URLs across different servers - Support localhost/development URLs without namespace restrictions - Add comprehensive test coverage for validation logic - Update database layer to support remote_url filtering Fixes #180 by ensuring proper namespace governance and preventing URL conflicts. --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d663406280
commit
923b2e07b9
1 changed files with 497 additions and 29 deletions
|
|
@ -186,7 +186,7 @@ This will essentially instruct the MCP client to execute `dnx Knapcode.SampleMcp
|
|||
```json
|
||||
{
|
||||
"server": {
|
||||
"name": "com.example/mcp-fs",
|
||||
"name": "io.modelcontextprotocol.anonymous/mcp-fs",
|
||||
"description": "Cloud-hosted MCP filesystem server",
|
||||
"repository": {
|
||||
"url": "https://github.com/example/remote-fs",
|
||||
|
|
@ -199,7 +199,7 @@ This will essentially instruct the MCP client to execute `dnx Knapcode.SampleMcp
|
|||
"remotes": [
|
||||
{
|
||||
"transport_type": "sse",
|
||||
"url": "http://mcp-fs.example.com/sse"
|
||||
"url": "http://mcp-fs.anonymous.modelcontextprotocol.io/sse"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -418,7 +418,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
|
|||
```json
|
||||
{
|
||||
"server": {
|
||||
"name": "com.example/hybrid-mcp",
|
||||
"name": "io.modelcontextprotocol.anonymous/hybrid-mcp",
|
||||
"description": "MCP server available as both local package and remote service",
|
||||
"repository": {
|
||||
"url": "https://github.com/example/hybrid-mcp",
|
||||
|
|
@ -448,7 +448,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
|
|||
"remotes": [
|
||||
{
|
||||
"transport_type": "sse",
|
||||
"url": "https://mcp.example.com/sse",
|
||||
"url": "https://mcp.anonymous.modelcontextprotocol.io/sse",
|
||||
"headers": [
|
||||
{
|
||||
"name": "X-API-Key",
|
||||
|
|
@ -466,7 +466,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
|
|||
},
|
||||
{
|
||||
"transport_type": "streamable",
|
||||
"url": "https://mcp.example.com/http"
|
||||
"url": "https://mcp.anonymous.modelcontextprotocol.io/http"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue