Related MCP Server Resources

Explore more AI models, providers, and integration options:

  • Explore AI Models
  • Explore AI Providers
  • Explore MCP Servers
  • LangDB Pricing
  • Documentation
  • AI Industry Blog
  • Powertools MCP Search Server
  • Airtable MCP
  • AWS Knowledge Base Retrieval MCP Server
  • crawl4ai-mcp
  • Semgrep MCP Server
Back to MCP Servers
LLM Tool-Calling Assistant

LLM Tool-Calling Assistant

Public
o6-webwork/mcp-template

Connect local large language models to real-world tools, knowledge bases, and APIs via Model Context Protocol (MCP) for automated tool execution, knowledge retrieval, and seamless integration using HTTP, OpenAI SDK, stdio, or SSE transports.

python
0 tools
May 30, 2025
Updated Jun 4, 2025

Supercharge Your AI with LLM Tool-Calling Assistant

MCP Server

Unlock the full potential of LLM Tool-Calling Assistant through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.

Unified API Access
Complete Tracing
Instant Setup
Get Started Now

Free tier available β€’ No credit card required

Instant Setup
99.9% Uptime
10,000+Monthly Requests

🧠 LLM Tool-Calling Assistant with MCP Integration

Connect your local LLM to real-world tools, knowledge bases, and APIs via MCP.

This project connects a local LLM (e.g. Qwen) to tools such as a calculator or a knowledge base via the MCP protocol. The assistant automatically detects and calls these tools to help answer user queries.


πŸ“¦ Features

  • πŸ”§ Tool execution through MCP server
  • 🧠 Local LLM integration via HTTP or OpenAI SDK
  • πŸ“š Knowledge base support (data.json)
  • ⚑ Supports stdio and sse transports

πŸ—‚ Project Files

FileDescription
server.pyRegisters tools and starts MCP server
client-http.pyUses aiohttp to communicate with local LLM
clientopenai.pyUses OpenAI-compatible SDK for LLM + tool call logic
client-stdio.pyMCP client using stdio
client-see.pyMCP client using SSE
data.jsonQ&A knowledge base

πŸ“₯ Installation

Requirements

Python 3.8+

Install dependencies:

pip install -r requirements.txt

requirements.txt

aiohttp==3.11.18
nest_asyncio==1.6.0
python-dotenv==1.1.0
openai==1.77.0
mcp==1.6.0

πŸš€ Getting Started

1. Run the MCP server

python server.py

This launches your tool server with functions like add, multiply, and get_knowledge_base.

2. Start a client

Option A: HTTP client (local LLM via raw API)

python client-http.py

Option B: OpenAI SDK client

python client-openai.py

Option C: stdio transport

python client-stdio.py

Option D: SSE transport

Make sure server.py sets:

transport = "sse"

Then run:

python client-sse.py

πŸ’¬ Example Prompts

Math Tool Call

What is 8 times 3?

Response:

Eight times three is 24.

Knowledge Base Question

What are the healthcare benefits available to employees in Singapore?

Response will include the relevant answer from data.json.


πŸ“ Example: data.json

[ { "question": "What is Singapore's public holiday schedule?", "answer": "Singapore observes several public holidays..." }, { "question": "How do I apply for permanent residency in Singapore?", "answer": "Submit an online application via the ICA website..." } ]

πŸ”§ Configuration

Inside client-http.py or clientopenai.py, update the following:

LOCAL_LLM_URL = "..." TOKEN = "your-api-token" LOCAL_LLM_MODEL = "your-model"

Make sure your LLM is serving OpenAI-compatible API endpoints.


🧹 Cleanup

Clients handle tool calls and responses automatically. You can stop the server or client using Ctrl+C.


πŸͺͺ License

MIT License. See LICENSE file.

Publicly Shared Threads0

Discover shared experiences

Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!

Share your threads to help others
Related MCPs5
  • Powertools MCP Search Server
    Powertools MCP Search Server

    Model Context Protocol server enabling efficient local search of AWS Lambda Powertools documentation...

    2 tools
    Added May 30, 2025
  • Airtable MCP
    Airtable MCP

    Connect AI tools to Airtable via Model Context Protocol to manage bases, tables, schemas, and record...

    Added May 30, 2025
  • AWS Knowledge Base Retrieval MCP Server
    AWS Knowledge Base Retrieval MCP Server

    Retrieval-Augmented Generation (RAG) server enabling efficient extraction of contextual information ...

    Added May 30, 2025
  • crawl4ai-mcp
    crawl4ai-mcp

    Integrates web scraping and crawling tools with Model Context Protocol to enable large language mode...

    Added May 30, 2025
  • Semgrep MCP Server
    Semgrep MCP Server

    Model Context Protocol server enabling seamless integration of Semgrep’s fast, semantic static code ...

    6 tools
    Added May 30, 2025