wp_get_user_connections
Query the posttouser relationship table in either lookup direction, via entitytype
How to use it
wp_get_user_connections is exposed by the Wp Db MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the wp_get_user_connections tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Wp Db MCP
uvx --from wp-db-mcp wp-db-mcpOther tools in Wp Db MCP (21)
fraction of all terms in that taxonomy that carry a numeric value for
of the numeric-valued terms, the fraction whose value actually
Show columns, types, keys, and indexes for a specific table. Accepts full name or core suffix (e.g. posts instead of wpposts). users, usermeta, and multisite's network tables (blogs, site, sitemeta, signups, registrationlog) always resolve against the base prefix, regardless of siteid.
Get posts connected to a post via the posttopost table. Supports filtering by relationship
Get all meta key-value pairs for a post, user, or comment. Takes objecttype
Get all terms for a post, traversing the full relationship chain. Filter by taxonomy.
Map how WordPress tables relate to each other:
Generate a complete database schema with all columns, indexes, and detected relationships. Outputs JSON or CSV. Toggle includeplugins to include non-core tables. Uses optimized batch queries. users/usermeta and network tables are included at the base prefix on every site.
Traverse a shadow taxonomy relationship in either direction, via entitytype
Get all posts for a term. Same default posttype/poststatus exclusions as wpsearchposts
List all post connections for a given relationship name. Returns all connection pairs with both posts' details (ID, title, type) and the relationship order.
Discover all relationship names registered in WP Content Connect. Queries both posttopost and posttouser tables to list distinct relationship names with their connection counts. Useful for exploring what relationships exist before querying specific connections.
List all posts using a shadow taxonomy relationship. Returns all posts assigned to shadow terms, with term info (ID, name) and source post details (ID, title, type).
Discover candidate shadow taxonomies — this is heuristic, not verified. It finds
List all tables with engine, row count, and size. Supports multisite siteid filter.
List all taxonomies registered in the database with term counts and total usage.
> wppostmeta (via postid)
Execute raw SQL queries validated by validateselectonly() (a guardrail, not a security
Search posts by title or content using LIKE matching. Defaults exclude posttype IN
> wptermmeta (via termid)
> wpusermeta (via userid)