Chatbot

Developer tools

A chatbot implementation compatible with MCP (terminal / streamlit supported).

Your AI app calls the Chatbot MCP server, which does the developer tools work and sends the result back to the chat.

About Chatbot

Chatbot is a community MCP server from keli-wen, filed in our directory under developer tools. A chatbot implementation compatible with MCP (terminal / streamlit supported).

At a glance

Publisher
keli-wen (community)
Runs
See the README for setup
Written in
Python
License
MIT
GitHub stars
252

How to set up Chatbot

  1. Follow the install steps in the Chatbot README; it is written in Python, so have that toolchain ready.
  2. Check the Chatbot README for keys or settings; the registry lists none that Chatbot requires.
  3. Add Chatbot to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Chatbot tools to confirm the connection.
  5. Run one read-only task with Chatbot first, and keep your app asking before each tool call until the results look right.

Chatbot compared with similar servers

  • Live Coding Music by williamzujkowski has fewer GitHub stars than Chatbot (252 against 252); both are community servers, and both run locally.
  • Squeez by claudioemmanuel has more GitHub stars than Chatbot (254 against 252); both are community servers, and both run locally.
  • Chatbot (3choff) by 3choff has fewer GitHub stars than Chatbot (251 against 252); both are community servers, and both run locally.

Before you connect Chatbot

  • Give Chatbot its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Chatbot tool call until you trust what it does with them.
  • Treat text that Chatbot fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Chatbot on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Chatbot

How marketing and sales teams put Chatbot to work, by company size. Pick the size closest to yours and start Chatbot on one use case.

Small business

  • A small business with a developer can use Chatbot to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Chatbot to explain and fix a marketing site issue without context switching between tools.
  • Chatbot runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Chatbot to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Chatbot to keep scripts and automations documented and versioned as they change.
  • Start Chatbot on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Chatbot with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Chatbot so web and marketing engineering share one reviewed way of working with AI.
  • Chatbot is a community server, so have security review the code and pin a version before Chatbot touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Chatbot README

From keli-wen/mcp_chatbot on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

MCPChatbot Example

This project demonstrates how to integrate the Model Context Protocol (MCP) with customized LLM (e.g. Qwen), creating a powerful chatbot that can interact with various tools through MCP servers. The implementation showcases the flexibility of MCP by enabling LLMs to use external tools seamlessly.

[!TIP] For Chinese version, please refer to README_ZH.md.

Overview

Chatbot Streamlit Example

Workflow Tracer Example

  • 🚩 Update (2025-04-11):
    • Added chatbot streamlit example.
  • 🚩 Update (2025-04-10):
    • More complex LLM response parsing, supporting multiple MCP tool calls and multiple chat iterations.
    • Added single prompt examples with both regular and streaming modes.
    • Added interactive terminal chatbot examples.

This project includes:

  • Simple/Complex CLI chatbot interface
  • Integration with some builtin MCP Server like (Markdown processing tools)
  • Support for customized LLM (e.g. Qwen) and Ollama
  • Example scripts for single prompt processing in both regular and streaming modes
  • Interactive terminal chatbot with regular and streaming response modes

Requirements

  • Python 3.10+
  • Dependencies (automatically installed via requirements):
    • python-dotenv
    • mcp[cli]
    • openai
    • colorama

Installation

  1. Clone the repository:

    git clone git@github.com:keli-wen/mcp_chatbot.git
    cd mcp_chatbot
    
  2. Set up a virtual environment (recommended):

    cd folder
    
    # Install uv if you don't have it already
    pip install uv
    
    # Create a virtual environment and install dependencies
    uv venv .venv --python=3.10
    
    # Activate the virtual environment
    # For macOS/Linux
    source .venv/bin/activate
    # For Windows
    .venv\Scripts\activate
    
    # Deactivate the virtual environment
    deactivate
    
  3. Install dependencies:

    pip install -r requirements.txt
    # or use uv for faster installation
    uv pip install -r requirements.txt
    
  4. Configure your environment:

    • Copy the .env.example file to .env:

      cp .env.example .env
      
    • Edit the .env file to add your Qwen API key (just for demo, you can use any LLM API key, remember to set the base_url and api_key in the .env file) and set the paths:

      LLM_MODEL_NAME=your_llm_model_name_here
      LLM_BASE_URL=your_llm_base_url_here
      LLM_API_KEY=your_llm_api_key_here
      OLLAMA_MODEL_NAME=your_ollama_model_name_here
      OLLAMA_BASE_URL=your_ollama_base_url_here
      MARKDOWN_FOLDER_PATH=/path/to/your/markdown/folder
      RESULT_FOLDER_PATH=/path/to/your/result/folder
      

Important Configuration Notes ⚠️

