Searching the Library Through Commands... Page 249 Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System Using Model Context Protocol Tirtharaj Dasgupta1 Parthasarathi Mukhopadhyay2 Abstract In the evolving landscape of the world, libraries and information centers have been the brain of society. They provide information tousers by offeringa collection of valuable resources. Users have been using the library catalogue to retrieve information about library resources for ages in various forms, such as the card catalogue, OPAC, and library discovery layers. However, the searedominated by keyword-based searching, which is neither flexible nor lucid and requires skill for accurate searching. Conversational systems have emerged across various domains, and the use of Natural Language Processing (NLP) and generative AI systems built on Large Language Models (LLMs) has been on the rise. Moreover, AI agents have been able to act upon various tasks using tools, prompts, and resources. This research aims to develop a fully open-source framework for a conversational search system for library resources. It uses the Model Context Protocol (MCP) to design the framework. To implement this on a Linux system, a command-line tool, namely MCP-CLI, has been integrated with a local LLM (Qwen-Coder) running on Ollama, to operate an MCP server for VuFind—a library discovery layer—through a RESTAPI. It has successfully retrieved all sorts of library resources. The results of conversational retrieval have been compared to those of keyword-based searching from the VuFind interface. Although no metric has been used to measure efficacy of the open source conversational search system, as compared to other alternatives, it builds a strong prototype to act as a core on which further developments in this area can be made. Keywords : Information Retrieval, Library Discovery, VuFind, Artificial Intelligence (AI), Large Language Model (LLM), AI Agents, Model Context Protocol (MCP) 1. Introduction Libraries have been an important part of society. They have been the intellectual backbone of development in the knowledge society by housing information resources in multiple forms. They aim to provide the right information to the right user at the right time. Libraries acquire, organize and store recorded knowledge (Itsekor & Nwokeoma, 2017). According to the laws of library science (Ranganathan, 1931), every information resource must reach the information seeker, and vice versa. To facilitate such, resources 1 Junior Research Fellow, Department of Library and Information Science, University of Kalyani, Kalyani, Nadia – 741201, W.B., India;
[email protected] 2 Professor, Department of Library and Information Science, University of Kalyani, Kalyani, Nadia – 741201, W.B., India; Email:
[email protected] Postprint Dasgupta, T., & Mukhopadhyay, P. (2025). Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System Using Model Context Protocol. Proceedings of the LAB International Conference on Reimagining Librarianship: Forging the Future with AI Technologies, 249-261.
Reimagining Librarianship: Forging the Future with AI Technologies Page 250 have been properly organized and designated with bibliographic data for ages. The library catalogue performs the role of finding resources by its attributes and collocating related resources. With the evolution of cataloguing codes and standards, there has been uniformity in the description of bibliographic resources. Metadata standards have been used to describe digital resources. Be it the MARC21 family of standards, Dublin Core Metadata Elements Set (DCMES), or any other standard, they have a common driving factor, i.e. to facilitate the availability of resources. The library catalogue has evolved constantly in both its form and the objectives it aims to achieve. From the days of card catalogue kept in cabinets, we have reached the days of online public access catalogues (OPAC). Web-OPACs have enabled remote access to library resources. Digital resources that have emerged have also beaten time and space constraints to democratize access to information. But the physical and digital library resources had been facing the issue of being in silos, and had separate searching interfaces. To enhance the retrieval of all kinds of resources in such a scenario, library discovery layers were developed. They provide a single window search system for all kinds of resources. It is based on the technique of metadata harvesting, which creates a single index of all kinds of resources, designated by diverse metadata standards. Discovery systems like VuFind allow retrieval of resources from multiple back-ends (Bhowmick & Chakrabarty, 2021). Library retrieval systems, from the age of card catalogues up to the library discovery layers, have relied on a system of access points, also referred to as keywords. Searching the OPAC as well as discovery layers through keywords requires adequate familiarity with the interface. It requires users to follow proper technique to retrieve resources accurately. But this kind of searching often turns out to be overwhelming and lacks flexibility. A proposed natural language-based collection search system, which offers conversational searching facilities, envisions offering more lucidity and flexibility. This breaks the constraints that keyword-based searching puts upon the user, as it is more interactive. It also aims to increase user experience and satisfaction. This can be achieved with the aid of generative AI systems, which are able to converse in natural language. It also removes the intellectual load off the user’s brain and performs an analysis of the query to perform better searching. An empirical research conducted by (Neogi et al., 2025) shows the use of a conversational library searching system. The research showcases an AI-based retrieval system using Claude Desktop that used user conversations to search and retrieve records from the collection, and generates a lucid answer as a response. This research built a prototype for a conversational search system, but it was limited to a closed-source software stack. Hence it turned out to be less feasible as compared to some other potential open-source alternatives which might be built. 2. Background Study Artificial Intelligence (AI) has been the buzzword of the decade. It has impacted many facets of society, such as education, research, healthcare, entrepreneurship and much more. With the constant research and development in this field, many new technological innovations have emerged. AI models have been able to power pattern recognition,computer vision and robotics. Some of the most influential contributions of Model Context Protocol. Proceedings of the LAB International Conference on Reimagining Librarianship: Forging the Future with AI Technologies, 249-261. Postprint Dasgupta, T., & Mukhopadhyay, P. (2025). Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System Using
Searching the Library Through Commands... Page 251 AI have been in the tasks of Natural Language Processing (NLP), which is able to extract insights from unstructured natural language text and perform tasks such as sentiment analysis, named entity recognition, etc., and content generation. The latter has been due to the development of generative AI systems, which are based on Large Language Models (LLMs), built on the transformer architecture. LLMs have been trained on huge amounts of textual data, and generate text by predicting the next most probable token in a string. The LLMs have also made their way to powering AI agents. AI agents, following the cycle of thinking-acting-observing, have been able to perform tasks autonomously when exposed to sets of tools and prompts. Earlier, such agents lacked a standard way of integration with tools. With the arrival of Anthropic’s Model Context Protocol (MCP), a standard way has been developed in which the agents integrate with tools. It involves three parts: MCP Server, which contains programmatic specifications in which the agent uses tools, prompts and resources MCP Client MCP Host MCP Servers have populated the AI ecosystem in recent times. It also provides the proper structure for building the proposed natural language library retrieval system. 3. Related Literature To map the concept behind the natural language-based library retrieval system, various related works have been reviewed. (Kulshreshtha & Bajpai, 2018) mentions the impact of ICT on libraries. ICT has transformed library services hugely. With the emergence of newer technologies, libraries have always adopted them to provide better user experience and increase staff productivity. (Pagore, 2024) has elucidated the impact of ICT on academic libraries. It describes the way in which various library operations, such as accessioning, cataloguing, stock verification, and others, have been enhanced. AI, being the most influential development in the technological landscape in the current times, has impacted libraries as well. It has been able to automate various tasks in the realm of the library and information profession. (Ahmed, 2023) and (Kerketta & Mukhopadhyay, 2024) were able to demonstrate the use of AI in automatically indexing and classifying documents. This reduces the intellectual rigour that library staff have spent through the ages. Natural Language Processing (NLP) and Generative AI have been the cornerstone of the modern AI revolution. (Mukhopadhyay, 2025) designs a framework for a conversational library retrieval system. He emphasized on building the system using open-source LLMs that provide a free-of-cost and customizable option. He envisioned building a library reference service system using the Retrieval Augmented Generation (RAG) technique. It enhances the capabilities of LLMs, which often hallucinate. Another paper by (Mazumder & Mukhopadhyay, 2024) used a similar concept to build a question-answer based library search system. This increases user satisfaction and uses the LLM’s thinking capabilities to power information retrieval. Although RAG provides a suitable way to Model Context Protocol. Proceedings of the LAB International Conference on Reimagining Librarianship: Forging the Future with AI Technologies, 249-261. Postprint Dasgupta, T., & Mukhopadhyay, P. (2025). Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System Using
Reimagining Librarianship: Forging the Future with AI Technologies Page 252 enhance the power of LLMs, it lacks the ability to use tools to access external resources such as library catalogues which is the main focus of the current research. AI Agents have been able to hugely revolutionize the way the world works in a relatively little time of their existence. It has been governed by a set of protocols. (Yang et al., 2025) comprehensively analyses agent protocols. They systematically differentiate between context-oriented and inter-agent protocols, as well as general-purpose and domain-specific protocols. The Model Context Protocol, developed by Anthropic, provide a standardized way in which LLMs use tools, resources and prompts to perform tasks based on the provided context. (Hou et al., 2025) provided a seminal research work on the MCP. This research work focuses on comprehensively describing the MCP landscape, including its components and workflow. It also describes the life cycle of MCP servers. (Patil & Lokhande, 2025) shows how MCP provides scalable integrations by embedding contextual metadata into conversations. MCP provides a suitable way to build a framework for building a conversational library collection searching system. (Neogi et al., 2025) provided a seminal paper on the application of MCP in the field of library retrieval. It develops a framework for conversational library collection searching. It uses a closed source AI chat-bot, namely Claude Desktop, that are able to integrate MCP servers. An MCP server for VuFind has been used for the research that has been used by Claude Sonnet LLM to search the library collection indexed by VuFind. It provides a strong base for the research, as it is able to successfully showcase retrieved records for library resources through conversations. It was also able to perform crosslingual searching. Another research by (Dasgupta et al., 2025) uses the MCP architecture, involving Claude Sonnet LLM and a locally implemented MCP server for DSpace9, to search for digital library collections. It was successfully able to retrieve information on resources. These works provide a good background to the current research. 4. Research Gap The available literature are mainly based on closed-source LLM, namely Claude Sonnet, which lacks flexibility, as it is behind a pay-wall, which isn’t a suitable solution. Moreover, it provides a limit on the number of conversations we can have. Hence, although a suitable framework is available for conversational library collection searching in relevant literature, it fails to provide an open-source solution. This looks forward to research that explores an open-source architecture for such. 5. Research Objectives The main objectives of the research are : to develop an open-source framework for a conversational library collection search system, using open-source LLMs and Model Context Protocol (MCP) architecture, to use the Linux terminal to showcase the potential of a CLI-based, AI-powered library search system, and to test various kinds of searching through conversations, and compare the results with those of keyword-based searching on VuFind. Model Context Protocol. Proceedings of the LAB International Conference on Reimagining Librarianship: Forging the Future with AI Technologies, 249-261. Postprint Dasgupta, T., & Mukhopadhyay, P. (2025). Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System Using
Searching the Library Through Commands... Page 253 6. Materials and Methods 6.1. The Tools used To conduct the research methodology, a Ubuntu Linux system has been used. The tasks have been conducted through the command prompt, and when required, a Python3 virtual environment has been used. The following tools have been used (the reasons for using the mentioned tools have been mentioned as well) : MCP-CLI : It is a free and open-source, Python-based command-line tool, available on https://github.com/chrishayuk/mcp-cli, that provides the feature to run locally available MCP Servers, and LLMs running through a huge spectrum of providers, such as Ollama (used by default), Groq, Anthropic, OpenAI, etc. It requires a server configuration file that specifies commands for running the MCP servers. While running this, a suitable virtual environment has been used containing relevant Python libraries. Ollama :Ollama is an open-source platform to run local LLMs. It currently provides the option to run locally downloaded as well as cloud-based LLMs. Although the local LLMs are completely free but require the system to be powered by both CPU and GPU for the best performance, the cloud LLMs have a token limit (the free tokens are enough to meet various requirements) but runs smoothly on non-GPU-based systems as well. Ollama (v. 0.12.2) has been used for the purpose of the research. Qwen3 Coder Cloud model : The qwen3-coder:480b-cloud model has been used. It, although having a limit, runs smoothly on low configuration systems as well. This model has been used above other models, such as gpt-oss, deepseek-r1, etc., because of its capability to successfully use tools configured in MCP servers to perform agentic tasks. Since it is a cloud-based model, it requires an active internet connection to run. MCP Server for VuFind : An MCP Server for VuFind, available on https://github.com/jaohbib/MCP-for-VuFind, has been used to use the REST API endpoint of VuFind library discovery system to search for records using suitable prompts. It has been built using the Python programming language. VuFind : VuFind 10 has been used as a library discovery layer. It harvests metadata records from multiple back-ends such as Koha (v. 25.05), Greenstone (v. 3.12), Omeka (v. 3.12) and DSpace (v. 9.1), to provide a single-window search interface for the whole library collection. It has a REST API end-point for search, record and clearing the cache memory, and it comes with a Swagger UI to provide a graphical user interface for testing the APIs. The above mentioned open-source tools have been integrated to form a framework, which is easy to use and interactive. Although it lacks a GUI to run the system, it instills some confidence in the user’s mind to use the Linux command line, which is capable of various tasks. It also provides a unique way to search for library records. Model Context Protocol. Proceedings of the LAB International Conference on Reimagining Librarianship: Forging the Future with AI Technologies, 249-261. Postprint Dasgupta, T., & Mukhopadhyay, P. (2025). Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System Using
Reimagining Librarianship: Forging the Future with AI Technologies Page 254 6.2. The Framework Based on the above tools, a framework has been designed to enable the conversational terminal-based library collection searching system. Figure 1 demonstrates the framework. Figure 1 :Open-source framework for library collection searching through the Linux command line, using the Model Context Protocol As depicted in figure 1, Ollama uses the cloud version of the Qwen3 Coder (480 billion parameters) model, and connects it to the MCP CLI tool. The MCP CLI, further uses the MCP Server for VuFind to search the library’s collection indexed on VuFind from multiple sources such as Koha, Greenstone, Omeka and DSpace. This framework has been completely built on the top of an open-source software stack. 6.3. The Steps of Methodology Creation of a VuFind collection : The bibliographic data of e-books from Koha, and metadata of digital resources, namely open access e-books from Greenstone, and research articles from Omeka and DSpace have been harvested by VuFind using suitable commands in the Linux terminal. Following that, a central index is created that contains metadata of harvested records. The metadata harvested, is of multiple formats: MARC21 bibliographic format for records from Koha, and Dublin Core metadata for records from Greenstone, Omeka and DSpace. The REST API endpoint is tested to search records and used in the MCP server for VuFind. Configuration of Ollama cloud model : Using Ollama’s key, cloud models are configured into the local system. The Qwen3 Coder model (480 b) is pulled into the local system and requires an internet connection to run. Integration of MCP Server for VuFind with MCP-CLI : The locally downloaded MCP Server for VuFind is based on REST API endpoint for searching records. MCP-CLI, which is installed locally, runs on a Python virtual Model Context Protocol. Proceedings of the LAB International Conference on Reimagining Librarianship: Forging the Future with AI Technologies, 249-261. Postprint Dasgupta, T., & Mukhopadhyay, P. (2025). Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System Using
Searching the Library Through Commands... Page 255 environment. Its configuration file (server_config.json) has been populated with details about running the MCP server. Running MCP-CLI and searching on VuFind : Entering the directory for MCP-CLI, the following command is executed (with default provider as Ollama): $ mcp-cli --model qwen3-coder:480b-cloud Figure 2 shows the successful usage of MCP CLI on the Linux terminal. As shown in the figure, it executes the MCP Server for VuFind that has been connected to it. It also shows that the Ollama engine is using the Qwen3 Coder cloud model for working. Figure 2 :Running the MCP CLI through the Linux Terminal while using Ollama, Qwen3 Coder cloud model and the MCP server for VuFind Performing natural language search using MCP CLI : Upon successfully executing the command and running MCP CLI, the following kinds of e-book searching has been performed : (a) Title search, (b) Author search, and (c) Subject search. It has been done in the form of a simple natural language question. Firstly, the LLM analyses the user query. Then, the LLM utilizes the tool named search_literature used in the MCP server. After taking the user’s permission, it executes the tool and searches for the e-book. Performing keyword-based search on VuFind : To compare the results of the conversational search system through MCP CLI in sorting records by relevance, similar browsing has been done on the VuFind interface. After ensuring that the back-end Solr is running, the search has been performed on VuFind. Using Model Context Protocol. Proceedings of the LAB International Conference on Reimagining Librarianship: Forging the Future with AI Technologies, 249-261. Postprint Dasgupta, T., & Mukhopadhyay, P. (2025). Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System
Reimagining Librarianship: Forging the Future with AI Technologies Page 256 7. Results 7.1. Basic Searching Various types of searching have been tested using the MCP-CLI. This includes various types of searches, namely Title Search, Author Search and Subject Search, as mentioned earlier. Each of them has been performed to retrieve records on e-books in the library collection. Figure 3 :Searching by title of the e-book “Advanced Anthroscopy” using MCP-CLI Figure 3 demonstrates searching by the title of an e-book “Advanced Anthroscopy” by using a natural language query in the form of a simple question. As observed in the figure, after it accurately returns the record of the book which has the title that is searched for. It properly generates an answer-like result, that showcases bibliographic details of the e-book, namely the title, the authors/editors, format of the resource, language, subjects covered, identifier (here, ISBN) and the URL to access the e-book. It shows the capability of searching the catalogue in human language. Similarly, other kinds of searches have been conducted. Figure 4 :Searching e-book written by Paul V. Trad using MCP-CLI Postprint Dasgupta, T., & Mukhopadhyay, P. (2025). Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System Using Model Context Protocol. Proceedings of the LAB International Conference on Reimagining Librarianship: Forging the Future with AI Technologies, 249-261.
Searching the Library Through Commands... Page 257 Figure 4 demonstrates searching of e-book written by author Paul V. Trad. It is also done using a simple query. It also returns the result in form of a structured answer. Table 1 demonstrates the number of results retrieved upon search, time taken for response, chunks streamed in the process, and the length of the response upon title and author search. Type of Search Number of retrieved results Response time (in seconds) Title Search 1 3.32 Author Search 1 3.18 Table 1 :Number of results retrieved and response time for title and author searching Figure 5 :Searching e-book by subject “Pediatrics” using MCP-CLI Similarly, figure 5 demonstrates the searching of records on the subject “pediatrics”. It returned 8 records of resources on the subject. 7.2. Comparison of results between MCP-CLI and VuFind Interface When asked to sort results of the previous search, i.e. subject search, by relevance, it returned results as shown in figure 6. Using Model Context Protocol. Proceedings of the LAB International Conference on Reimagining Librarianship: Forging the Future with AI Technologies, 249-261. Postprint Dasgupta, T., & Mukhopadhyay, P. (2025). Searching the Library Through Commands: Implementing an Open Source Command Line-Based Conversational Library Search System