Download the PHP package automattic/wp-feature-api without Composer

On this page you can find all versions of the php package automattic/wp-feature-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-feature-api

WordPress Feature API

The WordPress Feature API is a system for exposing WordPress functionality in a standardized, discoverable way for both server and client-side use. It's designed to make WordPress functionality accessible to AI systems (particularly LLMs) and developers through a unified registry of resources and tools.

Key Features

Project Structure

This project is structured as a monorepo using npm workspaces:

MCP

It relies heavily on the MCP Specification, however it's tailored to the needs of WordPress. Since WordPress is by nature both the server and the client, the Feature API is designed to be used in both contexts, and leverage existing WordPress functionality.

Features may surface in an actual WP MCP server consumed by an external MCP client. The main difference is that the features are compatible across the server and client, allowing for WordPress to execute features itself on both the backend and frontend.

Note, this does not implement the MCP server and transport layer. However, the feature registry may be used by an MCP server like Automattic's wordpress-mcp plugin.

Features are not limited to LLM consumption and can be used throughout WordPress directly as a primitive API for generic functionality. Hence the more generic name of "Feature API" instead of "MCP API".

Filtering

An important aspect of the Feature API is its ability to filter features manually and automatically. Since the success of an LLM agent will depend on the quality of tools that match the user's intent or current context within WordPress, the Feature API provides several mechanisms to ensure that the right tools are available at the right time.

Filtering can be done by:

Getting Started

Development

Installation

  1. Clone the repository.
  2. Run npm run setup to install all dependencies (both PHP and JavaScript).

Building

Run npm run build from the root directory. This command will build all the JavaScript packages (client, client-features, demo) and the main plugin script (src/index.js).

Using WordPress Feature API in Your Plugin via Composer

Plugin developers should include the WordPress Feature API in their plugins using Composer. The Feature API will automatically handle version conflicts when multiple plugins include it.

1. Add as a Composer dependency

2. Load the Feature API in your plugin

To safely load the Feature API:

Running the Demo

  1. Ensure dependencies are installed and code is built (see above).
  2. Use @wordpress/env (or your preferred local WordPress environment such as Studio) to start WordPress. You can use npm run wp-env start from the root directory.
  3. Activate the "WordPress Feature API" plugin.
  4. The demo plugin (wp-feature-api-agent) should load automatically (controlled by the WP_FEATURE_API_LOAD_DEMO constant in wp-feature-api.php). You should see an admin notice confirming this.
  5. Navigate to the "WP Feature Agent Demo" page added under the Settings menu in the WordPress admin to configure your OpenAI API key.
  6. Refresh and see the AI Agent chat interface.
  7. Ask the AI Agent questions about your WordPress site and features. It has access to both server-side and client-side features.

Contributing

We welcome contributions! Please see our CONTRIBUTING.md for details on how to contribute to this project.


All versions of wp-feature-api with dependencies

PHP Build Version
Package Version
Requires ext-hash Version *
ext-json Version *
php Version >=7.2.24
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package automattic/wp-feature-api contains the following files

Loading the files please wait ....