Before running the application, you need to modify the following:

  1. MCP Server Configuration: Edit mcp_servers/servers_config.json to match your local setup:

    {
        "mcpServers": {
            "markdown_processor": {
                "command": "/path/to/your/uv",
                "args": [
                    "--directory",
                    "/path/to/your/project/mcp_servers",
                    "run",
                    "markdown_processor.py"
                ]
            }
        }
    }
    

    Replace /path/to/your/uv with the actual path to your uv executable. You can use which uv to get the path. Replace /path/to/your/project/mcp_servers with the absolute path to the mcp_servers directory in your project. (For Windows users, you can take a look at the example in the Troubleshooting section)

  2. Environment Variables: Make sure to set proper paths in your .env file:

    MARKDOWN_FOLDER_PATH="/path/to/your/markdown/folder"
    RESULT_FOLDER_PATH="/path/to/your/result/folder"
    

    The application will validate these paths and throw an error if they contain placeholder values.

You can run the following command to check your configuration:

bash scripts/check.sh

Usage

Unit Test

You can run the following command to run the unit test:

bash scripts/unittest.sh
Examples
Single Prompt Examples

The project includes two single prompt examples:

  1. Regular Mode: Process a single prompt and display the complete response

    python example/single_prompt/single_prompt.py
    
  2. Streaming Mode: Process a single prompt with real-time streaming output

    python example/single_prompt/single_prompt_stream.py
    

Both examples accept an optional --llm parameter to specify which LLM provider to use:

python example/single_prompt/single_prompt.py --llm=ollama

[!NOTE] For more details, see the Single Prompt Example README.

Terminal Chatbot Examples

The project includes two interactive terminal chatbot examples:

  1. Regular Mode: Interactive terminal chat with complete responses

    python example/chatbot_terminal/chatbot_terminal.py
    
  2. Streaming Mode: Interactive terminal chat with streaming responses

    python example/chatbot_terminal/chatbot_terminal_stream.py
    

Both examples accept an optional --llm parameter to specify which LLM provider to use:

python example/chatbot_terminal/chatbot_terminal.py --llm=ollama

[!NOTE] For more details, see the Terminal Chatbot Example README.

Streamlit Web Chatbot Example

The project includes an interactive web-based chatbot example using Streamlit:

streamlit run example/chatbot_streamlit/app.py

This example features:

  • Interactive chat interface.
  • Real-time streaming responses.
  • Detailed MCP tool workflow visualization.
  • Configurable LLM settings (OpenAI/Ollama) and MCP tool display via the sidebar.

[!NOTE] For more details, see the Streamlit Chatbot Example README.

Project Structure

  • mcp_chatbot/: Core library code
    • chat/: Chat session management
    • config/: Configuration handling
    • llm/: LLM client implementation
    • mcp/: MCP client and tool integration
    • utils/: Utility functions (e.g. WorkflowTrace and StreamPrinter)
  • mcp_servers/: Custom MCP servers implementation
    • markdown_processor.py: Server for processing Markdown files
    • servers_config.json: Configuration for MCP servers
  • data-example/: Example Markdown files for testing
  • example/: Example scripts for different use cases
    • single_prompt/: Single prompt processing examples (regular and streaming)
    • chatbot_terminal/: Interactive terminal chatbot examples (regular and streaming)
    • chatbot_streamlit/: Interactive web chatbot example using Streamlit

Extending the Project

You can extend this project by:

  1. Adding new MCP servers in the mcp_servers/ directory
  2. Updating the servers_config.json to include your new servers
  3. Implementing new functionalities in the existing servers
  4. Creating new examples based on the provided templates

Troubleshooting

For Windows users, you can take the following servers_config.json as an example:

{
    "mcpServers": {
        "markdown_processor": {
            "command": "C:\\Users\\13430\\.local\\bin\\uv.exe",
            "args": [
                "--directory",
                "C:\\Users\\13430\\mcp_chatbot\\mcp_servers",
                "run", 
                "markdown_processor.py"
            ]
        }
    }
}
  • Path Issues: Ensure all paths in the configuration files are absolute paths appropriate for your system
  • MCP Server Errors: Make sure the tools are properly installed and configured
  • API Key Errors: Verify your API key is correctly set in the .env file

Questions about Chatbot

What is the Chatbot MCP server?

A chatbot implementation compatible with MCP (terminal / streamlit supported). Chatbot is maintained by keli-wen on GitHub at keli-wen/mcp_chatbot, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Chatbot MCP server?

Chatbot doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (keli-wen/mcp_chatbot). Like most servers, Chatbot ends with a command or URL you paste into your AI app's MCP config.

Does Chatbot need an API key?

The registry lists no required keys for Chatbot. Check the Chatbot README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Chatbot an official MCP server?

No. Chatbot is a community server maintained by keli-wen. Community servers can be excellent; read the code and the open issues before you give Chatbot access to company data.

What license is Chatbot under?

Chatbot is released under the MIT license, according to its GitHub repository. The license covers the code of Chatbot; the service it connects to has its own terms.