# Using the Library with Claude

Claude, our AI assistant, can search, read, add to and update the NFE Library for you through the "NFE Library" skill. This page explains the one-time setup and how to use it well.

## What Claude can do with the Library

- **Answer questions from the Library.** Ask how we do something ("What's our process for pre-commissioning CHINT meters?") and Claude searches the Library, reads the relevant pages and answers with links to them.
- **Browse.** List books, chapters and pages, or pull up a specific page.
- **Add and update pages.** Ask Claude to write up a process, a decision or meeting notes, or to correct a page that's out of date. Claude checks for an existing page first, shows you a draft, and only publishes after you say yes.

Claude only sees what your own BookStack account can see, and anything it publishes appears under your name in the page history, exactly as if you had edited it yourself.

## One-time setup

You need three things:

1. **The Claude desktop app.** The skill only works in chats opened in the Claude desktop app on your computer (not in the browser or on your phone alone), because your token is kept on your computer. This will change once we host a shared Library connector.
2. **API access in BookStack.** Your BookStack role needs the **"Access System API"** permission. If you don't see an **API Tokens** section on your BookStack profile, ask Aaron to enable it.
3. **Your personal API token**, saved in a private file on your computer:
   1. In a Claude desktop chat, ask something like *"Search the NFE Library for our Collaboration Tools."*
   2. The first time, Claude asks for permission to access a folder on your computer and creates the file `~/.config/nfe-library/credentials.env`.
   3. In BookStack, go to your profile (top right) → **My Account / Edit Profile** → **API Tokens** → **Create Token**. Set an **expiry date about 90 days out**.
   4. Open the file (on a Mac: Finder → **Go → Go to Folder…** → `~/.config/nfe-library`, then open `credentials.env` with TextEdit), paste the **Token ID** and **Token Secret** after the `=` signs, and save.
   5. Tell Claude **"done"**. It will confirm the connection works.

When your token expires, create a new one and replace the values in the same file.

## Keeping your token safe

- **Never paste your token into a chat**, an email, Matrix, a Library page or any shared document. Chats keep a history; the file on your computer doesn't leave it except for the moment Claude uses it.
- Claude is set up never to read the token out loud or show it back to you.
- If you think your token has been exposed, delete it in BookStack (profile → API Tokens) and create a new one.

## Tips for good results

- **Ask in plain language** and mention the Library if you want Claude to check it: *"According to the Library, how do we onboard a new microgrid customer?"*
- **Ask for sources.** Claude should link the pages it used; open them if the answer matters.
- **When you learn something the team should know, ask Claude to add it.** *"Add today's decision on battery suppliers to the Library"* or *"Update the Collaboration Tools page to include Claude."*
- **Review drafts before saying yes.** You're the author of record for anything Claude publishes with your token.
- If something isn't in the Library, that's a gap worth filling. See [About the Library](https://bookstack.nearlyfreeenergy.com/books/team/page/about-the-library).

## Troubleshooting

| What you see | What to do |
| --- | --- |
| Claude says the chat isn't linked to your computer | Open the chat in the Claude desktop app and send a message there. |
| "No credentials found" or empty values | Make sure you saved `credentials.env` with both values filled in. |
| Error 401 | The token is wrong or has expired. Create a new one and update the file. |
| Error 403 | Your BookStack role is missing "Access System API". Ask Aaron. |
| Claude can't reach the Library | Let Aaron know; the server may be down or Claude's network settings may need checking. |

## For admins

- **Skill:** "NFE Library", provisioned to everyone in Claude under Organization settings → Plugins & skills. Updates are made by uploading a new version of the skill there.
- **Network:** `*.nearlyfreeenergy.com` is on the allowed domains list for Claude's code execution (Organization settings → Capabilities), so Claude can reach the Library's API.
- **Permissions:** grant "Access System API" per role in BookStack (Settings → Roles). Content access follows each person's normal BookStack permissions.
- **Planned:** a hosted MCP connector for the Library, which will remove the desktop-app requirement.

*Last reviewed: 19 October 2026 by Aaron Tushabe*