# Constile [Health: Active]

**Category:** 🔎 Search & Data Extraction  
**Repository:** https://github.com/Constile/constile-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 966  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/constile

## Description
Reads web pages for an assistant and handles Constile ads the way the person chose.

## Tools
Capabilities this server exposes over MCP:

- **read_article** — Fetch a web page for the person. When the page carries a Constile ad (free access in exchange for showing the person one labeled sponsored message), this tool handles it according to the person's saved choice.
- **report_sponsored_message** — Tell the publisher where a sponsored message from read_article stands. Use stage "prepared" when it's in the answer you're about to send, and "delivered" only after the person has seen it.
- **set_constile_preference** — Save how the person wants Constile ads handled from now on. Call only when the person has said so explicitly.
- **get_constile_preference** — Returns the saved choice: accept, ask, or decline.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "constile": {
    "command": "npx",
    "args": ["-y","constile-mcp"],
    "env": {
      "CONSTILE_PREFS": "",
      "CONSTILE_UA": ""
    }
  }
}
```

**Requires environment variables:** `CONSTILE_PREFS`, `CONSTILE_UA` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Constile does

Constile connects an AI assistant to web pages and the Constile publisher advertising flow. Its main operation, `read_article`, fetches a page and checks whether it carries a Constile ad. If one is present, the tool applies the person's saved preference and returns the page content with the sponsored message that should appear in the assistant's answer.

The system is designed to replace page advertising with one labeled sponsored message shown in the assistant response. The publisher can receive payment from the advertiser, while the person's preference remains on their own machine.

## How it works

A preference can be one of three values:

- `accept`: allow the sponsored message flow.
- `ask`: require the assistant to ask the person.
- `decline`: decline the sponsored message.

Before a preference is saved, `get_constile_preference` returns `ask`. The assistant should call `set_constile_preference` only after the person explicitly chooses an option. Once a sponsored message is included in an answer, `report_sponsored_message` can tell the publisher whether the message is `prepared` or `delivered`.

The server stores the preference locally. It keeps the person's choice on their machine and sends nothing about the person or the conversation.

## Setup and configuration

Constile requires Node.js 20 or later. For an MCP client that launches servers over stdio, add a server entry using `npx`:

```json
{
  "mcpServers": {
    "constile": {
      "command": "npx",
      "args": ["-y", "constile-mcp"]
    }
  }
}
```

Claude Code can register it with:

```sh
claude mcp add constile -- npx -y constile-mcp
```

Two environment variables control local behavior. `CONSTILE_PREFS` changes the preference file location; the default is `~/.config/constile/preferences.json`. `CONSTILE_UA` sets the user agent used for page requests, defaulting to `ConstileMCP-User/0.1 (+https://constile.app)`.

To build from source, install dependencies, run the test suite, and create the build with `npm install`, `npm test`, and `npm run build`.

## Tools and capabilities

- `read_article` fetches a page and applies the saved Constile preference when a Constile ad is present.
- `get_constile_preference` returns the stored preference, or `ask` before one has been saved.
- `set_constile_preference` records `accept`, `ask`, or `decline` after the person chooses.
- `report_sponsored_message` reports whether a sponsored message is prepared for the answer or has been delivered to the person.

## Limitations and notes

The server is intended for clients that can run MCP servers over stdio. Preference state is local to the machine running the server and is stored as a single choice in a JSON file. Sponsored-message handling applies when the fetched page carries a Constile ad; ordinary page fetching remains the responsibility of `read_article`.

The project is licensed under MIT. Support is available at hello@constile.app, while agent builders can use the related `constile-agent-sdk` and Constile developer API resources.

_Full upstream README: https://allmcps.com/mcp/constile/readme_

