Prepare docs for modelcontextprotocol.io (#728)
This PR reorganizes and extends the existing documentation in preparation for publishing on https://modelcontextprotocol.io/. The current plan is for docs to remain in this repo, and be synced to the `modelcontextprotocol/modelcontextprotocol` whenever necessary (e.g., accompanying a release of the registry). I have included a script in https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1725 (`bin/pull-registry-docs.sh`) that can be run manually to perform the sync. If we later decide to permanently move the docs to the `modelcontextprotocol/modelcontextprotocol` repo, that also works. This PR puts all https://modelcontextprotocol.io/ docs into `docs/modelcontextprotocol-io/`. Docs outside that subdirectory, such as `docs/administration/admin-operations.md`, are intended to be accessible solely via this repo. One major exception is the `docs/reference/server-json/` subdirectory, which will depend on the resolution of https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1649. However, I think we could address that in a follow-up PR. --------- Co-authored-by: Adam Jones <adamj+git@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3d3337942b
commit
43d41a242e
1 changed files with 1606 additions and 1397 deletions
|
|
@ -41,7 +41,17 @@ func runValidation() error {
|
|||
expectedCount: &expectedServerJSONCount,
|
||||
},
|
||||
{
|
||||
path: filepath.Join("docs", "guides", "publishing", "publish-server.md"),
|
||||
path: filepath.Join("docs", "modelcontextprotocol-io", "package-types.mdx"),
|
||||
requireSchema: true,
|
||||
expectedCount: nil, // No count validation for guide
|
||||
},
|
||||
{
|
||||
path: filepath.Join("docs", "modelcontextprotocol-io", "quickstart.mdx"),
|
||||
requireSchema: true,
|
||||
expectedCount: nil, // No count validation for guide
|
||||
},
|
||||
{
|
||||
path: filepath.Join("docs", "modelcontextprotocol-io", "remote-servers.mdx"),
|
||||
requireSchema: true,
|
||||
expectedCount: nil, // No count validation for guide
|
||||
},
|
||||
|
|
@ -182,7 +192,7 @@ func extractExamples(path string, requireSchema bool) ([]example, error) {
|
|||
content := string(data)
|
||||
|
||||
// Regex to match JSON code blocks in markdown
|
||||
re := regexp.MustCompile("(?s)```json\r?\n(.*?)\r?\n```")
|
||||
re := regexp.MustCompile("(?s)```json(?: [^\r\n]+)?\r?\n(.*?)\r?\n```")
|
||||
matches := re.FindAllStringSubmatchIndex(content, -1)
|
||||
|
||||
var examples []example
|
||||
|
|
|
|||
Loading…
Reference in a new issue