> ## Documentation Index
> Fetch the complete documentation index at: https://docs.memex.garden/llms.txt
> Use this file to discover all available pages before exploring further.

# GPT Researcher MCP

> Connect GPT Researcher to the hosted Memex MCP server

Use GPT Researcher's MCP retriever support to research with saved Memex sources alongside web search.

## Set up credentials

1. In Memex, open **Settings**.
2. Go to **MCP server**.
3. Click **Generate Key** if you do not already have an API key.
4. Copy your **Full Connection URL**.
5. Make sure your GPT Researcher environment has the LLM and search provider keys it needs, such as `OPENAI_API_KEY` and `TAVILY_API_KEY`.

## Add Memex as an MCP source

1. In your GPT Researcher app or script, enable the MCP retriever with your preferred web retriever:

```python theme={null}
import os

os.environ["RETRIEVER"] = "tavily,mcp"
```

2. Add Memex to `mcp_configs` with the full connection URL from Memex settings:

```python theme={null}
from gpt_researcher import GPTResearcher

researcher = GPTResearcher(
    query="What have I saved about MCP setup patterns?",
    mcp_configs=[
        {
            "name": "memex",
            "connection_url": "https://memex.garden/api/mcp?userId=YOUR_USER_ID&apiKey=YOUR_MEMEX_API_KEY",
        }
    ],
)

context = await researcher.conduct_research()
report = await researcher.write_report()
```

3. Run the research task from your GPT Researcher runtime.

## Use Memex in research

Ask GPT Researcher to include your saved Memex library when it gathers context.

Example:

```text theme={null}
Research current MCP onboarding patterns using my saved Memex sources and recent web results.
```

## Connection values

Use the **Full Connection URL** from Memex settings:

```text theme={null}
https://memex.garden/api/mcp?userId=YOUR_USER_ID&apiKey=YOUR_MEMEX_API_KEY
```

If you need to enter the fields separately, use:

```text theme={null}
Server URL: https://memex.garden/api/mcp
User ID: YOUR_USER_ID
API Key: YOUR_MEMEX_API_KEY
```

Available Memex MCP tools:

* `search_content`
* `save_content_by_url`
* `create_sharing_link`
* `list_sharing_links`

GPT Researcher can also run as its own MCP server for AI clients that need autonomous web research tools.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.