fetch-log-mcp-server
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., "@fetch-log-mcp-serverfetch logs from 10.0.0.5"
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.
Fetch Log MCP Server
一个用于获取远端日志的 MCP (Model Context Protocol) 服务器。
功能特性
支持从指定 IP 地址获取日志内容
可配置端口号和日志路径
使用 TypeScript 开发,类型安全
简单易用的 API 接口
Related MCP server: journald-mcp-server
安装和运行
方法一:全局安装(推荐)
# 全局安装
npm install -g .
# 查看帮助
fetch-log-mcp-server --help
# 查看版本
fetch-log-mcp-server --version
# 启动服务器
fetch-log-mcp-server方法二:本地开发
# 1. 安装依赖
npm install
# 2. 构建项目
npm run build
# 3. 运行服务器
npm start
# 4. 开发模式
npm run dev使用方法
命令行选项
--help, -h: 显示帮助信息--version, -v: 显示版本信息
MCP 工具参数
ip(必需): 目标服务器的 IP 地址port(可选): 目标服务器的端口号,默认为 28668path(可选): 日志路径,默认为/logs
示例
1. 启动 MCP 服务器
fetch-log-mcp-server2. 通过 MCP 客户端调用工具
{
"name": "fetch_logs",
"arguments": {
"ip": "192.168.1.100",
"port": 28668,
"path": "/logs"
}
}这将执行 curl -XGET "http://192.168.1.100:28668/logs" 来获取日志内容。
3. 配置文件示例 (mcp.json)
{
"mcpServers": {
"fetch-log-server": {
"command": "fetch-log-mcp-server"
}
}
}项目结构
fetch-log-mcp-server/
├── src/
│ └── index.ts # 主服务器文件
├── dist/ # 编译输出目录
├── package.json # 项目配置
├── tsconfig.json # TypeScript 配置
└── README.md # 项目说明技术栈
TypeScript
@modelcontextprotocol/sdk
axios (用于 HTTP 请求)
错误处理
服务器包含完善的错误处理机制:
网络请求超时(30秒)
连接错误处理
参数验证
许可证
MIT
Available Tools
1 toolfetch_logsB
从指定的IP地址获取日志内容
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes | 目标服务器的IP地址 | |
| path | No | 日志路径(可选,默认为/logs) | /logs |
| port | No | 目标服务器的端口号(可选,默认为28668) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the basic action and does not mention whether the operation is read-only, whether authentication is required, what network side effects occur, what the response format is, or how errors are reported.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. It communicates the core purpose in eight Chinese characters, which is appropriately concise for a tool of this simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple and all parameters are fully documented in the schema. However, with no annotations and no output schema, the description omits information about expected return content, possible failure modes, and any protocol assumptions. It is minimally viable but leaves notable gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents ip, path, and port including defaults. The description adds no extra meaning beyond identifying the target IP; it neither enhances nor contradicts the parameter definitions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb-resource pair ('获取日志内容' / fetch log content) and scopes it to a specified IP address, so an agent can tell what the tool does. It is somewhat generic because the type of logs is not specified, but there are no sibling tools to differentiate against.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool (whenever logs from a given IP are needed), but it provides no explicit conditions, exclusions, or alternatives. It does not mislead, but it leaves usage decisions largely to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
fetch_logs
TDQS
Scored across 1 tool
With only a single tool, there is no possible ambiguity or overlap. The tool's purpose is uniquely defined by its name and description.
The sole tool name 'fetch_logs' follows a clean verb_noun pattern, matching the server name 'fetch-log-mcp-server'. Even with one tool, the naming is predictable and consistent.
The server has exactly one tool, which falls below the typical well-scoped range of 3-15 tools. It is narrowly focused on fetching logs, so it feels thin but not completely unreasonable for a single-purpose utility.
The tool surface is severely limited, offering only 'fetch_logs' with no supporting operations like listing available log sources, filtering by time or type, or handling failures. For a logging domain, this leaves significant gaps that could hinder an agent's workflow.
Maintenance
Related MCP Connectors
Syslog receiver and MCP server for homelab log intelligence.
Syslog receiver and MCP server for homelab log intelligence.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Related MCP Servers
- MIT No Attribution
- FlicenseNot gradedqualityDmaintenanceAn MCP server for accessing systemd journal logs.1-
- FlicenseBqualityDmaintenanceA log analysis MCP server that enables tailing, searching, filtering, and summarizing logs from local files and Docker containers.7-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that downloads Elasticsearch logs from Elastic Cloud via the Admin API.-