{
  "markdown": "# ICF MCP Server (Cloudflare Workers)\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for the WHO International Classification of Functioning, Disability and Health (ICF), deployed on Cloudflare Workers for global edge availability.\n\n**Live URL:** `https://mcp-icf.medseal.app/mcp`\n\n## What is ICF?\n\nThe ICF is a WHO classification that complements ICD (diagnosis codes) by describing how health conditions affect a person's functioning in daily life:\n\n- **Body Functions (b)** - Physiological and psychological functions\n- **Body Structures (s)** - Anatomical parts of the body\n- **Activities and Participation (d)** - Task execution and life involvement\n- **Environmental Factors (e)** - Physical, social, and attitudinal environment\n\n## Tool\n\nA single `icf` tool with action dispatch (token-efficient). 19 actions:\n\n### Codes & Hierarchy\n\n| Action | Description |\n|--------|-------------|\n| `lookup` | Look up a specific ICF code (e.g., `b280`, `d450`) |\n| `search` | Search by keyword (e.g., \"walking difficulty\", \"pain\") |\n| `browse` | Browse a category (`b`, `s`, `d`, `e`) or sub-chapter (`b1`, `d4`, `e3`) |\n| `children` | Get subcategories of a code |\n| `parent` | Navigate up to a code's parent category |\n| `siblings` | Codes at the same level (same parent) |\n| `chain` | Full hierarchy path from root to a code |\n| `profile` | Build a functional profile from multiple codes |\n\n### Qualifiers\n\n| Action | Description |\n|--------|-------------|\n| `qualifier` | Component-specific qualifier reference (`b`=1, `s`=3, `d`=2, `e`=barrier/facilitator) |\n| `validate` | Validate code format + qualifiers, verify existence in the WHO API |\n| `parse` | Parse fully qualified codes (`d450.23`, `s730.312`, `e120+3`) |\n\n### Clinical Assessment Instruments\n\n11 standardized RPM instruments with items, scoring, and ICF mappings:\nGAD-7, PHQ-9, RADAI-5, SLEDAI-2K, WHODAS 2.0, HAQ-DI, PROMIS-10, CAT, ODI, NRS Pain, Short FES-I.\n\n| Action | Description |\n|--------|-------------|\n| `instruments` | List instruments, optionally filtered by domain |\n| `instrument` | Full spec: items, response options, scoring, ICF mappings |\n| `score` | Score responses → severity, interpretation, ICF qualifier |\n| `suggest` | Suggest instruments for a condition, ICF code, or domain |\n| `mapping` | Show an instrument's ICF code mappings |\n\n### Meta\n\n| Action | Description |\n|--------|-------------|\n| `overview` | Full ICF classification overview |\n| `api` | Raw WHO API request (escape valve) |\n| `help` | Action reference with examples |\n\nExample call:\n\n```json\n{\"action\": \"score\", \"name\": \"GAD-7\", \"responses\": [1, 2, 1, 0, 1, 2, 1]}\n```\n\nInstrument and qualifier actions are pure logic and work without WHO API credentials; code/hierarchy actions require them.\n\n## Prerequisites\n\n1. **WHO ICD-API credentials** (free): Register at https://icd.who.int/icdapi\n2. **Cloudflare account** with Workers enabled\n3. **Node.js 18+** and npm\n\n## Installation\n\n```bash\ngit clone https://github.com/stayce/icf-mcp-cloudflare.git\ncd icf-mcp-cloudflare\nnpm install\n```\n\n## Configuration\n\n1. Copy the example environment file:\n   ```bash\n   cp .dev.vars.example .dev.vars\n   ```\n\n2. Edit `.dev.vars` with your WHO API credentials for local development.\n\n3. For production, set secrets:\n   ```bash\n   wrangler secret put WHO_CLIENT_ID\n   wrangler secret put WHO_CLIENT_SECRET\n   ```\n\n## Development\n\n```bash\nnpm run dev\n```\n\nThe server will be available at `http://localhost:8787`.\n\n## Testing\n\n```bash\nnpm test\n```\n\nRegression tests cover instrument scoring (all 11 instruments) and qualifier parsing — pure logic, no WHO API credentials needed.\n\n## Deployment\n\n```bash\nnpm run deploy\n```\n\nFor custom domain (configured in `wrangler.toml`):\n```bash\nwrangler deploy --env production\n```\n\n## Usage with Claude\n\nAdd to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"icf\": {\n      \"type\": \"url\",\n      \"url\": \"https://mcp-icf.medseal.app/mcp\"\n    }\n  }\n}\n```\n\nOr if deploying your own:\n\n```json\n{\n  \"mcpServers\": {\n    \"icf\": {\n      \"type\": \"url\",\n      \"url\": \"https://your-worker.workers.dev/mcp\"\n    }\n  }\n}\n```\n\n## Endpoints\n\n- `/` or `/health` - Health check / server info\n- `/mcp` - MCP protocol endpoint (streamable HTTP)\n\n## API Reference\n\nThis server uses the [WHO ICD-API](https://icd.who.int/icdapi) which provides programmatic access to both ICD-11 and ICF classifications.\n\n- API Documentation: https://icd.who.int/docs/icd-api/APIDoc-Version2/\n- ICF Browser: https://icd.who.int/dev11/l-icf/en\n\n## License\n\nMIT License - see [LICENSE](LICENSE)\n\n## Related\n\n- [icf-mcp-server](https://github.com/stayce/icf-mcp-server) - Python version for Claude Desktop\n",
  "bytes": 4756,
  "sha": "d6fcd4e4dff191833d7f931ad73bb41a9b379e82012a50318d5956930a7b9828",
  "repo_slug": "stayce/icf-mcp-cloudflare",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_stayce_icf_mcp_bfd909eb/readme"
}