Connect your own AI

FolianX does not ship a built-in chatbot. It exposes your notes as a source that the assistant you already use can read — with a token you scope and revoke. The intelligence stays yours, and so does the data.

What you get

Once connected, your assistant can search your notes, open a page, follow links between pages and list your tags — on its own, as part of answering whatever you asked it. You do not paste notes into a chat window; the assistant fetches exactly what it needs.

Every request is filtered through the same permissions as the web app. An assistant can never read a page you could not open yourself.

Before you start

You need an MCP-capable assistant. Claude Code and Claude Desktop both work; so does anything else that speaks the Model Context Protocol.

1. Create a token

In FolianX go to Settings → API tokens, give the token a name you will recognise later (for example Claude on my laptop), and choose its access:

Read onlyThe assistant can search and read. It cannot change anything. Start here.
Read and writeThe assistant can also create pages, update them and append to them. Use it when you want the assistant to keep notes for you.

The token is shown once. Copy it then — only a hash is stored, so it cannot be shown again. If you lose it, revoke it and create another.

2. Install the connector

The connector is a small program that runs on your own machine and talks to FolianX over HTTPS. Give it its own virtual environment:

python -m venv .mcpvenv
. .mcpvenv/bin/activate
pip install -r mcp_server/requirements.txt

Keep it separate from any application environment — the MCP libraries pull in dependencies that can conflict with an app's own.

3. Point your assistant at it

For Claude Code, add this to ~/.claude.json, or to .mcp.json inside a project:

{
  "mcpServers": {
    "folianx": {
      "command": "/absolute/path/.mcpvenv/bin/python",
      "args": ["/absolute/path/mcp_server/server.py"],
      "env": {
        "FOLIANX_BASE_URL": "https://folianx.com",
        "FOLIANX_MCP_TOKEN": "folianx_…"
      }
    }
  }
}

Restart the assistant afterwards — connectors are started when it launches, so an edit mid-session has no effect.

4. Try it

Ask your assistant something that requires your notes, such as “search my FolianX notes for the deployment runbook and summarise it”. It will search, pick the page and read it without further prompting.

To confirm the connection is live, open Settings → API tokens: the token's Last used column fills in the moment it is first called.

What the assistant can do

Read onlysearch notes, semantic search, open a page, list pages, recent pages, links, backlinks, tags
Read and writeall of the above, plus create a page, update a page and append to a page

Scope is enforced on our side, not merely in the connector: a read-only token is refused if it attempts a write, whatever the client asks for.

Using it without MCP

The same data is available over a plain HTTP API, so you can wire it into your own tooling:

curl -H "Authorization: Bearer folianx_…" \
  https://folianx.com/mcp/v1/whoami

That returns the token's owner and its scope — the quickest way to check a token works. Search, pages, recent, links, backlinks and tags are all available the same way.

Turning it off

Revoke the token in Settings → API tokens. It stops working immediately — there is no cache and no grace period. Revoking one token never affects any other.