registry/tests/integration
Repository files (latest commit first)
Filename Latest commit message Latest commit date
adam jones ef4607720d
Fix _meta field format for MCP spec compliance (#367)
## Summary

Updates the `_meta` field structure to be compliant with the MCP
specification by using proper `prefix/name` format for vendor
extensions.

### Changes

- **Registry metadata**: `io.modelcontextprotocol.registry` →
`io.modelcontextprotocol.registry/official`
- **Publisher metadata**: `publisher` →
`io.modelcontextprotocol.registry/publisher-provided`
- **Database migration**: Updates indexes to use new field paths
- **Updated all code**: Service layer, validators, tests, and seed data

### Format Before
```json
{
  "_meta": {
    "publisher": { "license": "MIT" },
    "io.modelcontextprotocol.registry": { "id": "...", "is_latest": true }
  }
}
```

### Format After
```json
{
  "_meta": {
    "io.modelcontextprotocol.registry/publisher-provided": { "license": "MIT" },
    "io.modelcontextprotocol.registry/official": { "id": "...", "is_latest": true }
  }
}
```

This resolves the naming collision with the planned top-level
`publisher` field and ensures compliance with MCP specification
requirements.

Fixes #356
2025-09-08 11:40:04 -07:00
..
docker-compose.integration-test.yml Add registry validators (#350) 2025-09-04 22:45:59 +01:00
main.go Fix _meta field format for MCP spec compliance (#367) 2025-09-08 11:40:04 -07:00
README.md Big docs tidy up in preparation for launch (#364) 2025-09-07 10:44:42 +01:00
run.sh Move publisher CLI from tools/ to cmd/ (#326) 2025-08-29 14:45:36 +01:00

Integration Test

This directory contains an end-to-end test for publishing to the registry.

What the Test Covers

  1. Publisher Tool: Tests the publisher CLI that publishes metadata to the registry
  2. Registry API: Validates the /v0/publish and /v0/servers/{id} endpoints work correctly
  3. Example Validation: Ensures all example JSON in docs/reference/server-json/generic-server-json.md is valid and can be published
  4. Data Consistency: Verifies published data matches what's retrieved from the registry

Test Flow

  1. Build: Build publisher and registry
  2. Start Services: Launch registry and MongoDB using Docker Compose with test configuration
  3. Publish Examples: Extract JSON examples from documentation and run publisher to publish each one
  4. Validate Responses: GET each published server from the registry and compare it to the example JSON
  5. Cleanup: Stop Docker containers and remove temporary files

How to Run

Prerequisites

  • Docker and Docker Compose
  • Go 1.24
  • Make sure you're in the repository root directory

Run the Tests

./tests/integration/run.sh