Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d993258
feat(ai): explicitly allow all bots and content uses
jnton Jul 27, 2026
287200a
feat(ai): advertise machine-readable agent entry points
jnton Jul 27, 2026
40f3753
feat(ai): negotiate generated Markdown for agent requests
jnton Jul 27, 2026
240dedc
feat(ai): add public machine-readable health endpoint
jnton Jul 27, 2026
fa923cd
feat(ai): publish RFC 9727 API catalog
jnton Jul 27, 2026
19f870f
feat(ai): publish MCP Server Card with real tools
jnton Jul 27, 2026
4e612c6
feat(ai): publish current MCP discovery manifest
jnton Jul 27, 2026
1f36589
feat(ai): publish A2A Agent Card
jnton Jul 27, 2026
9e1a613
feat(ai): add public A2A JSON-RPC catalogue agent
jnton Jul 27, 2026
151e7f8
feat(ai): publish catalogue Agent Skill
jnton Jul 27, 2026
8a1d1fe
feat(ai): publish Agent Skills discovery index
jnton Jul 27, 2026
1898b06
feat(ai): document authless agent access in auth.md
jnton Jul 27, 2026
9a40a83
feat(ai): expose catalogue tools through current and legacy WebMCP
jnton Jul 27, 2026
c34b876
feat(ai): register WebMCP tools on every public page
jnton Jul 27, 2026
8c658ae
feat(ai): set discovery MIME types, CORS, and cache headers
jnton Jul 27, 2026
e5415dc
fix(ai): explicitly allow top-level WebMCP tools
jnton Jul 27, 2026
ed0ee01
feat(ai): advertise MCP, A2A, discovery, and skills in llms.txt
jnton Jul 27, 2026
47bfbc6
fix(ai): avoid overriding Next.js variation headers
jnton Jul 27, 2026
60e6263
refactor(ai): share catalogue search logic across agent interfaces
jnton Jul 27, 2026
869c824
refactor(ai): reuse shared catalogue agent utilities in A2A
jnton Jul 27, 2026
a272700
refactor(ai): reuse shared catalogue utilities in WebMCP
jnton Jul 27, 2026
f7eccbc
feat(ai): include health and A2A in generated OpenAPI
jnton Jul 27, 2026
c2deed9
feat(ai): expose agent discovery links in HTML head
jnton Jul 27, 2026
c32466d
feat(ai): document all open agent interfaces on the AI page
jnton Jul 27, 2026
d28ecec
refactor(ai): simplify catalogue filter and ranking branches
jnton Jul 27, 2026
a01d95c
refactor(ai): make WebMCP registration failures observable in develop…
jnton Jul 27, 2026
644b633
refactor(ai): split A2A validation and response construction
jnton Jul 27, 2026
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
26 changes: 24 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
/** @type {import('next').NextConfig} */
const isProd = process.env.NODE_ENV === 'production';

const agentDiscoveryLinks = [
'</.well-known/api-catalog>; rel="api-catalog"; type="application/linkset+json"',
'</openapi.json>; rel="service-desc"; type="application/vnd.oai.openapi+json"',
'</ai>; rel="service-doc"; type="text/html"',
'</llms.txt>; rel="describedby"; type="text/plain"',
'</.well-known/mcp/server-card.json>; rel="service-desc"; type="application/json"',
'</.well-known/agent-card.json>; rel="service-desc"; type="application/json"',
'</.well-known/agent-skills/index.json>; rel="describedby"; type="application/json"',
].join(', ');

