Skip to main content
Glama

Talebook MCP Server

by HorkyChen
MIT License

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

  1. Install dependencies:
pip install -r requirements.txt

Usage

Running as MCP Server (stdio transport)

python src/server.py

Running as FastAPI HTTP Server

python src/server.py --fastapi

The HTTP server will be available at http://localhost:8000

Available Endpoints (HTTP mode)

  • GET / - Health check
  • GET /tools - List available tools
  • POST /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:

{ "mcpServers": { "talebook-mcp": { "command": "python", "args": ["/path/to/talebook-mcp/src/server.py"], "env": {} } } }

Development

The server is structured to be easily extensible. To add new tools:

  1. Add the tool definition to the list_tools() function
  2. Add the tool handler to the call_tool() function
  3. Implement the tool function
  4. Optionally add HTTP endpoints for the new tool

Example Tool Usage

When using an MCP client, you can call the get_books_count tool:

{ "method": "tools/call", "params": { "name": "get_books_count", "arguments": {} } }

The server will respond with:

{ "content": [ { "type": "text", "text": "Current books count: 1" } ] }
-
security - not tested
A
license - permissive license
-
quality - not tested

A simple FastAPI-based MCP server that provides book-related tools, currently supporting retrieval of book collection counts.

  1. Features
    1. Installation
      1. Usage
        1. Running as MCP Server (stdio transport)
        2. Running as FastAPI HTTP Server
        3. Available Endpoints (HTTP mode)
        4. Available Tools (MCP mode)
      2. MCP Configuration
        1. Development
          1. Example Tool Usage

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              The 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 -
              23
              Python
              Apache 2.0
              • Apple
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol (MCP) server for the Open Library API that enables AI assistants to search for book information.
              Last updated -
              1
              11
              19
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              An 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 -
              4
              3
              Python
              MIT License
              • Apple
              • Linux
            • -
              security
              F
              license
              -
              quality
              MCP 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 -
              3
              JavaScript

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/HorkyChen/talebook-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server