Skip to content

feat: Serve Apify Skills through MCP Server (SEP-2640) #761

@vystrcild

Description

@vystrcild

TL;DR

Extend the existing resources implementation in Apify MCP Server to serve Apify Skills under skill:// URIs, aligning with SEP-2640 (Skills Extension). Skills become discoverable and readable by any MCP client through the same server connection that exposes Actor tools — no separate install, no SKILL.md client support required.

Context

External:

Current state of apify-mcp-server:

  • resources capability already declared (src/mcp/server.ts, currently empty {})
  • setupResourceHandlers() already wired with ListResourcesRequestSchema and ReadResourceRequestSchema
  • ResourceService (src/resources/resource_service.ts) currently exposes:
    • Skyfire usage guide (file://readme.md, gated by skyfireMode)
    • OpenAI UI widgets (ui://widget/..., gated by uiMode === "openai")
  • No resource templates, no subscriptions, no notifications

Decision

Skills served via MCP must be MCP-native — they invoke MCP tools (apify_call_actor etc.), not the Apify CLI. A user installing the MCP Server is opting into MCP-based integration; serving skills that route execution through a separate CLI install would contradict the install and confuse agents that already have the relevant tools loaded.

The standalone apify/agent-skills repo (CLI-flavored, filesystem install) is unaffected and stays as-is.

Implementation Plan

Phase 1 — Skill resource type in ResourceService

Extend ResourceService to expose Apify Skills as a new resource type:

  • URI scheme: skill:// (per SEP-2640; design already merged in the experimental working group repo)
  • URI shape: skill://<skill-name>/SKILL.md, with the final path segment matching the skill's frontmatter name
  • ListResourcesRequestSchema returns skill entries alongside existing Skyfire/widget entries
  • ReadResourceRequestSchema returns skill content

Phase 2 — Author MCP-native skills (@vystrcild)

Convert the 4 official skills to MCP-native execution (replace apify actors call ... invocations with apify_call_actor MCP tool calls):

  • apify-ultimate-scraper
  • apify-actor-development
  • apify-actorization
  • apify-generate-output-schema

Phase 3 — Discovery index

Serve skill://index.json resource matching the SEP-2640 format. Entries carry url + type ("skill-md" for concrete URIs, "mcp-resource-template" for templates).

Phase 4 — Verify on SEP merge

When SEP-2640 merges, validate skill://index.json against final spec. The URI scheme itself is stable; only index format edge cases may need adjustment.

Constraints

  1. Final URI path segment MUST equal frontmatter name (skill://maps-scraper/SKILL.mdname: maps-scraper).
  2. No executable hooks in skill content. SEP-2640 forbids hosts from auto-running them (RCE vector). Stay instruction-only.
  3. resources/read works directly by URI, regardless of whether the skill is in the index.

Metadata

Metadata

Assignees

Labels

t-aiIssues owned by the AI team.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions