mcp-server-demo
This document provides a comprehensive guide on setting up and using a Model Context Protocol (MCP) server with LibreChat and Ollama.
Installation
-
cd IpServer && npm install && npm run build && npm run start
-
install a local mongodb server and serve it on mongodb://127.0.0.1:27017
-
cd LibreChat && git clone :danny-avila/LibreChat.git && mv .env.example .env && npm install && npm run frontend && npm run backend
-
add following configuration to your librechat.yaml file:
mcpServers:
ipServer:
# type: sse # type can optionally be omitted
url: http://localhost:3000/sse
timeout: 60000 # 1 minute timeout for this server, this is the default timeout for MCP servers.
endpoints:
custom:
- name: "Ollama"
apiKey: "ollama"
# use 'host.docker.internal' instead of localhost if running LibreChat in a docker container
baseURL: "http://localhost:11434/v1/chat/completions"
models:
default:
[
"qwen2.5:3b-instruct-q4_K_M",
"mistral:7b-instruct-q4_K_M",
"gemma:7b-instruct-q4_K_M",
]
# fetching list of models is supported but the `name` field must start
# with `ollama` (case-insensitive), as it does in this example.
fetch: true
titleConvo: true
titleModel: "current_model"
summarize: false
summaryModel: "current_model"
forcePrompt: false
modelDisplayLabel: "Ollama"
- download and run ollama, download a model from https://ollama.ai/models/ and serve ollama on http://localhost:11434/
Usage
-
Visit http://localhost:3080/ to see the LibreChat UI.
-
Create a new agent with the name "Ollama" and select the ollama as the model provider and select a model
-
Click on the Add Tools button below and add the get-external-ip, get-local-ip-v6, get-external-ip-v6, get-local-ip tools
-
Ask agent what's my local ip address? / what's my external ip address? / what's my external ipv6 address? / what's my internal ipv6 address?
-
Agent should invoke your tools and return the results.
Related MCP Servers
View all ai_chatbot servers →exa-mcp-server
by exa-labs
A Model Context Protocol (MCP) server allows AI assistants to use the Exa AI Search API for real-time web searches in a secure manner.
Sequential Thinking
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
gateway
by centralmind
CentralMind Gateway is a tool designed to expose databases to AI agents via MCP or OpenAPI protocols, providing secure, LLM-optimized APIs.
osp_marketing_tools
by open-strategy-partners
A comprehensive suite of tools for technical marketing content creation, optimization, and product positioning based on Open Strategy Partners' proven methodologies.
mcp-server-calculator
by githejie
A Model Context Protocol server for calculating. This server enables LLMs to use calculator for precise numerical calculations.
repomix
by yamadashy
Repomix is a tool that packs your codebase into AI-friendly formats, making it easier to use with AI tools like LLMs.
ai-agent-marketplace-index-mcp
by AI-Agent-Hub
MCP Server for AI Agent Marketplace Index from DeepNLP, allowing AI assistants to search available AI agents by keywords or categories.