About Fastmcp Joke Chat Tool Bot
Fastmcp Joke Chat Tool Bot is an MCP server in the AI category: this project is a simple AI-powered bot system using FastMCP, featuring a chat tool for general conversation and a joke tool for explaining or generating jokes, all accessible via a unified server and a command-line client.
Install
git clone https://github.com/Sachinawat/fastmcp-joke-chat-tool-botThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Fastmcp Joke Chat Tool Bot
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
fastmcp-joke-chat-tool-bot
An example project demonstrating a simple Multi-Context Protocol (MCP) server and client using FastMCP, with two tools: a chatbot and a joke explainer.
Features
- Chat Tool: General-purpose AI chatbot using OpenAI's API.
- Joke Tool: Explains jokes or cracks new ones using OpenAI's API.
- MCP Server: Unified server exposing both tools via HTTP.
- Async Client: Command-line client to interact with the server and select tools automatically.
Project Structure
servers/server.py: Starts the MCP server and registers tools.servers/mcp_app.py: Initializes the FastMCP app instance.servers/tools/chat_tool.py: Implements the chat tool.servers/tools/joke_tool.py: Implements the joke tool.clients/client.py: Async CLI client for interacting with the server.requirements.txt: Python dependencies.
Setup
- Clone the repository
- Install dependencies:
pip install -r requirements.txt - Set environment variables:
- Create a
.envfile with your OpenAI API key:OPENAI_API_KEY=your_openai_api_key OPENAI_MODEL=gpt-4o-mini
- Create a
Running the Server
python servers/server.py
The server will start on http://127.0.0.1:8000/mcp.
Using the Client
python clients/client.py
Type your message. If it contains the word "joke", the joke tool is used; otherwise, the chat tool is used. Type exit to quit.
Example
You: Tell me a joke about computers.
[explain_joke] → (AI-generated joke or explanation)
You: How do I reverse a list in Python?
[chat] → (AI-generated answer)
Credits
- Built with FastMCP and OpenAI API.
MIT License
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.