const nextConfig = {
poweredByHeader: false,
async redirects() {
Expand Down Expand Up @@ -57,7 +67,7 @@ const nextConfig = {
{
key: 'Permissions-Policy',
value:
'accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), browsing-topics=()',
'accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), browsing-topics=(), tools=(self)',
},
{
key: 'Cross-Origin-Opener-Policy',
Expand All @@ -71,6 +81,18 @@ const nextConfig = {
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
{
key: 'Content-Signal',
value: 'ai-train=yes, search=yes, ai-input=yes',
},
{
key: 'X-Robots-Tag',
value: 'all',
},
{
key: 'Link',
value: agentDiscoveryLinks,
},
],
},
{
Expand All @@ -97,7 +119,7 @@ const nextConfig = {
},
];
},
transpilePackages: ["framer-motion"],
transpilePackages: ['framer-motion'],
// swcMinify has been removed in Next.js 15
images: {
formats: ['image/avif', 'image/webp'],
Expand Down
83 changes: 83 additions & 0 deletions public/.well-known/agent-card.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"name": "Yourself to Science Catalogue Agent",
"description": "Searches and explains the open Yourself to Science catalogue of clinical trials, biobanks, registries, and biological or digital data donation opportunities.",
"supportedInterfaces": [
{
"url": "https://yourselftoscience.org/api/a2a",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"provider": {
"organization": "Yourself to Science",
"url": "https://yourselftoscience.org"
},
"iconUrl": "https://yourselftoscience.org/logo-tm.svg",
"version": "1.0.0",
"documentationUrl": "https://yourselftoscience.org/ai",
"capabilities": {
"streaming": false,
"pushNotifications": false,
"extendedAgentCard": false
},
"securitySchemes": {},
"securityRequirements": [],
"defaultInputModes": [
"text/plain",
"application/json"
],
"defaultOutputModes": [
"text/plain",
"application/json"
],
"skills": [
{
"id": "search-research-opportunities",
"name": "Search Research Opportunities",
"description": "Find relevant catalogue entries using free text and criteria such as country, data type, compensation, and organization category.",
"tags": [
"research participation",
"clinical trials",
"biobanks",
"data donation",
"open science"
],
"examples": [
"Find projects available in Italy that accept genetic data.",
"Show paid research-participation opportunities.",
"Which non-profit biobanks accept participants worldwide?"
],
"inputModes": [
"text/plain",
"application/json"
],
"outputModes": [
"text/plain",
"application/json"
]
},
{
"id": "explain-catalogue-resource",
"name": "Explain Catalogue Resource",
"description": "Return and summarize the structured details of one Yourself to Science catalogue resource by ID or slug.",
"tags": [
"resource details",
"eligibility context",
"scientific programmes",
"citations"
],
"examples": [
"Explain this Yourself to Science resource and what data it accepts.",
"Return the full record for a catalogue slug."
],
"inputModes": [
"text/plain",
"application/json"
],
"outputModes": [
"text/plain",
"application/json"
]
}
]
}
12 changes: 12 additions & 0 deletions public/.well-known/agent-skills/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://schemas.agentskills.io/discovery/0.2.0/schema.json",
"skills": [
{
"name": "yourself-to-science-catalogue",
"type": "skill-md",
"description": "Search and interpret the Yourself to Science open catalogue of clinical trials, biobanks, registries, and biological or digital data donation opportunities.",
"url": "/.well-known/agent-skills/yourself-to-science-catalogue/SKILL.md",
"digest": "sha256:691844baa700dd09862306b6c9d0c4f4b7bdbe926d383e0c723f2d68f35541b4"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: yourself-to-science-catalogue
description: Search and interpret the Yourself to Science open catalogue of clinical trials, biobanks, registries, and biological or digital data donation opportunities.
---

# Yourself to Science Catalogue

Use this skill when a user wants to find, compare, or understand ways to contribute data, samples, time, or participation to scientific research.

## Preferred access

1. Use the public MCP server at `https://mcp.yourselftoscience.org/mcp` when MCP is available.
2. Otherwise use `https://yourselftoscience.org/resources.json` for the complete CC0 dataset.
3. Use `https://yourselftoscience.org/openapi.json` for the machine-readable API description.
4. Use `https://yourselftoscience.org/llms.txt` for a compact documentation index.

## Search procedure

- Extract the user's requested country, data type, compensation preference, and organization category.
- Treat records with no country restriction as worldwide unless the record explicitly excludes the user's country.
- Distinguish donation, payment, and mixed compensation.
- Return the strongest matches first and include each canonical Yourself to Science resource URL.
- Preserve uncertainty when programme eligibility, availability, or enrolment status is not explicit in the catalogue.
- Never claim that a listing is medical advice, guaranteed eligibility, or currently recruiting unless the source record states it.

## Useful MCP tools

- `search_resources`: faceted catalogue search.
- `get_resource`: full record by ID or slug.
- `list_data_types`: available contribution data types.
- `list_countries`: represented availability regions.
- `get_stats`: catalogue-wide summary.
- `search` and `fetch`: citation-oriented retrieval.

## Licensing

The dataset is dedicated to the public domain under CC0 1.0. Website prose and source code have separate licences; inspect the relevant licence page before republishing them.
66 changes: 66 additions & 0 deletions public/.well-known/api-catalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"linkset": [
{
"anchor": "https://yourselftoscience.org/",
"service-desc": [
{
"href": "https://yourselftoscience.org/openapi.json",
"type": "application/vnd.oai.openapi+json"
},
{
"href": "https://yourselftoscience.org/.well-known/mcp/server-card.json",
"type": "application/json"
},
{
"href": "https://yourselftoscience.org/.well-known/agent-card.json",
"type": "application/json"
}
],
"service-doc": [
{
"href": "https://yourselftoscience.org/ai",
"type": "text/html"
},
{
"href": "https://yourselftoscience.org/llms.txt",
"type": "text/plain"
}
],
"status": [
{
"href": "https://yourselftoscience.org/api/health",
"type": "application/json"
}
],
"describedby": [
{
"href": "https://yourselftoscience.org/.well-known/agent-skills/index.json",
"type": "application/json"
},
{
"href": "https://yourselftoscience.org/datapackage.json",
"type": "application/json"
},
{
"href": "https://yourselftoscience.org/void.ttl",
"type": "text/turtle"
}
]
},
{
"anchor": "https://mcp.yourselftoscience.org/mcp",
"service-desc": [
{
"href": "https://yourselftoscience.org/.well-known/mcp/server-card.json",
"type": "application/json"
}
],
"service-doc": [
{
"href": "https://yourselftoscience.org/ai",
"type": "text/html"
}
]
}
]
}
17 changes: 17 additions & 0 deletions public/.well-known/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "org.yourselftoscience/catalogue",
"title": "Yourself to Science",
"description": "Search an open CC0 catalogue of clinical trials, biobanks, registries, and biological or digital data donation programs.",
"repository": {
"url": "https://github.com/yourselftoscience/yourselftoscience.org",
"source": "github"
},
"version": "1.0.0",
"remotes": [
{
"type": "streamable-http",
"url": "https://mcp.yourselftoscience.org/mcp"
}
]
}
Loading