mcp-rs
Provides read-only SQL tools for a MariaDB database, including execute_query and get_schema, with optional write access via execute_command when allow_write is enabled.
Provides read-only SQL tools for a MySQL database, including execute_query and get_schema, with optional write access via execute_command when allow_write is enabled.
Provides read-only SQL tools for a PostgreSQL database, including execute_query and get_schema, with optional write access via execute_command when allow_write is enabled.
Provides 41 WordPress REST API tools for managing posts, pages, custom post types, media, categories, tags, taxonomies, comments, site settings, revisions, featured images, and health checks, plus prompts for drafting, SEO review, and moderation.
mcp-rs
A Rust implementation of a Model Context Protocol (MCP) server that gives AI clients tools for WordPress, databases (PostgreSQL, MySQL, MariaDB), and external MCP plugins.
Ask Claude to draft, schedule, and publish WordPress posts, upload media, or moderate comments. Install it with Scoop or Homebrew, answer a few questions in mcp-rs init, and it is registered with Claude Desktop, Claude Code, and GitHub Copilot.
Overview
mcp-rs is an MCP server written in Rust. MCP clients such as Claude Desktop and Claude Code connect to it over STDIO, and other clients over HTTP. It offers:
41 WordPress tools (posts, pages, custom post types, media, categories, tags and other taxonomies, comments, site settings) through the WordPress REST API
Read-only SQL tools for one PostgreSQL, MySQL, or MariaDB database (writes only when allowed)
The tools of external MCP servers, started as plugins (child process, Docker container, or Kubernetes Job)
For HTTP mode: API key or OAuth 2.1 authentication, per-caller tool limits, TLS/mTLS, rate limiting, and an audit log
Related MCP server: WP Database MCP Server
๐ Key Features
Core Capabilities
MCP over JSON-RPC 2.0: Protocol versions up to 2025-11-25 (with
initialize), and 2026-07-28 (server/discoverand per-request_meta, over STDIO and HTTP/mcp)Transports: STDIO, and HTTP (with optional WebSocket on
/ws)Plugins: Add the tools of any MCP server that speaks STDIO, run as a child process, in a Docker container, or as a Kubernetes Job. See Plugins
Configuration: One TOML file, with
${VAR}for values from environment variablesStatus Tool:
mcp_rs_statusshows the version, config file, log files, and what failed to start
WordPress Integration (41 Tools)
Posts & Pages Management: Create, read (full editable source), update, and delete posts and pages, with SEO metadata and scheduling; list revisions and restore one
Media Management: Upload with base64 (type, extension, and content validation), list, update metadata, delete, and set featured images
Categories & Tags Management: Create, update, and delete, with hierarchical categories
Comments: List by status (awaiting moderation, spam and others), approve, mark as spam, reply, and delete
YouTube & Social Embeds: Rich media integration with security validation
Site Settings: Read and update site settings and the front page configuration
Health Check: Verify connectivity, authentication, permissions, and media upload capability
Custom Post Types: Products, events and other post types that the site exposes in the REST API, when allowed in
post_types, with their own taxonomies (docs)Prompts: Ready-made requests in the client's menu: draft a post, review a post's SEO, moderate comments (and summarize a database table)
Multiple Sites: Use several WordPress sites from one mcp-rs; each tool takes a
siteargument (docs)
Live Demo Site
The examples/wordpress_site_builder_demo.rs example builds and updates the public WordPress demo site at redring.jp. It is a real-world showcase of how mcp-rs can bootstrap a site and organize content in production.
Security
Credentials Out of Files:
mcp-rs initkeeps the WordPress Application Password and the database password in the OS credential store. They can also be stored encrypted with AES-GCM-256 (PBKDF2 key derivation), or read from an environment variableHTTP Mode Authentication: API keys, or OAuth 2.1 access tokens (JWT) issued by an external authorization server
Per-Caller Tool Limits: Allow each API key or token only the tools it needs (for example
@read_only)TLS/mTLS: HTTPS with a minimum TLS version, and optional client certificates
Network Policy, Anti-Replay and Intrusion Detection for the HTTP/WebSocket listener
Rate Limiting of tool calls
Audit Logging: Who called which tool, and the result
Database Integration (PostgreSQL, MySQL, MariaDB)
One Section to Connect: Add
[database]to the configuration file (engine = "postgresql", or"mysql"or"mariadb"(v0.25.0 and later), host, database, user, andpassword = "${VAR}")Read-Only by Default:
execute_query(one SELECT, run in a read-only transaction that is rolled back) andget_schemaWrites Only When Allowed:
execute_command(one INSERT, UPDATE, or DELETE) is offered only withallow_write = trueBound Parameters:
$1,$2, โฆ (PostgreSQL) or?(MySQL, MariaDB) are bound, never inserted into the SQL text, and strings are converted to the column's typeLimits: Rows per result (1,000), time per statement (30 s), and connections (5) by default
Audit Logging: Each call is recorded with its SQL; parameter values are not
Connect with a read-only database role. See the Database Integration Guide.
๐ Quick Start
You need a WordPress site with Application Passwords (Users > Profile > Application Passwords) that mcp-rs can reach over HTTPS. Rust is not needed: each release from v0.25.0 has ready-built mcp-rs for Windows (x64), macOS (Apple Silicon), and Linux (x64).
1. Install with a package manager (from v0.29.0). It installs the release's ready-built mcp-rs, and updates it with your other packages (scoop update, brew upgrade):
# Windows (Scoop)
scoop bucket add n-takatsu https://github.com/n-takatsu/scoop-bucket
scoop install n-takatsu/mcp-rs# macOS (Apple Silicon) and Linux (x64) (Homebrew)
brew install n-takatsu/tap/mcp-rsOr with the install script (from v0.26.0). It downloads the latest release, checks its SHA256, and puts mcp-rs in ~/.mcp-rs/bin (%USERPROFILE%\.mcp-rs\bin on Windows), without administrator rights or changing anything else. Run it again to update:
# Windows (PowerShell)
irm https://raw.githubusercontent.com/n-takatsu/mcp-rs/main/install/install.ps1 | iex# macOS (Apple Silicon) and Linux (x64)
curl -fsSL https://raw.githubusercontent.com/n-takatsu/mcp-rs/main/install/install.sh | sh2. Set up. Run mcp-rs init (the install script offers to run it). It asks for the site URL, the username and the Application Password (kept in the OS credential store, not in a file), writes the config file (~/.config/mcp-rs/config.toml), checks the connection and sign-in, and registers mcp-rs with Claude Desktop, Claude Code and GitHub Copilot (VS Code), asking before each change:
mcp-rs init
# Installed with the script: ~/.mcp-rs/bin/mcp-rs init
# (Windows: & "$env:USERPROFILE\.mcp-rs\bin\mcp-rs.exe" init)3. Check. Restart the client as init shows, then ask it to call the mcp_rs_status tool. It shows the version, the config file in use, where the logs are written, anything that failed to start, and whether a newer version is out. mcp-rs check --config <path> checks a config file without a client.
To remove what init set up (the client registrations, the credential store entries, and optionally the config file), run mcp-rs uninstall. It asks before each change, and shows how to remove mcp-rs itself for the way you installed it.
The Getting Started guide covers the rest: reading the install script before running it, installing by hand or from source, setting up each client by hand, the config file, where the logs are, and what to check when a client cannot find the tools.
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โ AI Agent/Client โโโโโถโ MCP Server โโโโโถโ WordPress Site โ
โ (Claude Desktop, โ โ (mcp-rs) โ โ (REST API) โ
โ Custom AI, etc) โ โ โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโ
โ Security Layer โ
โ โข Authentication โ
โ โข Tool Limits โ
โ โข Rate Limiting โ
โ โข Audit Log โ
โโโโโโโโโโโโโโโโโโโโโโโ๐ Documentation
The documentation site is at n-takatsu.github.io/mcp-rs:
Getting Started (installing, setting up each client, log files)
Security (HTTP authentication, tool limits, TLS, audit log)
API Reference (
mcp_rs_statusand the MCP methods)Claude Desktop Integration (Japanese)
Claude Code Integration (Japanese)
๐ ๏ธ Development
Building from Source
## Development build
cargo build
## Production build with optimizations
cargo build --release
## Run tests
cargo test
## Run with specific configuration
cargo run -- --config configs/development/http-transport.tomlCode Examples
Examples are in the examples/ directory. For example, cargo run --example wordpress_api_test checks the connection to the WordPress site given by WORDPRESS_URL. When WORDPRESS_USERNAME and WORDPRESS_PASSWORD are also set, it checks the login and creates a draft post.
Testing
## Run all tests
cargo test
## Run with output
cargo test -- --nocapture # Show test output (no-capture flag) # cSpell:ignore nocapture
## Run specific test module
cargo test wordpress_api๐ค Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
๐ License
This project is dual-licensed under:
You may choose either license at your option.
๐ Acknowledgments
Model Context Protocol by Anthropic
The Rust community for excellent tooling and libraries
๐ Support
๐ Documentation
๐ Issue Tracker
Built with โค๏ธ in Rust ๐ฆ
Available Tools
33 toolscreate_advanced_postC
Create a new WordPress post or page with advanced options
Inputs: title (required), content (required), date, meta, +6 more.
create_categoryC
Create a new WordPress category
Inputs: name (required), slug, parent, description.
create_postA
Create a new WordPress post (basic). Defaults to draft status so nothing is published unintentionally.
Inputs: title (required), content (required), slug, status.
create_post_with_categories_tagsA
Create a new WordPress post with categories and tags. Defaults to draft status so nothing is published unintentionally.
Inputs: title (required), content (required), slug, tags, +3 more.
create_post_with_embedsB
Create WordPress post with embedded YouTube videos and social media content
Inputs: title (required), content (required), slug, tags, +5 more.
create_post_with_featured_imageB
Create a new WordPress post with featured image
Inputs: title (required), content (required), featured_media_id (required), slug, +1 more.
create_tagB
Create a new WordPress tag
Inputs: name (required), slug, description.
delete_categoryCDestructiveIdempotent
Delete a WordPress category
Inputs: category_id (required), force.
delete_mediaADestructiveIdempotent
Delete WordPress media file. WordPress does not support moving media to the trash by default, so force: true is usually required
Inputs: media_id (required), force.
delete_postCDestructiveIdempotent
Delete a WordPress post or page
Inputs: post_id (required), force, post_type.
delete_tagCDestructiveIdempotent
Delete a WordPress tag
Inputs: tag_id (required), force.
get_all_contentBRead-only
Retrieve both WordPress posts and pages
Inputs: no named parameters.
get_categoriesBRead-only
Retrieve WordPress categories
Inputs: no named parameters.
get_commentsCRead-only
Retrieve WordPress comments
Inputs: post_id.
get_mediaCRead-only
Retrieve WordPress media files
Inputs: no named parameters.
get_media_itemARead-only
Retrieve a single WordPress media item by ID
Inputs: media_id (required).
get_pagesARead-only
Retrieve WordPress pages. Without search, filters or page options, it returns all pages; with them, one page and the total
Inputs: page, after, order, author, +5 more.
get_postARead-only
Retrieve a single WordPress post or page by ID, including its full content. By default the content is the editable source (with Gutenberg block markup), which can be passed back to update_post unchanged.
Inputs: post_id (required), format, post_type.
get_postsARead-only
Retrieve WordPress posts (published ones by default). Without search, filters or page options, it returns all posts; with them, one page and the total
Inputs: page, tags, after, order, +7 more.
get_settingsCRead-only
Get WordPress site settings
Inputs: no named parameters.
get_tagsBRead-only
Retrieve WordPress tags
Inputs: no named parameters.
mcp_rs_statusmcp-rs statusARead-only
Show the status of the mcp-rs server itself: version, mode, protocol version, config file, where the log and audit log are written, and the state of each handler and plugin. Use it to check the installed version or to find the log files.
Inputs: no named parameters.
set_featured_imageBDestructiveIdempotent
Set featured image for existing post
Inputs: post_id (required), media_id (required).
set_front_pageBDestructiveIdempotent
Set a static page as the front page
Inputs: page_id (required).
set_front_page_to_postsCDestructiveIdempotent
Set front page to show latest posts
Inputs: posts_page_id.
update_categoryCDestructiveIdempotent
Update an existing WordPress category
Inputs: category_id (required), name, slug, parent, +1 more.
update_mediaCDestructiveIdempotent
Update WordPress media metadata (title, alt text, caption, description)
Inputs: media_id (required), post, title, caption, +2 more.
update_postCDestructiveIdempotent
Update an existing WordPress post or page
Inputs: post_id (required), date, slug, tags, +6 more.
update_post_categories_tagsCDestructiveIdempotent
Update categories and tags for an existing WordPress post or page
Inputs: post_id (required), tags, post_type, categories.
update_settingsCDestructiveIdempotent
Update WordPress site settings
Inputs: title, language, timezone, description, +5 more.
update_tagCDestructiveIdempotent
Update an existing WordPress tag
Inputs: tag_id (required), name, slug, description.
upload_mediaA
Upload media file to WordPress. Pass either file_data (base64) or file_path. The filename extension and file content must match mime_type. Size is capped at 10 MiB; with file_data, the transport's message size limit (including base64 overhead) usually applies first
Inputs: filename, file_data, file_path, mime_type.
wordpress_health_checkBRead-only
Perform comprehensive WordPress environment health check
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 33 tools
Several tools have heavily overlapping purposes: create_post, create_post_with_featured_image, create_post_with_categories_tags, create_advanced_post, and create_post_with_embeds all create posts, differing only by optional features. Retrieval tools also blur together: get_posts, get_all_content, get_post, and get_pages overlap, while get_media and get_media_item are easily confused. An agent would struggle to choose the correct tool without trial and error.
Most names follow a predictable snake_case verb_noun pattern such as get_posts, create_category, update_tag, and delete_media. A few deviate with compound or noun-first forms like wordpress_health_check, mcp_rs_status, and create_post_with_featured_image, but the overall convention remains readable and mostly consistent.
With 33 tools, the surface is heavy for a WordPress content-management server. The count is inflated by redundant post-creation variants and overlapping retrieval tools, so many tools do not clearly earn their place.
Core content operations are well covered: posts and pages can be retrieved, created, updated, and deleted; media and taxonomies have CRUD; settings and front-page configuration are present. However, comments are read-only, and there is no user, plugin, theme, or menu management, leaving notable gaps for broader WordPress administration.
Maintenance
Related MCP Connectors
WordPress MCP server: publish posts, AI images, SEO and full site management, self-hosted
WordPress MCP server: generate SEO posts, AI images, autoblog & WooCommerce on your self-hosted site
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- FlicenseBqualityDmaintenanceLocal MCP server for Codex/Claude to query and edit WordPress content through the WordPress REST API.26-
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server for exploring WordPress MySQL/MariaDB databases. Provides schema inspection, relationship mapping, and safe SQL querying.6MIT
- AlicenseCqualityDmaintenanceA lightweight MCP server that connects to WordPress via REST API, enabling content management (posts, pages, categories, etc.) and site configuration through natural language commands.49Apache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP server for WordPress content management via REST API, supporting posts, pages, media, comments, and terms through natural language interfaces like Cursor, ChatGPT, Codex, and Claude.18 npmMIT