Skip to main content
Cognee Cloud speaks MCP (Model Context Protocol) in two ways:
  • The hosted MCP server at https://mcp.aws.cognee.ai/mcp. Nothing to install: you add the URL to your client and sign in with your Cognee account. Any client that supports remote MCP servers with OAuth can use it, including Claude (web and Desktop), Claude Code and ChatGPT.
  • Running cognee-mcp yourself with an API key. For clients that can only launch a local server, or when you want to pin a version and control the environment. The Integrations page in the Cloud UI generates these configs.
Both give your client the same tools, and both act on your Cognee Cloud workspace. This page covers the hosted server first, then the self-run option.

Connect to the hosted server

Register the server once for your user, then sign in from inside Claude Code:
If Claude Code is already running, restart it so it picks up the new server. Then run /mcp, select cognee and choose Authenticate. Your browser opens Cognee’s consent page: click Allow Access once, then sign in with your Cognee account. Back in Claude Code, /mcp shows the server as connected.

Try it

Ask your client to store something, read it back, and clean up:
Use Cognee to remember in the dataset mcp_test: “The hosted MCP connection works.”
Use Cognee to recall from mcp_test: what works?
Use Cognee to forget the dataset mcp_test.
The first answer reports Stored permanently in knowledge graph (dataset=mcp_test, status=…). Storing runs the full ingestion pipeline, so it can take from a few seconds to a few minutes depending on the amount of text. The dataset also appears on the Datasets page of the Cloud UI.

What happens when you connect

Sign-in. The hosted server is an OAuth authorization server towards your client and signs you in through the same Cognee account you use for the Cloud UI. The client receives a token that works only with the hosted MCP server; it never sees your Cognee credentials or session. A connection stays signed in while you keep using it. After 30 days without use, or a year after you connected, the client asks you to sign in again. Which workspace. Every call goes to your current workspace, the one the Cloud UI opens when you sign in. With no workspace selected, the server uses your only workspace, or else the only one you own; if that still leaves several, the first call tells you so and asks you to switch to one in the Cloud UI. The server remembers your workspace for 5 minutes, so after you switch workspaces in the Cloud UI, a connected client can keep using the previous one for up to 5 minutes. Nothing lets a client reach a workspace you are not a member of: the server passes your own sign-in token to your workspace, which checks it like any other request. Datasets. Unless you name a dataset, each client stores into a dataset of its own, named after the client: claude_code_memory for Claude Code, anthropic_claudeai_memory for Claude. Default Dataset Resolution explains the rule. recall without a dataset searches everything you can access, so memories written by one client are visible to the others. To use a specific dataset, say so in the conversation (“remember this in the dataset project_x”) or in the client’s instruction file. Sleeping workspaces. A workspace that has been idle for a while goes to sleep. The first MCP call wakes it: the hosted server waits for the workspace to start, so the call usually succeeds, but it can take about a minute. Later calls are fast. Credits. Calls made through MCP are billed to your workspace exactly as the same operations from the Cloud UI or the API.

Tools

The hosted server lists all four Cognee tools directly. There is no search_tools / call_tool pair to go through, unlike the default mode of a self-run server. Parameters and defaults are in the Tools Reference.

Troubleshooting

Run the MCP server yourself

Use this when your client only launches local (stdio) servers, only supports API keys, or when you want to pin the cognee-mcp version. You need the API Base URL and an API key from the API Keys page.
This is the form the in-product Integrations page generates. It runs cognee-mcp through uvx (requires uv); the first launch downloads the package and its dependencies. The version is pinned because a bare cognee-mcp runs whatever version uvx cached on that machine; the Integrations page pins the version Cognee Cloud has been tested with.
Copy the API Base URL exactly as shown on the API Keys page: the tenant-… label in it is how cognee-mcp recognizes a Cloud workspace and authenticates with your API key. For per-client config file locations, see Integrations.
A self-run server offers the same memory tools; in its default mode it lists remember, recall, forget and code_search and reaches the rest through search_tools / call_tool, as described in Tool Modes.

Next steps

Tools Reference

Parameters, defaults and dataset rules for every Cognee MCP tool.

Workspace Lifecycle

How a workspace sleeps and wakes, and what that means for the first call.

Cloud SDK

Connect to Cognee Cloud programmatically using the Python SDK.

Integrations in the Cloud UI

Generated configs for clients that run the MCP server locally.