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
11 changes: 6 additions & 5 deletions complete.md
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ Only trusted public registries are supported. Private registries and alternative
**Supported registries:**
- **NPM**: `https://registry.npmjs.org` only
- **PyPI**: `https://pypi.org` only
- **NuGet**: `https://api.nuget.org` only
- **NuGet**: `https://api.nuget.org/v3/index.json`
- **Docker/OCI**: `https://docker.io` only
- **MCPB**: `https://github.com` releases and `https://gitlab.com` releases only

Expand Down Expand Up @@ -1549,7 +1549,8 @@ Include your server name in your package's README using this format:
Add a README file to your NuGet package that includes the server name. This can be in a comment if you want to hide it from display elsewhere.

### How It Works
- Registry fetches README from `https://api.nuget.org/v3-flatcontainer/{id}/{version}/readme`
- Registry fetches and cached service index `https://api.nuget.org/v3/index.json`
- Registry uses `ReadmeUriTemplate/6.13.0` URL template in service index to fetch README
- Passes if `mcp-name: server-name` is found in the README content

### Example server.json
Expand All @@ -1566,7 +1567,7 @@ Add a README file to your NuGet package that includes the server name. This can
}
```

The official MCP registry currently only supports the official NuGet registry (`https://api.nuget.org`).
The official MCP registry currently only supports the official NuGet registry (`https://api.nuget.org/v3/index.json`).

</details>

Expand Down Expand Up @@ -2341,7 +2342,7 @@ Suppose your MCP server application requires a `mcp start` CLI arguments to star
"packages": [
{
"registry_type": "nuget",
"registry_base_url": "https://api.nuget.org",
"registry_base_url": "https://api.nuget.org/v3/index.json",
"identifier": "Knapcode.SampleMcpServer",
"version": "0.4.0-beta",
"transport": {
Expand Down Expand Up @@ -2578,7 +2579,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
"packages": [
{
"registry_type": "nuget",
"registry_base_url": "https://api.nuget.org",
"registry_base_url": "https://api.nuget.org/v3/index.json",
"identifier": "Knapcode.SampleMcpServer",
"version": "0.5.0",
"runtime_hint": "dnx",
Expand Down
2 changes: 1 addition & 1 deletion docs/modelcontextprotocol-io/package-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ This MCP server executes SQL queries and manages database connections.

## NuGet Packages

For NuGet packages, the MCP Registry currently supports the official NuGet registry (`https://api.nuget.org`) only.
For NuGet packages, the MCP Registry currently supports the official NuGet registry (`https://api.nuget.org/v3/index.json`) only.

NuGet packages use `"registryType": "nuget"` in `server.json`. For example:

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ components:
- "https://registry.npmjs.org"
- "https://pypi.org"
- "https://docker.io"
- "https://api.nuget.org"
- "https://api.nuget.org/v3/index.json"
- "https://github.com"
- "https://gitlab.com"
identifier:
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/server-json/generic-server-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Suppose your MCP server application requires a `mcp start` CLI arguments to star
"packages": [
{
"registryType": "nuget",
"registryBaseUrl": "https://api.nuget.org",
"registryBaseUrl": "https://api.nuget.org/v3/index.json",
"identifier": "Knapcode.SampleMcpServer",
"version": "0.4.0-beta",
"transport": {
Expand Down Expand Up @@ -370,7 +370,7 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
"packages": [
{
"registryType": "nuget",
"registryBaseUrl": "https://api.nuget.org",
"registryBaseUrl": "https://api.nuget.org/v3/index.json",
"identifier": "Knapcode.SampleMcpServer",
"version": "0.5.0",
"runtimeHint": "dnx",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Only trusted public registries are supported. Private registries and alternative
**Supported registries:**
- **NPM**: `https://registry.npmjs.org` only
- **PyPI**: `https://pypi.org` only
- **NuGet**: `https://api.nuget.org` only
- **NuGet**: `https://api.nuget.org/v3/index.json` only
- **Docker/OCI**:
- Docker Hub (`docker.io`)
- GitHub Container Registry (`ghcr.io`)
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/server-json/server.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"https://registry.npmjs.org",
"https://pypi.org",
"https://docker.io",
"https://api.nuget.org",
"https://api.nuget.org/v3/index.json",
"https://github.com",
"https://gitlab.com"
],
Expand Down
58 changes: 58 additions & 0 deletions internal/database/migrations/012_fix_nuget_registry_base_url.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
-- Migration: Set NuGet package registryBaseUrl for specific server entries
--
-- This migration updates the packages[].registryBaseUrl to
-- "https://api.nuget.org/v3/index.json" for NuGet packages on a small,
-- explicitly listed set of server entries. Only packages with
-- registryType == "nuget" are modified; other package types are left
-- unchanged.
--
-- Entries to update (name, version):
-- com.joelverhagen.mcp/Knapcode.SampleMcpServer 0.7.0-beta, 0.10.0-beta.10
-- io.github.joelverhagen/Knapcode.SampleMcpServer 0.7.0-beta
-- io.github.moonolgerd/game-mcp 1.0.0
-- io.github.timheuer/sampledotnetmcpserver 0.1.56-beta-g9538a23d37, 0.1.57-beta

BEGIN;

WITH affected_entries AS (
SELECT server_name, version FROM (VALUES
('com.joelverhagen.mcp/Knapcode.SampleMcpServer', '0.7.0-beta'),
('com.joelverhagen.mcp/Knapcode.SampleMcpServer', '0.10.0-beta.10'),
('io.github.joelverhagen/Knapcode.SampleMcpServer', '0.7.0-beta'),
('io.github.moonolgerd/game-mcp', '1.0.0'),
('io.github.timheuer/sampledotnetmcpserver', '0.1.56-beta-g9538a23d37'),
('io.github.timheuer/sampledotnetmcpserver', '0.1.57-beta')
) AS t(server_name, version)
)
UPDATE servers s
SET value = jsonb_set(
s.value,
'{packages}',
(
SELECT jsonb_agg(
CASE
WHEN p->>'registryType' = 'nuget' THEN
jsonb_set(
p,
'{registryBaseUrl}',
'"https://api.nuget.org/v3/index.json"'::jsonb,
true
)
ELSE p
END
)
FROM jsonb_array_elements(s.value#>'{packages}') AS p
),
true
)
FROM affected_entries ae
WHERE s.server_name = ae.server_name
AND s.version = ae.version
AND s.value#>'{packages}' IS NOT NULL
AND EXISTS (
SELECT 1
FROM jsonb_array_elements(s.value#>'{packages}') AS p
WHERE p->>'registryType' = 'nuget' AND p->>'registryBaseUrl' IS NOT NULL
);

COMMIT;
Loading
Loading