Claude Code is fluent in your repository and blind to your content. It can refactor the component that renders your blog, but ask it to publish the post that component displays and it has nowhere to look. The Model Context Protocol (MCP) closes that gap. It gives Claude Code a set of tools it can call against your CMS directly, so reading and writing content happens in the same conversation as the code.

This guide connects Claude Code to a Cosmic bucket. With the hosted endpoint it takes about five minutes and requires no install.

What MCP actually gives Claude Code

MCP is an open protocol for exposing tools to AI assistants. The Cosmic MCP server implements it and exposes 18 tools across four areas:

Objects (5 tools): list, get, create, update, and delete content