trackmcp
Back to directory
gmogmzGithub

mcp-knowledgebase-llm

View on GitHub

A lightweight knowledge base assistant using MCP with LLM integration. Features a streamlined server-client architecture combining custom tools with a knowledge base, all accessible via SSE transport. Ideal for building simple AI-powered knowledge assistants.

1 stars PythonAI & Machine Learning Updated May 11, 2025

Documentation

MCP Knowledge Base

A simple MCP client-server

Requirements

  • Python 3.9 or higher
  • Poetry for dependency management
  • OpenAI API key

Setup

1. Install dependencies using Poetry:

bash
poetry install

2Create a `.env` file in the project root or parent directory with your OpenAI API key:

code
OPENAI_API_KEY=your_api_key_here

Project Structure

  • `server.py`: MCP server implementation with tools
  • `client-sse.py`: MCP client implementation with LLM capabilities
  • `data/kb.json`: Knowledge base data with MCP-related Q&A
  • `pyproject.toml`: Poetry configuration file

Running the Application

1. Start the server:

bash
poetry run python server.py

2. In a separate terminal, run the client:

bash
poetry run python client-sse.py

Using the Client

The client has two modes:

1. Direct tool calls:

    2. LLM-powered interactions (default):

      Customizing

      • Add new tools to `server.py` by creating additional functions with the `@mcp.tool()` decorator
      • Modify the knowledge base by updating `data/kb.json`
      • Change the OpenAI model by modifying the `model` parameter in the `MCPClient` class

      Frequently asked questions

      What is mcp-knowledgebase-llm?

      mcp-knowledgebase-llm is A lightweight knowledge base assistant using MCP with LLM integration. Features a streamlined server-client architecture combining custom tools with a knowledge base, all accessible via SSE transport. Ideal for building simple AI-powered knowledge assistants.

      How do I install mcp-knowledgebase-llm?

      Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

      Is mcp-knowledgebase-llm open source?

      Yes — it is hosted on GitHub at https://github.com/gmogmzGithub/mcp-knowledgebase-llm and has 1 stars.

      Related MCP tools

      Run your own MCP server? See who uses it and what to fix.

      Measure it with TrackMCP