Agent Sense
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., "@Agent Sense what's my current time and location?"
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.
Agent Sense(智能感知)- MCP Server
为 AI Agent 提供感知能力的 Model Context Protocol (MCP) 服务器。
💡 为什么需要 Agent Sense?
AI Agent 在处理问题时,往往缺乏对外部环境的感知能力。Agent Sense 让 AI 可以:
时效性研究 - 获取准确的当前时间,处理时间敏感的任务和分析
位置信息研究 - 基于 IP 地址获取地理位置,提供本地化的建议和服务
硬件环境分析 - 诊断系统性能问题,分析内存、磁盘、CPU 使用情况
环境报错分析 - 了解操作系统版本、架构等信息,提供针对性的解决方案
通过提供充足的环境上下文,Agent Sense 让 AI 的回复更加准确、更具针对性。
🎯 核心价值
提供充足的环境上下文
当 AI Agent 了解用户的环境信息时,可以:
✅ 更准确的时间判断 - "现在是几点?" "今天星期几?" "距离某个时间还有多久?"
✅ 本地化建议 - 根据用户所在地区提供相关的服务、资源和建议
✅ 精准的故障诊断 - "为什么我的电脑这么慢?" → 检查内存使用率 99%
✅ 针对性的解决方案 - 根据操作系统版本和架构提供正确的安装命令
功能特性
Agent Sense 提供以下感知工具:
1. 获取时间 (get_time)
获取当前时间信息,支持多种格式:
ISO 8601 格式
本地化格式
Unix 时间戳
时区信息
详细的年月日时分秒
2. 位置定位 (get_location)
基于 IP 地址获取地理位置信息:
国家、地区、城市
经纬度坐标
时区
ISP 信息
3. 系统信息 (get_system_info)
获取操作系统详细信息:
操作系统类型、版本、架构
主机名、内核版本
系统制造商和型号
系统运行时间
4. 硬件信息 (get_hardware_info)
获取硬件配置信息:
CPU 型号、核心数、频率
内存总量、使用情况
硬盘容量、使用情况
网络接口和 IP 地址
(详细模式)CPU 温度、电池状态、显卡信息
安装
npm install
npm run build使用方法
开发模式
npm run dev使用 MCP Inspector 测试
MCP Inspector 是一个交互式的调试工具,可以在浏览器中测试你的 MCP server:
npm run inspector这会启动一个本地服务器,通常在 http://localhost:5173,你可以在浏览器中:
查看所有可用的工具
测试每个工具的调用
查看请求和响应
实时调试
生产模式
npm start配置到 CherryStudio/Claude Desktop
在 MCP 配置文件中添加:
{
"mcpServers": {
"agent-sense": {
"command": "node",
"args": ["/path/to/agent-sense/dist/index.js"]
}
}
}或者使用 npx(发布到 npm 后):
{
"mcpServers": {
"agent-sense": {
"command": "npx",
"args": ["-y", "agent-sense"]
}
}
}📝 实际应用场景
场景 1:性能诊断
用户: "我的电脑运行很慢,怎么回事?"
AI: 调用 get_hardware_info() → 发现内存使用率 99.72%
AI 回复: "你的内存使用率已达 99.72%(23.93GB/24GB),建议关闭一些应用程序释放内存。”

场景 2:时间敏感任务
用户: "帮我分析一下这个日志文件的错误"
AI: 调用 get_time() → 获取当前时间和时区
AI 回复: "根据日志时间戳(UTC)和你的本地时区(Asia/Shanghai),这个错误发生在 2 小时前...”

场景 3:本地化建议
用户: "推荐一些学习资源"
AI: 调用 get_location() → 发现用户在中国
AI 回复: "根据你的位置,推荐以下中文学习资源和国内可访问的平台...”

场景 4:环境特定解决方案
用户: "如何安装 Docker?"
AI: 调用 get_system_info() → macOS M3 芯片
AI 回复: "你使用的是 Apple Silicon (M3),请使用以下命令安装 Docker Desktop for Mac (Apple Silicon)...”

