Serves as both the MCP and HTTP interface for the book-related tools, allowing the server to be accessible via HTTP endpoints.
Provides the runtime environment for the MCP server, allowing it to be executed and integrated with Python-based applications.
Talebook MCP Server
A simple Model Context Protocol (MCP) server built with FastAPI that provides book-related tools.
Features
- get_books_count: Returns the current count of books in the collection (defaults to 1)
- Built with FastAPI for both MCP and HTTP interfaces
- Supports both stdio transport (for MCP clients) and HTTP endpoints
Installation
- Install dependencies:
Usage
Running as MCP Server (stdio transport)
Running as FastAPI HTTP Server
The HTTP server will be available at http://localhost:8000
Available Endpoints (HTTP mode)
GET /
- Health checkGET /tools
- List available toolsPOST /tools/get_books_count
- Get books count
Available Tools (MCP mode)
- get_books_count: Get the current count of books in the collection
- Input: No parameters required
- Output: Text content with the books count
MCP Configuration
To use this server with an MCP client, add the following to your MCP configuration:
Development
The server is structured to be easily extensible. To add new tools:
- Add the tool definition to the
list_tools()
function - Add the tool handler to the
call_tool()
function - Implement the tool function
- Optionally add HTTP endpoints for the new tool
Example Tool Usage
When using an MCP client, you can call the get_books_count
tool:
The server will respond with:
This server cannot be installed
A simple FastAPI-based MCP server that provides book-related tools, currently supporting retrieval of book collection counts.
Related MCP Servers
- -securityAlicense-qualityThe Apple Books MCP server bridges the gap between your personal reading journey and AI capabilities by transforming static book collections into interactive knowledge repositories.Last updated -23PythonApache 2.0
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book information.Last updated -11119TypeScriptMIT License
- AsecurityAlicenseAqualityAn MCP server that allows users to efficiently search and reference user-configured documents through document listing, grep searching, semantic searching with OpenAI Embeddings, and full document retrieval.Last updated -43PythonMIT License
- -securityFlicense-qualityMCP server that allows searching and retrieving book information from Aladin's book store API, including book details, bestseller lists, and category-based searches.Last updated -3JavaScript