Skip to main content

MCP Publishing

ValkyrAI can publish REST endpoints and workflows as discoverable MCP services. Published services become catalog entries that tools such as ValorIDE can discover and invoke.

Publish a REST Controller

curl -X POST http://localhost:8080/v1/mcp/publish-rest-endpoint \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <JWT_TOKEN>" \
-d '{
"controllerPath": "com.valkyrlabs.files.api.FileController",
"toolSlug": "file-service",
"displayName": "File Service",
"category": "UTILITY",
"apiBaseUrl": "http://localhost:8080",
"summary": "Create file upload sessions and complete stored file operations",
"tags": ["files", "uploads"],
"authorName": "ValkyrAI Team",
"autoApprove": true
}'

Publish a Workflow

curl -X POST http://localhost:8080/v1/mcp/publish-workflow \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <JWT_TOKEN>" \
-d '{
"workflowId": "workflow-123",
"toolSlug": "email-campaign",
"displayName": "Email Campaign Launcher",
"category": "AUTOMATION",
"description": "Send targeted email campaigns to user segments",
"tags": ["email", "marketing", "automation"]
}'

Publish Response

A successful publish returns service identity, slug, status, manifest URL, and endpoint count.

{
"serviceId": "550e8400-e29b-41d4-a716-446655440000",
"slug": "file-service",
"status": "PUBLISHED",
"manifestUrl": "http://localhost:8080/v1/mcp/services/file-service/manifest.yaml",
"message": "Successfully published 12 endpoint(s) as MCP tools"
}

Related: