TOOL4LM
TOOL4LM is a versatile MCP server that enhances local or remote Large Language Models with a comprehensive suite of utility tools:
Mathematical Computing: Evaluate mathematical expressions with adjustable precision using
calc.evalMulti-Engine Web Search: Conduct searches across multiple engines like SearXNG and DuckDuckGo with
web.searchWeb Content Access: Fetch web pages securely with size/time limits (
web.fetch) and extract readable content from HTML (web.read)Local Document Management: Search within sandboxed directories (
doc.find), read various file formats including text, markdown, HTML, and PDF (doc.read), and build/manage search indexes (index.build)Academic Research: Search scholarly papers on platforms like arXiv and Crossref (
sch.search), retrieve detailed metadata using DOIs or arXiv IDs (sch.get)Wikipedia Integration: Search Wikipedia titles (
wiki.search) and retrieve article summaries (wiki.get)
All tools support both dot notation and underscore aliases (e.g., calc.eval or calc_eval) for flexible integration.
Enables searching and retrieving academic papers and metadata from arXiv preprint repository
Provides access to academic paper metadata and information through DOI (Digital Object Identifier) lookups via Crossref
Enables web search functionality through DuckDuckGo's search engine with support for deduplication and result filtering
Provides web search capabilities through SearXNG metasearch engine instances with configurable endpoints
Allows searching Wikipedia articles and retrieving article summaries with multi-language support
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TOOL4LM search for recent developments in quantum computing and summarize the top 3 results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TOOL4LM — Multi-Tool MCP Server for Local LMs
All-in-one tools to supercharge your local or remote LLMs.
Search smarter. Calculate faster. Summarize better.
TOOL4LM là một MCP (Model Context Protocol) server viết bằng Node.js/TypeScript giúp bổ sung công cụ cho các mô hình ngôn ngữ chạy cục bộ (LM Studio/Ollama/…): web search, đọc & tóm tắt trang, tìm & đọc tài liệu nội bộ, tra cứu học thuật, và máy tính. Không cần API key mặc định.
✨ Tính năng
🔎 Web Search: tìm nhiều nguồn (SearXNG + DuckDuckGo HTML), khử trùng lặp, trả về tiêu đề + URL + snippet.
🌐 Web Fetch/Read: tải trang có giới hạn kích thước/thời gian (chống SSRF) và trích văn bản “đọc được” để tóm tắt.
📂 Doc Search/Read: tìm & đọc tài liệu trong thư mục sandbox (txt/md/html/pdf). PDF dùng
pdf-parse(lazy-load).📚 Scholar Search/Get: tra cứu học thuật (arXiv + Crossref + Wikipedia) và lấy metadata theo DOI/arXivId.
🧮 Calculator: đánh giá biểu thức với
mathjs, hỗ trợprecision(làm tròn).
Related MCP server: free-search-mcp
🧰 Tool & tham số (tên chính ⇄ alias gạch dưới)
Tool | Khi nào dùng | Tham số (shape) |
| Tính toán cục bộ |
|
| Tìm web đa engine |
|
| Tải 1 URL (HTML/binary) |
|
| Trích văn bản “đọc được” |
|
| Tìm trong thư mục sandbox |
|
| Đọc 1 file trong sandbox |
|
| Build chỉ mục tài liệu |
|
| Tìm bài/paper/DOI |
|
| Lấy metadata paper |
|
| Tìm tiêu đề Wikipedia |
|
| Lấy summary Wikipedia |
|
Đã bật
openWorldHintnên nếu model lỡ thêm field lạ host vẫn chấp nhận; nhưng khuyến nghị dùng đúng tham số như bảng để ổn định.
🔧 Cài đặt & chạy
npm install
npm run build
npm startKhi chạy thành công sẽ in:[TOOL4LM] started. Sandbox: <đường_dẫn_sandbox>
⚙️ Cấu hình MCP (LM Studio)
Thêm vào mcp.json của LM Studio:
{
"mcpServers": {
"TOOL4LM": {
"command": "node",
"args": ["--enable-source-maps", "C:/path/to/tool4lm/dist/server.js"],
"type": "mcp",
"env": {
"SANDBOX_DIR": "C:/path/to/your_docs",
"SEARXNG_ENDPOINTS": "https://searx.be/search,https://searx.tiekoetter.com/search",
"ENGINE_ORDER": "searxng,duckduckgo",
"LANG_DEFAULT": "vi",
"REGION_DEFAULT": "vn",
"MAX_FETCH_BYTES": "1048576",
"FETCH_TIMEOUT_MS": "8000"
}
}
}
}Trên Windows, nên dùng
/trong JSON để tránh escape\.
📝 Ví dụ luồng sử dụng
Tra cứu web có trích dẫn → web.search → web.fetch → web.read → tóm tắt + đính kèm URL.
Tài liệu nội bộ → doc.find → doc.read → tóm tắt + trích đoạn (ghi kèm path).
Học thuật → sch.search → sch.get theo DOI/arXivId.
Tính toán → calc.eval với ^/pow(a,b) (hoặc đã normalize **).
🌍 Biến môi trường
SANDBOX_DIR— thư mục tài liệu (mặc định:./sandbox).SEARXNG_ENDPOINTS— danh sách endpoint/searchcủa SearXNG, cách nhau dấu phẩy.ENGINE_ORDER— ví dụsearxng,duckduckgo.LANG_DEFAULT,REGION_DEFAULT— gợi ý ngôn ngữ/khu vực khi tìm web.MAX_FETCH_BYTES— giới hạn dung lượng tải trang.FETCH_TIMEOUT_MS— timeout tải trang (ms).
🤝 Đóng góp
Issues/PRs rất hoan nghênh! Nếu thấy bug/đề xuất, mở issue giúp mình nhé.
📜 Giấy phép
☕ Ủng hộ
Nếu bạn thấy dự án hữu ích, có thể ủng hộ mình qua PayPal:
hoặc bấm nút bên dưới:
Available Tools
22 toolscalc.evalB
Evaluate math expression (no external calls).
Inputs: expr (required), precision.
calc_evalD
Alias of calc.eval
Inputs: expr (required), precision.
doc.findB
Search local documents within sandbox directory. Builds index if missing.
Inputs: q (required), top, limit.
doc_findD
Alias of doc.find
Inputs: q (required), top, limit.
doc.readA
Read a file from sandbox directory (text or pdf).
Inputs: path (required).
doc_readD
Alias of doc.read
Inputs: path (required).
index.buildC
Build MiniSearch index for documents in sandbox directory.
Inputs: root.
index_buildD
Alias of index.build
Inputs: root.
sch.getC
Get scholarly metadata by DOI/arXivId/URL.
Inputs: doi, arxivId, url.
sch_getD
Alias of sch.get
Inputs: doi, arxivId, url.
sch.searchA
Academic-first search (arXiv + Crossref + Wikipedia).
Inputs: q (required), top, limit.
sch_searchD
Alias of sch.search
Inputs: q (required), top, limit.
web.fetchB
Fetch a URL with size/time limits and anti-SSRF.
Inputs: url (required), timeout, max_bytes, headers.
web_fetchD
Alias of web.fetch
Inputs: url (required), timeout, max_bytes, headers.
web.readA
Extract readable content from given HTML (or pass html from web.fetch).
Inputs: url (required), html.
web_readD
Alias of web.read
Inputs: url (required), html.
web.searchB
Multi-engine web search (SearXNG + DuckDuckGo HTML).
Inputs: q (required), max, lang, site, +3 more.
web_searchD
Alias of web.search
Inputs: q (required), max, lang, site, +3 more.
wiki.getC
Wikipedia summary by title.
Inputs: title (required), lang.
wiki_getD
Alias of wiki.get
Inputs: title (required), lang.
wiki.searchC
Wikipedia title search (public API).
Inputs: q (required), lang.
wiki_searchD
Alias of wiki.search
Inputs: q (required), lang.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Each unique operation has a distinct prefix and action (e.g., calc.eval, sch.search, web.fetch). Aliases are exact duplicates and do not create functional ambiguity. An agent can easily distinguish between different domains and operations.
The original tools consistently use a domain.action pattern (e.g., calc.eval). However, the aliases switch to domain_action (e.g., calc_eval), introducing a minor inconsistency. The core pattern is clear, but the presence of both slightly reduces consistency.
22 tools nominally, but effectively 11 unique operations due to aliases. This is reasonable for a server covering multiple domains (math, docs, search, web, wiki). The alias redundancy is minor and does not overwhelm the surface.
The tool set covers key operations for each domain: calculation, document indexing/reading, scholarly and web search, Wikipedia retrieval. Missing write/update operations (e.g., doc.write, wiki.edit) but these are likely out of scope for a LM-assistance tool server.
Related MCP Connectors
Web search API and MCP server for developers building AI agents.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables web searching, URL content extraction, and summarization without requiring API keys. It also provides advanced mathematical evaluation and multi-language Wikipedia summary retrieval tools.5532 npm10MIT
- AlicenseAqualityBmaintenanceA local-first, no-API-key MCP server that enables LLMs to search the web, fetch pages, and read documents using multiple engines and smart fallbacks.611176MIT
- FlicenseAqualityDmaintenanceAn all-in-one MCP server for local LLMs that provides live web access, math, shell/code execution, filesystem access, memory, and RAG over local files using LM Studio embeddings.239-
- AlicenseNot gradedqualityCmaintenanceZero-auth multi-source research MCP server that enables web search, reading URLs, PDFs, GitHub repos, and querying Hacker News, Stack Overflow, Semantic Scholar, and YouTube transcripts without API keys.61 PyPI12Apache 2.0