MCP Time server error #5819
-
What happened?MCP integration is working great overall. Big fan. I hit a simple one that seems to throw an error, though: Adding the time mcp server to librechat.yaml causes the following error:
Version Information
Steps to ReproduceFrom LibreChat.yaml
What browsers are you seeing the problem on?Chrome, Firefox Relevant log outputLibreChat | "baseURL": "XXXXXXXXXX",
LibreChat | "models": {
LibreChat | "default": [
LibreChat | "qwen2.5-coder:7b-instruct",
LibreChat | "llama3.2",
LibreChat | "llama3.2-vision",
LibreChat | "deepseek-r1"
LibreChat | ],
LibreChat | "fetch": true
LibreChat | },
LibreChat | "titleConvo": true,
LibreChat | "titleModel": "current_model",
LibreChat | "summarize": false,
LibreChat | "summaryModel": "current_model",
LibreChat | "forcePrompt": false,
LibreChat | "modelDisplayLabel": "Ollama"
LibreChat | }
LibreChat | ]
LibreChat | }
LibreChat | }
LibreChat | 2025-02-12 02:58:32 info: RAG API is running and reachable at http://rag_api:8000.
LibreChat | 2025-02-12 02:58:32 info: [MCP] Initializing servers
LibreChat | 2025-02-12 02:58:32 info: [MCP][postgres] Connection state: connecting
LibreChat | 2025-02-12 02:58:32 info: [MCP][sequential-reasoning] Connection state: connecting
LibreChat | 2025-02-12 02:58:32 info: [MCP][time] Connection state: connecting
LibreChat | 2025-02-12 02:58:32 info: [MCP][time] Connection state: error
LibreChat | 2025-02-12 02:58:32 error: [MCP][time] Connection failed: spawn python ENOENT
LibreChat | 2025-02-12 02:58:34 info: [MCP][time] Connection state: disconnected
LibreChat | 2025-02-12 02:58:34 info: [MCP][time] Connection state: connecting
LibreChat | 2025-02-12 02:58:34 info: [MCP][time] Connection state: error
LibreChat | 2025-02-12 02:58:34 error: [MCP][time] Connection failed: spawn python ENOENT
LibreChat | 2025-02-12 02:58:35 info: [MCP][postgres] Connection state: connected
LibreChat | 2025-02-12 02:58:35 info: [MCP][postgres] Capabilities: {"resources":{},"tools":{}}
LibreChat | 2025-02-12 02:58:35 info: [MCP][postgres] Available tools: query
LibreChat | Sequential Thinking MCP Server running on stdio
LibreChat | 2025-02-12 02:58:35 info: [MCP][sequential-reasoning] Connection state: connected
LibreChat | 2025-02-12 02:58:35 info: [MCP][sequential-reasoning] Capabilities: {"tools":{}}
LibreChat | 2025-02-12 02:58:35 info: [MCP][sequential-reasoning] Available tools: sequentialthinking
LibreChat | 2025-02-12 02:58:38 info: [MCP][time] Connection state: disconnected
LibreChat | 2025-02-12 02:58:38 info: [MCP][time] Connection state: connecting
LibreChat | 2025-02-12 02:58:38 info: [MCP][time] Connection state: error
LibreChat | 2025-02-12 02:58:38 error: [MCP][time] Connection failed: spawn python ENOENT
LibreChat | 2025-02-12 02:58:38 error: [MCP][time] Failed after 3 attempts
LibreChat | 2025-02-12 02:58:38 error: [MCP][time] Initialization failed spawn python ENOENT
LibreChat | 2025-02-12 02:58:38 info: [MCP] Initialized 2/3 server(s)
LibreChat | 2025-02-12 02:58:38 warn: [MCP] 1/3 server(s) failed to initialize
LibreChat | 2025-02-12 02:58:38 info: [MCP][postgres] ✓ Initialized
LibreChat | 2025-02-12 02:58:38 info: [MCP][sequential-reasoning] ✓ Initialized
LibreChat | 2025-02-12 02:58:38 info: [MCP][time] ✗ Failed
LibreChat | 2025-02-12 02:58:38 info: No changes needed for 'USER' role permissions
LibreChat | 2025-02-12 02:58:38 info: No changes needed for 'ADMIN' role permissions
LibreChat | 2025-02-12 02:58:38 info: Server listening on all interfaces at port 3080. Use http://localhost:3080 to access it ScreenshotsNo response Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Thank you. Python based MCP servers are not supported yet, simply because the core project that spawns the processes have no Python dependencies. You can work around this with MCP Gateway MCP supergateway (other projects that bridge MCP connections) |
Beta Was this translation helpful? Give feedback.
-
I have deployed LibreChat locally on MacOS using Docker Desktop. After some trial and error, I successfully configured the following MCP Servers and Actions (OpenAI Schema). MCP Server:
Actions:
My configuration might not be optimal, so please use it for reference only. I recommend using something like MCP Supergateway to convert stdio to SSE. librechat.yaml mcpServers config: mcpServers:
time:
type: stdio
command: uvx
args:
- "mcp-server-time"
timeout: 60000
initTimeout: 30000
filesystem:
type: stdio
command: npx
args:
- -y
- "@modelcontextprotocol/server-filesystem"
- /app/userfolder/ # This folder is my personal folder
- /app/
timeout: 60000
initTimeout: 30000
bravesearch:
type: stdio
command: npx
args:
- -y
- "@modelcontextprotocol/server-brave-search"
env:
BRAVE_API_KEY: "input api key here"
# PATH: run `echo $PATH` in Terminal, copy output to here
PATH: "/Users/test/.rvm/gems/ruby-3.3.5/bin:/Users/test/.rvm/gems/ruby-3.3.5@global/bin:/Users/test/.rvm/rubies/ruby-3.3.5/bin:/Users/test/.codeium/windsurf/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/test/Library/Application Support/JetBrains/Toolbox/scripts:/Users/test/.rvm/bin:/Users/test/.pub-cache/bin:/Users/test/Desktop/Flutter/bin"
# Node Path
NODE_PATH: "/opt/homebrew/lib/node_modules"
timeout: 60000
initTimeout: 30000
tavily:
type: stdio
command: /venv/bin/python3
args:
- -m
- "mcp_server_tavily"
env:
TAVILY_API_KEY: "input api key here"
timeout: 60000
initTimeout: 30000
sequential-thinking:
type: stdio
command: npx
args:
- -y
- "@modelcontextprotocol/server-sequential-thinking"
timeout: 60000
initTimeout: 30000
puppeteer:
type: sse
url: http://host.docker.internal:8110/sse
timeout: 60000
initTimeout: 30000
amap-maps:
type: sse
url: https://mcp.amap.com/sse?key=apikey
timeout: 60000
initTimeout: 30000 docker-compose.override.yml services:
api:
networks:
- default
- librechat_to_crawl4ai_bridge
# use apk to install python which required by time. rust and cargo are required by mcp-tavily. use venv to install mcp-tavily.
command: sh -c "apk update && apk add python3 py3-pip rust cargo && python3 -m venv /venv && . /venv/bin/activate && pip3 install mcp-tavily && exec npm run backend:dev"
volumes:
- type: bind
source: ./librechat.yaml
target: /app/librechat.yaml
- type: bind # This config bind /app/userfolder inside Docker to my folder in my macOS Desktop/AI
source: /Users/test/Desktop/AI
target: /app/userfolder
extra_hosts: # This config is used by puppeteer
- "host.docker.internal:host-gateway"
networks:
default:
name: librechat_default
librechat_to_crawl4ai_bridge:
name: librechat_to_crawl4ai_bridge
external: true studio
docker-compose.override.yml sse
Running Puppeteer within a Docker LibreChat Container can be challenging; even after successful installation, runtime errors often occur. As a result, I opted for the MCP Supergateway approach, running it locally on macOS and connecting to LibreChat via SSE. screen -S supergateway
npx -y supergateway --stdio "npx -y @modelcontextprotocol/server-puppeteer" --port 8110 Pressing Ctrl + A, followed by D, will detach the Screen session. Next, we need to modify the docker-compose.override.yml file to allow LibreChat, running within Docker, to access the SSE service running locally on macOS. Note: the host.docker.internal:host-gateway syntax is only supported by Docker Desktop. extra_hosts: # This config is used by puppeteer
- "host.docker.internal:host-gateway" Finally, modify librechat.yaml. The port number should match the one specified in the command line (8110). puppeteer:
type: sse
url: http://host.docker.internal:8110/sse
timeout: 60000
initTimeout: 30000 ActionsOkay, here's a brief overview of my setup. I've locally deployed FireCrawl and Perplexica using Docker. By creating a Docker network librechat_to_crawl4ai_bridge, and adding LibreChat, FireCrawl, and Perplexica to this network, I enable LibreChat to call the other two Docker-deployed services. The docker-compose.yaml file for Perplexica requires adjustment because its default network doesn't allow adding other networks. You need to add - librechat_to_crawl4ai_bridge to the container's network configuration and modify the networks section accordingly. networks:
perplexica-network:
name: perplexica-network
attachable: true
librechat_to_crawl4ai_bridge:
name: librechat_to_crawl4ai_bridge
external: true Then in LibreChat Agent Eidt Actions Page Perplexica Actions Schema
FireCrawl Actions Schema, Only Scrape
Hopefully, the above information will be helpful to those who need it. |
Beta Was this translation helpful? Give feedback.
-
By the way, even though I'm using Supergateway to run Puppeteer in SSE mode, I'm still encountering issues. Opening web pages, routing navigation, and executing scripts work fine, but taking screenshots is problematic. The tool returns data after taking a screenshot, but it can't be displayed in LibreChat. I don't know the reason for this yet. |
Beta Was this translation helpful? Give feedback.
-
Python based servers are supported now with uv/uvx |
Beta Was this translation helpful? Give feedback.
Thank you. Python based MCP servers are not supported yet, simply because the core project that spawns the processes have no Python dependencies. You can work around this with MCP Gateway MCP supergateway (other projects that bridge MCP connections)