Skip to main content

Extension Types

Qwen Code extensions support five main types of capabilities. Each type serves a different purpose and can be combined within a single extension.

MCP Servers

Model Context Protocol (MCP) servers add new tools that the AI can use to interact with external services, APIs, or perform specialized operations.

What are MCP Servers?

  • Standalone processes that communicate via stdio
  • Provide tools (functions) the AI can call
  • Can expose prompts and resources
  • Run continuously during your session

Use Cases

  • Fetch data from external APIs
  • Interact with databases
  • Control external services (deployment, monitoring)
  • Process files in specialized formats
  • Integrate with third-party tools

Example

Learn more: Creating MCP Server Extensions

Custom Commands

Custom commands are shortcuts for complex prompts that can be invoked with slash syntax.

What are Custom Commands?

  • Markdown files with optional YAML frontmatter
  • Can include template variables with {{args}}
  • Can execute shell commands with !{command}
  • Support nested directory structure for organization

Use Cases

  • Create project-specific workflows
  • Package common development patterns
  • Automate repetitive tasks
  • Build domain-specific helpers

Example

Invoked as: /fs:grep-code "TODO" Learn more: Creating Command Extensions

Skills

Skills are specialized capabilities that the AI can automatically invoke when relevant to the user’s request.

What are Skills?

  • Model-invoked capabilities (not user-invoked)
  • Defined in SKILL.md files with YAML frontmatter
  • Discovered automatically when extension is loaded
  • Available via /skills command to view/manage

Use Cases

  • Add domain-specific expertise
  • Provide specialized analysis capabilities
  • Enable automatic workflow handling
  • Extend AI reasoning for specific tasks

Example

Learn more: Creating Skill Extensions

Subagents (Agents)

Subagents are specialized AI assistants configured for specific tasks with their own system prompts and tool access.

What are Subagents?

  • Markdown or YAML files defining agent behavior
  • YAML frontmatter specifies name, tools, model config
  • Content contains system prompt instructions
  • Appear in agent manager dialog

Use Cases

  • Create task-specific AI experts
  • Define consistent behavior patterns
  • Package reusable AI workflows
  • Share specialized assistants

Example

Learn more: Creating Agent Extensions

Context Providers

Context providers supply persistent context to the model through a QWEN.md file that’s loaded in every session.

What are Context Providers?

  • Markdown file loaded into system context
  • Always available to the AI
  • Useful for instructions and documentation
  • Can describe extension capabilities

Use Cases

  • Provide usage instructions for extension tools
  • Define behavioral guidelines
  • Document project conventions
  • Add domain knowledge

Example

Learn more: Creating Context Provider Extensions

Settings

Extension settings allow you to configure API keys, credentials, and other values securely.

What are Settings?

  • Defined in qwen-extension.json
  • Prompted during installation
  • Stored securely (sensitive values in keychain)
  • Passed as environment variables to MCP servers

Use Cases

  • Store API keys and tokens
  • Configure service endpoints
  • Set user preferences
  • Provide credentials

Example

Manage with:

Combining Extension Types

You can combine multiple types in a single extension:
This creates a comprehensive extension with tools, commands, AI capabilities, and secure configuration.

Next Steps