工具使用示例
获取时间
{
"name": "get_time",
"arguments": {
"format": "iso"
}
}获取位置
{
"name": "get_location",
"arguments": {
"ip": "8.8.8.8"
}
}获取系统信息
{
"name": "get_system_info",
"arguments": {}
}获取硬件信息
{
"name": "get_hardware_info",
"arguments": {
"detailed": true
}
}跨平台支持
✅ 完全支持以下平台:
Windows (Windows 10/11)
macOS (10.15+)
Linux (Ubuntu, Debian, CentOS, Fedora 等主流发行版)
所有功能在三大平台上均可正常工作,包括:
✅ 时间获取 - 使用 Node.js 内置 API
✅ 位置定位 - 基于公网 IP 的地理定位
✅ 系统信息 - 跨平台系统信息获取
✅ 硬件信息 - 智能过滤各平台的虚拟接口和系统分区
技术栈
Node.js + TypeScript: 核心运行环境
@modelcontextprotocol/sdk: MCP 协议实现
systeminformation: 跨平台系统和硬件信息获取
public-ip: 公网 IP 获取
zod: 参数验证
开发
# 安装依赖
npm install
# 开发模式(热重载)
npm run dev
# 构建
npm run build
# 运行
npm start提示词
本项目使用kiro + claude 4.5 + vibe coding开发
提示词如下
我想做一个 为 agent 提供 感知能力的 mcp server,名为“智能感知(agent-sense)”,它需要提供以下工具,1. 获取时间;2. 位置定位;3. 系统信息(操作系统版本,架构);4. 硬件信息(CPU 型号,内存大小、硬盘大小、IP地址),请你帮我设计一个可行的方案,必要查询文档或者信息时,可使用对应的mcp server。技术栈方面,我希望使用 nodejs + typescriptAvailable Tools
4 toolsget_hardware_infoA
【建议调用】获取用户硬件配置和实时使用情况。
⚠️ 重要:不要假设用户的硬件配置,调用此工具获取准确的硬件信息和实时状态。
强制调用场景:
用户抱怨性能问题("电脑慢"、"卡顿"、"运行慢"、"响应慢")
诊断资源问题("内存不足"、"磁盘空间"、"CPU占用高")
用户询问配置信息("我的配置"、"硬件信息"、"电脑配置")
评估软件性能要求("能运行XX吗"、"配置够吗")
分析是否有足够资源运行某个程序
用户提到网络问题(获取网络接口信息)
需要了解用户硬件能力以提供针对性建议
返回信息:CPU型号/核心数/使用率、内存总量/使用率、磁盘容量/使用情况、网络接口/IP地址。 详细模式:CPU温度、电池状态、显卡信息。
⚠️ 在诊断性能问题时必须调用此工具获取实时数据!
Inputs: detailed.
get_locationA
【建议调用】根据IP地址获取用户的真实地理位置信息。
⚠️ 重要:不要假设用户的位置,调用此工具获取准确的地理信息。
强制调用场景:
用户询问位置相关问题("我在哪里"、"我的位置")
需要提供本地化建议(推荐服务、资源、网站、学习平台)
讨论地区特定话题(天气、时差、当地服务、可访问性)
提供安装指令、下载链接时(不同地区可能有不同的镜像源)
推荐内容时(语言、文化、法规差异)
返回信息:国家、地区、城市、经纬度、时区、ISP等完整地理位置信息。
⚠️ 在提供地区特定建议前,应主动调用此工具确认用户位置!
Inputs: ip.
get_system_infoA
【建议调用】获取用户操作系统的详细信息。
⚠️ 重要:不要假设用户的操作系统,调用此工具获取准确的系统信息。
强制调用场景:
用户询问系统信息("我的系统"、"操作系统版本")
提供安装/配置指令前(不同系统命令不同)
诊断系统相关问题或错误
讨论软件兼容性、系统要求
用户提到"安装"、"配置"、"运行"、"部署"任何软件
提供命令行指令时(Windows/macOS/Linux 命令不同)
返回信息:操作系统类型(Windows/macOS/Linux)、版本号、架构(x64/ARM/ARM64)、内核版本、主机名、系统运行时间等。
⚠️ 在提供技术建议前必须调用此工具,确保指令适用于用户的系统!
Inputs: no named parameters.
get_timeA
【必须调用】获取用户环境的实时时间信息。
⚠️ 重要:你的训练数据和系统提示中的时间信息可能不准确或过时,必须调用此工具获取用户的真实当前时间。
强制调用场景(必须调用,不要依赖你的知识):
用户提到"现在"、"今天"、"最近"、"这周"、"这个月"、"今年"等时间词
用户询问时间相关的事件、新闻、趋势(如"最近有什么AI大事件")
需要判断某个日期是过去还是未来
分析时间敏感的数据(日志、事件、截止日期)
任何需要知道"当前时间"才能准确回答的问题
返回信息:用户本地时间、UTC时间、时区、Unix时间戳、完整的年月日时分秒、星期等。
⚠️ 不要假设你知道当前时间,必须调用此工具!
Inputs: format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: get_hardware_info retrieves hardware metrics, get_location provides geographical data, get_system_info fetches OS details, and get_time obtains temporal information. The descriptions explicitly differentiate their domains (hardware, location, system, time), making misselection unlikely.
All tool names follow a consistent verb_noun pattern with 'get_' prefix (get_hardware_info, get_location, get_system_info, get_time). This uniform naming convention makes the set predictable and easy to understand, with no deviations in style or structure.
With 4 tools, the count is reasonable for a server focused on gathering user environment data. It covers key areas (hardware, location, system, time) without being overly sparse or bloated, though minor additions like network diagnostics or user preferences could enhance scope without being necessary.
The tool set provides comprehensive coverage for retrieving user environment data, with no obvious gaps in the core areas of hardware, location, system, and time. Minor gaps might include tools for user preferences or application-specific data, but the existing tools support essential workflows for context-aware assistance.
Related MCP Connectors
Context and control for any AI. Agent identity, scoped access, and proof across tools.
IP intelligence, network diagnostics, and AI service availability tools for AI agents.
Real-world data for agents: air quality, geocoding, quakes, holidays, web search
Geolocate Me turns your phone into location context for any AI assistant. Install the iOS or Android app, connect once with OAuth, and your GPS is queryable in natural language. Ask where you are, where you parked, where you were yesterday at 3pm, or how long you were at the office — the assistant calls the tool and answers with a real street address. https://geolocateme.app