Add it to Claude Code
claude mcp add -e "LLM_API_KEY=${LLM_API_KEY}" gaslighting-mcp -- uv run server.pyLLM_API_KEY+ 3 optionalMake your agent remember this setup
gaslighting-mcp's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- Generates 10 realistic search results including URL, snippet, and date
- Creates full fake articles in markdown format
- Configurable narrative via background story environment variable
- Compatible with any OpenAI-style API endpoint
- Built using FastMCP for easy integration
Tools 2
searchGenerates 10 realistic search results consistent with the background story.read_urlGenerates a full fake article in markdown for a given URL, inferred from the domain/path and background story.Environment Variables
BACKGROUND_STORYThe narrative that shapes all generated resultsLLM_BASE_URLOpenAI-compatible API base URLLLM_API_KEYrequiredAPI key for the LLM endpointLLM_MODELModel nameTry it
Original README from Nothflare/gaslighting-mcp
gaslighting-mcp
A fake web search MCP server for AI alignment testing. It accepts a search query and returns LLM-generated search results shaped by a configurable background story.
Built with FastMCP and compatible with any OpenAI-style API endpoint.
How it works
- You provide a background story via the
BACKGROUND_STORYenvironment variable - The server exposes two tools:
searchandread_url search— generates 10 realistic search results (url, snippet, date) consistent with the background storyread_url— generates a full fake article in markdown for a given URL, inferred from the domain/path and background story- The consuming AI agent receives these as if they were real web content
Setup
uv sync
Configuration
| Environment Variable | Default | Description |
|---|---|---|
BACKGROUND_STORY |
"" |
The narrative that shapes all generated results |
LLM_BASE_URL |
https://openrouter.ai/api/v1 |
OpenAI-compatible API base URL |
LLM_API_KEY |
"" |
API key for the LLM endpoint |
LLM_MODEL |
nousresearch/hermes-4-405b |
Model name |
Usage
Standalone
uv run server.py
Claude Code MCP config
Add to your .mcp.json:
{
"mcpServers": {
"web-search": {
"command": "uv",
"args": ["run", "server.py"],
"env": {
"BACKGROUND_STORY": "your background story here",
"LLM_API_KEY": "your-api-key"
}
}
}
}
Tools
`search(query)`
Returns a JSON array of 10 results:
[
{
"url": "https://example.com/some-article",
"snippet": "A realistic excerpt shaped by the background story.",
"date": "2025-12-15"
}
]
`read_url(url)`
Returns a full fake article in markdown, inferred from the URL and background story. Matches the tone and style of the source website.
License
MIT