onebirdrocks/ebook-mcp
A MCP server that supports mainstream eBook formats including EPUB, PDF and more. Simplify your eBook user experience with LLM.
d44056ec3f1debook-mcp0.1.8 in pyproject.tomlPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 12 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
Top risks in plain words
- HIGHTools
get_pdf_chapter_content,get_pdf_page_markdown,get_pdf_page_textread or write any file path by design: an agent steered by prompt injection can use them that way.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Give it only the folder it needs
get_pdf_chapter_content,get_pdf_page_markdown,get_pdf_page_textcan read or write any file path. Mount a single project folder, read-only where you can. - Turn off the tools you do not use
Most MCP clients let you disable single tools. If you do not need
get_pdf_chapter_content,get_pdf_page_markdown,get_pdf_page_text, switch them off. - Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 10 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
get_pdf_chapter_content, get_pdf_page_markdown, get_pdf_page_textNo tool was seen to: start other programs on the machine; connect to the internet or other hosts; read passwords, tokens or keys; read environment variables; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files3 tools · get_pdf_chapter_content, get_pdf_page_markdown, get_pdf_page_text
Not all three are present in the tools the scanner traced.
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (10: 10 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
get_pdf_chapter_contenttool Get content of a specific chapter in PDF file by its title.Filesoutside textReads/writes files
Get content of a specific chapter in PDF file by its title.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
chapter_title: Title of the chapter to extract
Returns:
Tuple[str, List[int]]: Tuple containing (chapter_content, page_numbers)get_pdf_page_markdowntool Get markdown formatted content of a specific page in PDF file.Filesoutside textReads/writes files
Get markdown formatted content of a specific page in PDF file.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
page_number: Page number to extract (1-based index)
Returns:
str: Markdown formatted textget_pdf_page_texttool Get text content of a specific page in PDF file.Filesoutside textReads/writes files
Get text content of a specific page in PDF file.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
page_number: Page number to extract (1-based index)
Returns:
str: Extracted text contentget_all_epub_filestool Get all epub files in a given path.
Get all epub files in a given path.
get_all_pdf_filestool Get all PDF files in a given path.
Get all PDF files in a given path.
get_epub_chapter_markdowntool Get content of a given chapter using the improved extraction method.
Get content of a given chapter using the improved extraction method.
✅ RECOMMENDED: This tool fixes the truncation issue in the original version when processing subchapters.
It can correctly handle EPUB files with subchapters and provide complete chapter content.
This function uses extract_chapter_html which properly handles subchapters
and provides accurate chapter boundaries, fixing the issue where subchapters
in the TOC cause premature truncation of chapter content.
Args:
epub_path: Full path to the ebook file. eg. "/Users/macbook/Downloads/test.epub"
chapter_id: Chapter id of the chapter to get content (e.g., "chapter1.xhtml#section1_3")
Returns:
str: Chapter content in markdown formatget_epub_metadatatool Get metadata of a given ebook.
Get metadata of a given ebook.
Args:
epub_path: Full path to the ebook file.eg. "/Users/macbook/Downloads/test.epub"
Returns:
List[Tuple[str, str]]: Return a list,Each element is a Tuple,contains key and value of metadata
Raises:
FileNotFoundError: Raises when the epub file not found
Exception: Raisers when running into parsing error of epub fileget_epub_toctool Get table of contents of a given EPUB file.
Get table of contents of a given EPUB file.
Args:
epub_path: Full path to the ebook file.eg. "/Users/macbook/Downloads/test.epub"
Returns:
List[Tuple[str, str]]: List of TOC entries, each entry is a tuple of (title, href)
Raises:
FileNotFoundError: Raises when the EPUB file not found
Exception: Raisers when running into parsing error of EPUB fileget_pdf_metadatatool Get metadata of a given PDF file.
Get metadata of a given PDF file.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
Returns:
Dict[str, Union[str, List[str]]]: Dictionary containing metadata
Raises:
FileNotFoundError: Raises when the PDF file not found
Exception: Raisers when running into parsing error of PDF fileget_pdf_toctool Get table of contents of a given PDF file.
Get table of contents of a given PDF file.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
Returns:
List[Tuple[str, int]]: List of TOC entries, each entry is a tuple of (title, page_number)
Raises:
FileNotFoundError: Raises when the PDF file not found
Exception: Raisers when running into parsing error of PDF fileText the model reads (10)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
get_all_epub_files tool
Get all epub files in a given path.
get_epub_metadata tool
Get metadata of a given ebook.
Args:
epub_path: Full path to the ebook file.eg. "/Users/macbook/Downloads/test.epub"
Returns:
List[Tuple[str, str]]: Return a list,Each element is a Tuple,contains key and value of metadata
Raises:
FileNotFoundError: Raises when the epub file not found
Exception: Raisers when running into parsing error of epub fileget_epub_toc tool
Get table of contents of a given EPUB file.
Args:
epub_path: Full path to the ebook file.eg. "/Users/macbook/Downloads/test.epub"
Returns:
List[Tuple[str, str]]: List of TOC entries, each entry is a tuple of (title, href)
Raises:
FileNotFoundError: Raises when the EPUB file not found
Exception: Raisers when running into parsing error of EPUB fileget_epub_chapter_markdown tool
Get content of a given chapter using the improved extraction method.
✅ RECOMMENDED: This tool fixes the truncation issue in the original version when processing subchapters.
It can correctly handle EPUB files with subchapters and provide complete chapter content.
This function uses extract_chapter_html which properly handles subchapters
and provides accurate chapter boundaries, fixing the issue where subchapters
in the TOC cause premature truncation of chapter content.
Args:
epub_path: Full path to the ebook file. eg. "/Users/macbook/Downloads/test.epub"
chapter_id: Chapter id of the chapter to get content (e.g., "chapter1.xhtml#section1_3")
Returns:
str: Chapter content in markdown formatget_all_pdf_files tool
Get all PDF files in a given path.
get_pdf_metadata tool
Get metadata of a given PDF file.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
Returns:
Dict[str, Union[str, List[str]]]: Dictionary containing metadata
Raises:
FileNotFoundError: Raises when the PDF file not found
Exception: Raisers when running into parsing error of PDF fileget_pdf_toc tool
Get table of contents of a given PDF file.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
Returns:
List[Tuple[str, int]]: List of TOC entries, each entry is a tuple of (title, page_number)
Raises:
FileNotFoundError: Raises when the PDF file not found
Exception: Raisers when running into parsing error of PDF fileget_pdf_page_text tool
Get text content of a specific page in PDF file.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
page_number: Page number to extract (1-based index)
Returns:
str: Extracted text contentget_pdf_page_markdown tool
Get markdown formatted content of a specific page in PDF file.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
page_number: Page number to extract (1-based index)
Returns:
str: Markdown formatted textget_pdf_chapter_content tool
Get content of a specific chapter in PDF file by its title.
Args:
pdf_path: Full path to the PDF file.eg. "/Users/macbook/Downloads/test.pdf"
chapter_title: Title of the chapter to extract
Returns:
Tuple[str, List[int]]: Tuple containing (chapter_content, page_numbers)What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller choosesNo tool runs a command or program the caller supplies — 10 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 10 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file path HIGH4 findings in get_pdf_chapter_content, get_pdf_page_markdown, get_pdf_page_text
- Requests any addressNo tool sends a request to an address the caller supplies — 10 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 10 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 10 capabilities; 8 more call code the scanner could not follow, where it may happen
- Tools that touch files3 of 10 capabilities touch files; 5 more call code the scanner could not follow, where it may happen
- Tools that call the networkNot seen in the traced code of 10 capabilities; 8 more call code the scanner could not follow, where it may happen
Where the code is: 10 handlers in 1 file at commit d44056ec3f1d
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests3 manifests: pyproject.toml, src/ebook_mcp/mcp_client_example/pyproject.toml, src/ebook_mcp/mcp_client_example/requirements.txt
- Lockfiles checked against OSV1 file resolved and checked against the OSV database; 3 not resolved: pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked; src/ebook_mcp/mcp_client_example/pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK versionfastmcp >=0.1.0, mcp >=1.4.1
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 10 capabilities; 8 more call code the scanner could not follow, where it may happen
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
Dependency ranges were not resolved against a lockfile, so the score is capped at 7.
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | fastmcp >=2.11.1, mcp >=1.4.1, fastmcp >=0.1.0 |
| Servers in the code | 2 (ebook-MCP, ebook-mcp) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-01-10 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 5 catalogs (awesome_appcypher, awesome_yuzehao2023, github_search, glama, mcp_toplist) |
|---|---|
| License | Apache-2.0 |
| Created | 2025-03-19 |
| Topics | ebook epub examples mcp mcp-client mcp-examples mcp-server pdf |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.