A Model Context Protocol (MCP) server that provides tools to interact with your Audiobookshelf instance. Access your libraries, audiobooks, podcasts, authors, collections, and playlists through AI assistants that support MCP.
USE AT YOUR OWN RISK: This software is provided "as is" without warranty of any kind. The author is not responsible for any misuse, accidents, data loss, or any other issues that may arise from using this software. Users are solely responsible for ensuring proper configuration and usage of this tool with their Audiobookshelf instance.
- List and retrieve libraries with optional sub-resources (items, authors)
- Get individual items (audiobooks or podcasts)
- Browse authors and their works
- Access collections and playlists
- Retrieve user information
- An Audiobookshelf instance with API access
- An API token from your Audiobookshelf instance
The easiest way to install is to download a pre-built binary from the latest release.
| Platform | Architecture | Filename |
|---|---|---|
| macOS | Intel (x86_64) | audiobookshelf-mcp_VERSION_darwin_amd64.tar.gz |
| macOS | Apple Silicon (ARM64) | audiobookshelf-mcp_VERSION_darwin_arm64.tar.gz |
| Linux | 64-bit (x86_64) | audiobookshelf-mcp_VERSION_linux_amd64.tar.gz |
| Linux | ARM64 | audiobookshelf-mcp_VERSION_linux_arm64.tar.gz |
| Linux | 32-bit (x86) | audiobookshelf-mcp_VERSION_linux_386.tar.gz |
| Windows | 64-bit (x86_64) | audiobookshelf-mcp_VERSION_windows_amd64.tar.gz |
| Windows | ARM64 | audiobookshelf-mcp_VERSION_windows_arm64.tar.gz |
| Windows | 32-bit (x86) | audiobookshelf-mcp_VERSION_windows_386.tar.gz |
Installation steps:
- Download the appropriate archive for your platform from the releases page
- Extract the archive:
tar -xzf audiobookshelf-mcp_VERSION_PLATFORM.tar.gz
- Move the binary to a location in your PATH (optional but recommended):
# macOS/Linux sudo mv abs-mcp /usr/local/bin/ # Or to a user directory mv abs-mcp ~/.local/bin/
- Make it executable (macOS/Linux):
chmod +x /usr/local/bin/abs-mcp
If you prefer to build from source:
Prerequisites:
- Go 1.21 or later
git clone <repository-url>
cd abs-mcp
go buildThe MCP server requires two pieces of configuration:
- ABS_BASE_URL - The base URL of your Audiobookshelf instance (e.g.,
https://abs.example.com) - ABS_API_KEY - Your Audiobookshelf API token
- Log into your Audiobookshelf instance
- Go to Settings → Users → Your User
- Click "Generate API Token" or copy your existing token
You can set the configuration using environment variables:
export ABS_BASE_URL="https://abs.example.com"
export ABS_API_KEY="your-api-token-here"Alternatively, you can pass these as parameters when calling tools (see Tool Parameters below).
Witsy is a desktop AI assistant that supports MCP servers. Here's how to set it up:
- Open Witsy and go to Settings (⚙️ icon)
- Navigate to the MCP section
- Add a new server with the following configuration:
Configuration details:
- Type:
stdio - Label:
abs-mcp(or any name you prefer) - Command:
/path/to/abs-mcp(use the "Pick" button to select your compiled binary) - Arguments: (leave empty)
- Working Directory: Any directory (e.g.,
/Users/yourname/Downloads) - Environment Variables:
ABS_BASE_URL=https://example.library.abs(your Audiobookshelf URL)ABS_API_KEY=IM_A_LONG_STRING(your API token)
- Click "Save" to add the server
- The server will now be available in your Witsy conversations!
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"audiobookshelf": {
"command": "/path/to/abs-mcp",
"env": {
"ABS_BASE_URL": "https://abs.example.com",
"ABS_API_KEY": "your-api-token-here"
}
}
}
}- libraries - List all libraries
- library - Get a single library by ID, or fetch specific library sub-resources:
items=true- Get all items in the libraryauthors=true- Get all authors in the libraryseries=true- Get all series in the librarycollections=true- Get all collections in the libraryplaylists=true- Get all playlists in the librarypersonalized=true- Get personalized view for the libraryfilterdata=true- Get filter data for the librarystats=true- Get library statisticsepisode-downloads=true- Get episode downloads for the libraryrecent-episodes=true- Get recent episodes for the library
- create_library - Create a new library
- Required:
name,folders(comma-separated paths),media_type(book or podcast) - Optional:
icon,provider
- Required:
- item - Get a single item (audiobook or podcast) by ID, or fetch specific item sub-resources:
cover=true- Get the cover image for the itemtone-object=true- Get the tone object for the item
- author - Get a single author by ID
- collections - List all collections
- collection - Get a single collection by ID
- create_collection - Create a new collection
- Required:
library_id,name - Optional:
description
- Required:
- add_to_collection - Add a book to an existing collection
- Required:
collection_id,book_id
- Required:
- playlists - List all playlists
- playlist - Get a single playlist by ID
- create_playlist - Create a new playlist
- Required:
library_id,name - Optional:
description
- Required:
- add_to_playlist - Add an item to an existing playlist
- Required:
playlist_id,item_id - Optional:
episode_id(for podcast episodes)
- Required:
- me - Get authenticated user information, or fetch specific user sub-resources:
listening-sessions=true- Get listening sessions for the userlistening-stats=true- Get listening statistics for the useritems-in-progress=true- Get items currently in progress for the userprogress_item_id=<id>- Get progress for a specific library itemprogress_item_id=<id>+progress_episode_id=<id>- Get progress for a specific episode
- sessions - List all playback sessions
- session - Get a single playback session by ID
- podcasts - List all podcasts, or fetch podcast-related resources:
feed=true- Get podcast RSS feedopml=true- Get podcast OPML export
- podcast - Get a single podcast by ID, or fetch podcast sub-resources:
downloads=true- Get downloads for the podcastsearch-episode=true- Search for episodes in the podcastepisode_id=<id>- Get a specific episode by ID
- check_podcast_episodes - Check for new episodes for a podcast
- Required:
podcast_id
- Required:
- update_progress - Update listening progress for a media item
- Required:
item_id,progress(in seconds) - Optional:
duration(in seconds),is_finished(boolean),episode_id(for podcasts)
- Required:
- create_backup - Create a server backup
All tools accept optional base_url and token parameters that override the environment variables:
{
"base_url": "https://abs.example.com",
"token": "your-api-token-here"
}This is useful if you need to access multiple Audiobookshelf instances or prefer not to use environment variables.
Once configured, you can ask your AI assistant questions like:
Reading and browsing:
- "Show me all my audiobook libraries"
- "What items are in my Fiction library?"
- "Get details about the author with ID abc123"
- "List all my playlists"
- "What's in my Currently Reading collection?"
Creating and managing:
- "Create a new collection called 'Summer Reads' in my library"
- "Add this book to my 'Currently Reading' collection"
- "Create a new playlist for my favorite sci-fi audiobooks"
- "Check for new podcast episodes"
- "Update my progress to 45 minutes on this audiobook"
- "Create a backup of my server"
The AI assistant will use the appropriate MCP tools to fetch information and manage your Audiobookshelf instance.
main.go- Main server implementation- Helper functions for API authentication and request handling
- MCP tool definitions and handlers
To add a new tool:
- Define the tool options using
mcp.NewTool() - Add authentication parameters with
withABSAuth() - Register the tool with
s.AddTool() - Use helper functions like
createSimpleGETHandler()orcreateGETByIDHandler()
GNU General Public
Contributions are welcome! Please open an issue or submit a pull request.
For issues related to:
- This MCP server: Open an issue in this repository
- Audiobookshelf: Visit audiobookshelf.org
- MCP Protocol: See modelcontextprotocol.io
