ima-mcp-server
This server connects AI agents to IMA knowledge bases via the MCP protocol, enabling RAG-powered Q&A, knowledge management, and file operations.
RAG Q&A: Ask questions using semantic retrieval, knowledge graph reasoning, and LLM generation, with citations and automatic download of the top 3 referenced files.
Knowledge Base Management: List all accessible knowledge bases (including shared/subscribed) and those you can add content to.
Content Import: Upload local files (PDF, Word, PPT, Excel, Markdown, images, audio, etc.) or import web pages/WeChat articles via URLs, with automatic duplicate file name checking.
Content Retrieval: Fetch original content/download links for media entries and read plain-text note bodies.
Note Operations: Create Markdown notes and attach them to knowledge bases.
Security & Integration: Runs locally over stdin/stdout with MCP clients, using OpenAPI credentials and auto-refreshing IMA cookies.
Click on "Install 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., "@ima-mcp-serverAsk my knowledge base about the project roadmap and key milestones."
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.
ima-mcp-server
给你的自建智能体接上 IMA 的「大脑」
将 IMA 知识库 的核心能力——RAG 语义检索 + 知识图谱推理 + LLM 生成——通过标准 MCP 协议暴露出来,让任何个人开发的 AI Agent 都能直接调用。
核心亮点:ask_knowledge_base
这是整个项目的灵魂工具。一句话:把你的知识库变成一个可对话的专家。
用户输入问题
↓
ask_knowledge_base 自动完成:
① 语义检索 → 在知识库中找到最相关的文档片段
② 知识图谱 → 关联实体、概念,补全上下文
③ LLM 生成 → 基于检索结果生成带引用的回答
④ 引用增强 → 自动下载前 3 条引用文件的完整内容
↓
返回:结构化答案 + 引用来源 + 文件内容这本质上就是 IMA 产品内部的完整 RAG 管线,通过 MCP 协议直接接入到你自己的 Agent 中。你的自建智能体不再只是一个"聊天机器人",而是真正拥有了一个能检索、能推理、能引用的知识后台。
适用场景
🤖 个人知识助手:把自己积累的文档/笔记/网页变成可问答的知识库
🏭 企业内部知识库:将 SOP、产品文档、技术规范接入 Agent,实现智能问答
📚 学习与研究:论文、教材、课程笔记导入后,随时提问和交叉检索
🔧 开发者工具链:API 文档、设计规范、代码仓库接入,让 Coding Agent 直接查阅
Related MCP server: Solarium
项目亮点一览
亮点 | 说明 |
🧠 完整 RAG 管线 | 不是简单关键词搜索,而是语义检索 + 知识图谱 + LLM 生成的完整链路 |
🔌 标准 MCP 协议 | 基于 stdio 传输,兼容 Claude Desktop、Cursor、Cline、WorkBuddy 等主流 Agent 平台 |
🔐 双认证体系 | OpenAPI 凭证(基础读写)+ IMA Cookie(解锁完整 RAG),按需配置 |
📎 引用自动增强 | ask_knowledge_base 返回引用后,自动下载前 3 条文件并解析内容(Excel→表格、文本→截取) |
🔄 Token 自动刷新 | Cookie 过期时自动解析 refresh token 换取新 token,无需重启 |
📦 零外部依赖 | 纯 Node.js 内置模块(crypto、https、fs),不依赖第三方 COS SDK |
📝 10 个工具全覆盖 | 从问答、读取、笔记管理到网页导入、文件上传,覆盖知识库全流程 |
入口文件
项目提供两个等效的入口文件:
文件 | 说明 |
| JavaScript 入口, |
| ES Module 入口, |
两个文件内容完全一致,任选其一即可。
运行方式:本地 stdio
本项目是一个命令行 MCP 服务器,通过 stdin/stdout 与 MCP 客户端通信。它不是网络服务——不需要启动端口、不需要远程访问,在你的 MCP 客户端配置中指定 node server.js(或 node server.mjs)即可。
你的 Agent 平台(如 Claude Desktop、Cursor)
│
│ 启动子进程:node server.js
│ 通过 stdin 发送 JSON-RPC 请求
│ 通过 stdout 接收 JSON-RPC 响应
▼
┌─────────────────────────────────┐
│ ima-mcp-server (Node.js) │
│ ├─ OpenAPI 认证 → ima.qq.com │
│ └─ Cookie 认证 → ima.qq.com │
└─────────────────────────────────┘优点:无需公网 IP、无需部署服务器、凭证不出本地机器。
快速开始
1. 前置要求
Node.js ≥ 18(内置 fetch,无需额外安装)
IMA 账号(用 QQ/微信登录 https://ima.qq.com)
2. 安装
git clone https://github.com/qqpp13465/ima-mcp-server.git
cd ima-mcp-server
npm install3. 获取凭证
项目需要两类凭证,按你使用的工具选择配置:
凭证 | 环境变量 | 适用工具 | 获取难度 |
OpenAPI |
| get_media_info、import_urls、upload_file 等 8 个读写工具 | 简单(网页一键获取) |
Cookie |
| ask_knowledge_base、list_knowledge_bases_full(完整 RAG) | 中等(浏览器开发者工具) |
获取 OpenAPI 凭证(必须)
浏览器打开 https://ima.qq.com → 登录你的 QQ/微信账号
点击「创建凭证」,复制
Client ID和API Key
获取 IMA_COOKIE(如需 RAG 问答)
只有
ask_knowledge_base和list_knowledge_bases_full需要 Cookie 认证。如果只需要文件读写,只配 OpenAPI 凭证就够了。
浏览器打开 https://ima.qq.com ,登录你的 QQ/微信账号
按
F12打开开发者工具,切换到 Network(网络) 标签在 IMA 页面中点击任意知识库,进行一次提问
在 Network 中找到发往
/cgi-bin/assistant/qa的请求,点击查看详情在 Request Headers 中找到
x-ima-cookie字段,复制完整值将复制的内容作为
IMA_COOKIE环境变量
⚠️ Cookie 会过期。如果某次调用返回 600001 错误(登录过期),项目会自动尝试用 refresh token 续期。如果自动续期也失败,需重新按上述步骤获取 Cookie。
4. 配置 MCP 客户端
以 Claude Desktop 为例,编辑 claude_desktop_config.json:
{
"mcpServers": {
"ima": {
"command": "node",
"args": ["C:\\Users\\你的用户名\\ima-mcp-server\\server.js"],
"env": {
"IMA_CLIENT_ID": "你的_client_id",
"IMA_API_KEY": "你的_api_key",
"IMA_COOKIE": "你的_x-ima-cookie值"
}
}
}
}注意:Windows 路径用
\\(JSON 转义),macOS/Linux 用/。
.jsvs.mjs:如果你的 MCP 客户端不支持.mjs扩展名(部分国产 Agent 平台有此限制),只需将server.js换成server.mjs即可,内容完全一致。
5. 验证
重启 MCP 客户端后,对 Agent 说:
"列出我的所有知识库"
返回知识库列表即配置成功。
可用工具
工具 | 认证 | 功能 |
⭐ | Cookie | 核心工具:知识库 RAG 问答(语义检索 + LLM 生成),返回答案 + 引用文件,自动下载前 3 条引用内容 |
| Cookie | 列出所有知识库,返回 Cookie ID + OpenAPI ID,供后续工具调用 |
| OpenAPI | 获取条目原文/下载链接;笔记类自动返回正文 |
| OpenAPI | 读取笔记正文(纯文本) |
| OpenAPI | 获取可添加内容的知识库列表 |
| OpenAPI | 将网页/微信文章添加到知识库 |
| OpenAPI | 创建 IMA 笔记(支持 Markdown) |
| OpenAPI | 将笔记添加到知识库 |
| OpenAPI | 检查知识库中是否已存在同名文件 |
| OpenAPI | 上传本地文件到知识库 |
📌 关于已删除的工具:本项目移除了 IMA 官方 OpenAPI 中的
search_knowledge_base、get_knowledge_base、get_knowledge_list三个读取工具,因为它们的功能已被ask_knowledge_base(RAG 语义检索 + 知识图谱 + LLM 生成)完全覆盖且体验更好。如果你仍需要原生的关键字搜索或列表分页功能,可参考 IMA 官方 API 文档 自行在server.js中添加。
所有 MCP 客户端配置参考
以下配置请将路径和凭证替换为实际值。
Claude Desktop
配置文件:%APPDATA%\Claude\claude_desktop_config.json (Windows) / ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
Cursor
配置文件:~/.cursor/mcp.json(全局)或项目内 .cursor/mcp.json
Cline (VS Code)
在 Cline 设置 → MCP Servers → 添加
WorkBuddy
编辑 ~/.workbuddy/mcp.json,在 mcpServers 中添加 ima 条目 → 连接器管理页面点击「Trust」
通用配置模板
{
"mcpServers": {
"ima": {
"command": "node",
"args": ["/path/to/ima-mcp-server/server.js"],
"env": {
"IMA_CLIENT_ID": "你的_client_id",
"IMA_API_KEY": "你的_api_key",
"IMA_COOKIE": "你的_x-ima-cookie值(可选,用于 RAG 问答)"
}
}
}
}局限性
坦率列出当前版本的限制,帮助你判断是否适用:
限制 | 说明 |
🖥️ 仅本地 stdio 运行 | 不支持 HTTP/SSE 远程连接,必须和 MCP 客户端在同一台机器上。无法部署为云服务 |
⏱️ Cookie 有时效 | IMA Cookie 会过期(通常几小时到一天),需定期重新获取。虽然有自动刷新机制但不保证 100% 成功 |
📋 单知识库问答 |
|
🔢 结果数量有限 | 单次 RAG 问答最多返回 IMA 服务端限制数量的结果,不适合超大规模全文检索 |
🚫 无流式输出 | 当前返回完整回答,不支持 SSE 流式逐字输出(MCP 协议限制) |
📦 仅支持 JavaScript | 目前只有 Node.js 实现,无 Python/Go 版本 |
故障排查
问题 | 解决方案 |
| 检查环境变量是否正确设置;确认 MCP 客户端配置中 |
| 通常是参数范围超出限制,检查传入的值是否在允许范围内 |
| Cookie 已失效。项目会自动尝试刷新,如失败需重新获取 IMA_COOKIE |
| 已修复(v4.2.1),确保使用最新版本 |
MCP 客户端未显示工具 | 重启客户端;检查 JSON 格式、路径是否存在;确保 Node.js ≥ 18 |
Windows 路径问题 | JSON 中 |
安全说明
凭证不出本地:所有凭证仅通过 HTTP 头发送至
ima.qq.com,不发送到任何第三方容器化你的凭证:建议在 MCP 客户端配置中通过
env传入凭证,不要在代码中硬编码git 安全:
.gitignore已配置忽略node_modules/、日志文件和 IDE 配置,不会意外提交敏感信息
License
MIT
Available Tools
10 toolsadd_note_to_knowledge_baseA
将已有的 IMA 笔记添加到知识库。需要先通过 create_note 创建笔记获取 note_id,或将 get_media_info 返回的 notebook_id 作为 note_id 传入。
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | 在知识库中显示的标题。 | |
| note_id | Yes | 笔记 ID(create_note 返回的 doc_id,或 notebook_id)。 | |
| folder_id | No | 目标文件夹 ID(folder_ 前缀)。省略则添加到根目录。 | |
| knowledge_base_id | No | 目标知识库 ID(可省略,自动解析)。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavior disclosure. It mentions that the note must already exist and that a notebook_id can be repurposed as note_id, but it does not mention side effects, permissions, or error conditions. This is minimal but not fully transparent.
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 consists of two sentences, with the purpose front-loaded and the prerequisite guidance in the second sentence. Every word contributes value.
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?
For a simple add operation with no output schema, the description is adequate: it states the purpose, explains how to obtain the key parameter, and references prerequisites. It could optionally mention failure behavior, but the tool is straightforward.
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?
The input schema covers all four parameters with descriptions, including the nuance that note_id can be a doc_id or notebook_id. The description repeats this information without adding new meaning beyond the schema, so the baseline of 3 applies.
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 states a clear action: '将已有的 IMA 笔记添加到知识库' (add an existing IMA note to the knowledge base). The word '已有的' (existing) distinguishes this tool from create_note, which creates new notes.
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?
It provides explicit prerequisites for obtaining note_id: either create_note to get a doc_id, or use get_media_info's notebook_id. This gives clear context for when to use the tool and how to prepare inputs, though it doesn't directly contrast with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ask_knowledge_baseA
向知识库提问,使用 IMA 完整的 RAG 搜索引擎(语义检索 + 知识图谱 + LLM 生成回答)。这是与 IMA 网页端完全一致的问答能力,能深入检索文档全文内容。需要配置 IMA_COOKIE 环境变量(从浏览器开发者工具获取)。⚠️ knowledge_base_id 请使用 list_knowledge_bases_full 返回的 cookie_knowledge_base_id 字段。典型用法:'上周会议的主要结论是什么?'、'总结知识库里关于 X 的所有内容'、'这些文档中的关键数据是什么?'
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | 要向知识库提问的问题。支持自然语言,越长越具体越好。 | |
| knowledge_base_id | Yes | 知识库 ID,请使用 list_knowledge_bases_full 返回的 cookie_knowledge_base_id 字段值。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the IMA_COOKIE environment variable requirement, the RAG-based behavior, deep full-text search, and the specific ID field warning. It does not describe return format or failure modes, but it meaningfully adds context beyond the input schema.
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 front-loaded with a clear purpose statement, followed by auth requirement, a warning about the ID, and example queries. Each sentence adds value, though there is minor redundancy with the web-interface equivalence and full-text mention. Overall well-structured for its length.
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?
Given the absence of annotations and output schema, the description covers essential operational needs: tool purpose, required IMA_COOKIE, correct knowledge_base_id sourcing, and example questions. It stops short of describing output format or error cases, but for selecting and invoking the tool, it is sufficiently complete.
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?
The input schema already provides 100% coverage with descriptions for both parameters, including the instruction to use cookie_knowledge_base_id. The description adds typical usage examples (e.g., 'what were the main conclusions of last week's meeting?'), which slightly enrich the question parameter's semantics, but the core meaning is already in the schema. Baseline 3 is appropriate.
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 clearly states it asks questions to a knowledge base using IMA's RAG search engine (semantic search + knowledge graph + LLM), and differentiates itself from siblings like list_knowledge_bases_full (listing) and get_note_content (retrieving notes) by focusing on natural-language question answering over full document text.
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?
It provides clear context: same Q&A capability as the web interface and typical usage examples. It also instructs using cookie_knowledge_base_id from list_knowledge_bases_full, which is a useful alternative reference. However, it does not explicitly state when not to use this tool vs other retrieval tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
check_repeated_namesA
上传文件前检查知识库中是否已存在同名文件。返回每个文件的重复状态。仅适用于文件类型(PDF/Word/PPT/Excel/图片等),不适用于网页和笔记。
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | 待检查的文件列表,1-2000 个。 | |
| folder_id | No | 文件夹 ID(folder_ 前缀)。省略则检查根目录。 | |
| knowledge_base_id | No | 目标知识库 ID(可省略,自动解析)。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden. It communicates the check action, per-file return status, and supported types, implying a read-only operation. But it lacks specifics on duplicate criteria (exact name match, extension handling), folder vs. whole-KB scope, and the exact shape of the returned status, so transparency is only partial.
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 two short sentences, front-loaded with purpose and then scope. There is no filler; every clause adds value.
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 core purpose and scope are clear for a simple pre-upload check. However, with no output schema, the description should have detailed the format of the duplicate status and how folder_id affects the check. These gaps make it only minimally complete.
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?
Since schema description coverage is 100%, the baseline is 3. The description adds no extra meaning beyond the schema for folder_id or knowledge_base_id; it only refers to files generically, so it neither compensates nor enhances.
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 explicitly states the tool checks for existing same-name files in the knowledge base before upload and returns duplicate status per file. It clearly scopes to file types (PDF/Word/PPT/Excel/images) and excludes webpages/notes, which distinguishes it from siblings like upload_file and create_note.
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?
It tells when to use the tool ('before uploading files') and gives an explicit exclusion ('not applicable to web pages and notes'). However, it does not directly name alternative tools, so it stops short of full guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_noteA
创建一篇 IMA 笔记。content 支持 Markdown 格式(content_format=1)。创建后可通过 add_note_to_knowledge_base 将笔记添加到知识库。folder_name 用于指定笔记在 IMA 笔记中的存放文件夹(不是知识库文件夹)。
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | 笔记正文,支持 Markdown 格式(如 '# 标题\n\n正文内容')。 | |
| folder_name | No | 笔记文件夹名称(IMA 笔记侧的文件夹,非知识库文件夹)。省略则放在默认位置。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It adds behavioral context by mentioning content_format=1 and clarifying that folder_name is for the IMA-side folder, not the knowledge base folder. It also signals the follow-up workflow with add_note_to_knowledge_base. However, it omits details about return values, error conditions, or permanence, which a create operation might warrant. Still, it adds value beyond the schema.
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 three short sentences, front-loaded with the primary purpose. It then adds key details about content format, the next-step relationship, and folder semantics. Every sentence carries essential information with no redundancy or fluff.
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?
For a simple two-parameter create tool with no output schema, the description covers the core purpose, parameter meaning, and workflow with a sibling tool. It lacks an explicit mention of the return value or response format, which would be useful since no output schema exists. However, given the tool's simplicity and the absence of nested objects, it is reasonably complete. A score of 5 would require explicit return/error handling details.
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?
Both parameters have schema descriptions with 100% coverage, so the baseline is 3. The description adds minimal extra parameter semantics: it repeats the Markdown support already in the schema and echoes the folder distinction. The only unique detail is content_format=1, but that's not a parameter property. Therefore, the description does not significantly enhance parameter understanding beyond what the schema provides.
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 clearly states 'Create an IMA note' (创建一篇 IMA 笔记) with a specific verb and resource. It also distinguishes itself from sibling tools like add_note_to_knowledge_base by explaining the note can be added to a knowledge base after creation, clarifying its role as the creation step.
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 provides explicit workflow guidance: 'After creation, you can add the note to a knowledge base via add_note_to_knowledge_base.' This implicitly tells the agent when to use this tool (to create) and when to use the alternative (to add). It also clarifies folder_name applies to IMA notes, not knowledge base folders, preventing misuse. However, it doesn't enumerate all sibling tools or state explicit exclusions, so a 4 rather than 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_addable_knowledge_base_listA
获取当前用户有权限添加内容的知识库列表。仅在未指定目标知识库时使用。
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | 返回数量上限,1-50,默认 20。 | |
| cursor | No | 分页游标,首次传空字符串。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses the permission filtering behavior ('当前用户有权限添加内容'), which is valuable context. However, it does not mention pagination behavior, return format, or any side effects, leaving some ambiguity for a list operation.
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 two sentences: the first states the core purpose, and the second provides a usage condition. There is zero redundancy or filler; every word contributes to understanding.
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?
Given the tool is a simple list operation with two pagination parameters and no output schema, the description covers purpose and usage context sufficiently. It does not explain return structure, but the simplicity and sibling tools mitigate this gap, making it nearly complete.
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?
The input schema has 100% coverage: both 'limit' and 'cursor' have descriptive text including types, ranges, and defaults. The description adds no additional parameter semantics beyond what the schema already provides, so the baseline of 3 is appropriate.
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 clearly specifies the action ('获取' = get) and resource ('知识库列表' = knowledge base list) with a specific qualifier ('当前用户有权限添加内容' = current user has permission to add content). This distinguishes it from sibling tools like list_knowledge_bases_full, which likely lists all knowledge bases without the add-permission filter.
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 explicitly states when to use this tool: '仅在未指定目标知识库时使用' (use only when the target knowledge base is not specified). This provides a clear contextual condition, though it does not name an alternative tool explicitly, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_media_infoA
获取知识库条目的原文内容或下载链接。传入 media_id(来自 ask_knowledge_base 返回的 references 字段)。对微信文章/网页/文件类,返回可访问 URL;对笔记类(media_id 以 note_ 开头),会自动拉取并返回笔记正文(note_content 字段,纯文本)。
| Name | Required | Description | Default |
|---|---|---|---|
| media_id | Yes | 媒体条目 ID。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It discloses that URL types return accessible URLs, while note types (media_id starting with note_) automatically fetch and return note_content as plain text. This adds meaningful behavioral detail, though it does not cover edge cases or errors.
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?
Two focused sentences, front-loaded with the core action. Every sentence adds necessary detail; there is no redundancy or filler.
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?
For a single-parameter tool with no output schema, the description fully explains the expected behavior and output format across media types. It covers the source of the parameter and the conditional return values, making it complete for the tool's complexity.
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?
The schema only describes media_id as '媒体条目 ID.' The description enriches this by explaining where the ID comes from (ask_knowledge_base references) and that the note_ prefix changes behavior. This adds real semantic value despite the schema's 100% coverage.
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 clearly states the tool retrieves original content or download links for knowledge base entries. It specifies the input source (media_id from ask_knowledge_base references) and differentiates behavior by media type, distinguishing it from sibling tools like get_note_content.
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?
Provides explicit guidance on when to use: pass media_id obtained from ask_knowledge_base's references field. It describes behavior for different media types but does not explicitly contrast with alternatives or state exclusions, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_note_contentA
读取笔记正文(纯文本)。传入 note_id(笔记的数字 ID,即 get_media_info 返回的 notebook_id,或笔记搜索接口返回的 doc_id)。这是读取 IMA 笔记原文的专用接口。
| Name | Required | Description | Default |
|---|---|---|---|
| note_id | Yes | 笔记数字 ID。 | |
| target_content_format | No | 内容格式:0=纯文本(推荐),默认 0。 |
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. It discloses that the output is plain text and clarifies the ID mapping, which is useful. However, it does not mention potential errors, authentication requirements, or what happens with invalid IDs. For a simple read tool, this is adequate but not rich.
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 two sentences, front-loaded with the main purpose, and every sentence adds value. It avoids redundancy and is appropriately sized for the tool's 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?
Given the tool's simplicity, no output schema, and good sibling context, the description covers the essential aspects: what it does, how to get the ID, and the output format. It could mention error behavior or return details, but for a read tool with clear parameter guidance, it is sufficiently complete.
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?
The schema has 100% parameter coverage, so the baseline is 3. The description adds value by explaining that note_id corresponds to notebook_id from get_media_info or doc_id from search, which is not present in the schema. This semantic enrichment goes beyond the schema.
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 '读取' (read) and resource '笔记正文' (note content), making the function clear. It also distinguishes this tool from siblings by stating it is the dedicated interface for reading note original text, and clarifies the ID source relationships with get_media_info and search APIs.
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 gives clear context on when to use it: read note content, and how to obtain the required note_id (from get_media_info or note search). It does not explicitly state when not to use it or mention alternative tools, but the guidance on ID provenance is valuable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
import_urlsB
将网页或微信文章 URL 添加到知识库(1-10 个 URL)。添加到根目录时省略 folder_id。
| Name | Required | Description | Default |
|---|---|---|---|
| urls | Yes | URL 列表,1-10 个。 | |
| folder_id | No | 目标文件夹 ID(folder_ 前缀)。省略则添加到根目录。 | |
| knowledge_base_id | No | 目标知识库 ID(可省略,自动解析)。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full responsibility for disclosing behavior. It only repeats the count limit and folder_id omission already present in the schema, adding no new context about side effects, permissions, error handling, or return values. A mutation tool like this should disclose what happens when URLs are added or if some fail.
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 entire description is one concise sentence that front-loads the primary purpose and follows with a specific usage note. It contains no filler and is directly actionable, earning full marks for efficiency.
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?
Given that this is an import operation with side effects and no annotations or output schema, the description is too sparse. It fails to mention success/failure behavior, permission requirements, whether content is fetched, or any post-add actions. The description covers the 'what' but not the 'how' or 'what to expect.'
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 baseline is 3. The description adds no additional meaning beyond the schema: the 1-10 URL limit and root-directory behavior are already documented in the property descriptions. It does not elaborate on knowledge_base_id auto-resolution or any formatting requirements.
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 clearly states the tool's purpose: adding web or WeChat article URLs to the knowledge base. It specifies the exact resource (URLs) and action (add to knowledge base), and the 1-10 URL limit distinguishes it from sibling tools like create_note or add_note_to_knowledge_base.
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 usage by stating its core function, but it doesn't explicitly compare against sibling tools or state when to choose this tool over alternatives. It does provide a useful context tip about omitting folder_id for root, but this is more about parameter handling than tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_knowledge_bases_fullA
获取完整的知识库列表(含订阅的共享知识库),同时返回两套 ID:digit_id(纯数字)供 ask_knowledge_base 使用,openapi_knowledge_base_id(base64url 格式)供所有其他知识库工具使用。这是获取知识库 ID 的唯一入口,需要配置 IMA_COOKIE。
| Name | Required | Description | Default |
|---|---|---|---|
| need_folder_number | No | 是否需要返回文件夹数量统计,默认 true。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals the scope (including shared knowledge bases), the dual ID formats and their usage contexts, the unique entry point status, and the authentication requirement. It does not cover rate limits or error cases, but for a listing tool this is adequate.
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, well-structured sentence that front-loads the main purpose and then efficiently conveys ID format usage, uniqueness, and authentication requirements. Every clause contributes value with no redundancy.
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?
There is no output schema and no annotations, yet the description provides the essential context: what the list contains, the two ID variants and their intended uses, and the configuration requirement. It does not describe the full response envelope, but for tool selection and invocation it is sufficiently complete.
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?
The input schema already fully describes the single optional parameter (need_folder_number) with its default value, so schema coverage is 100%. The description adds no additional parameter-specific semantics, hence the baseline score of 3.
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 clearly states the tool retrieves the complete knowledge base list, including subscribed shared bases, and specifies that it returns two ID formats for different downstream tools. It distinguishes itself from siblings by being positioned as the only entry point for knowledge base IDs.
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 explicitly declares '这是获取知识库 ID 的唯一入口' (this is the only entry point for getting knowledge base IDs), and gives direct instructions on which ID format to use with which tool. It also mentions the IMA_COOKIE prerequisite, making it clear when and how to use the tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
upload_fileA
上传本地文件到知识库。支持 PDF、Word(.doc/.docx)、PPT(.ppt/.pptx)、Excel(.xls/.xlsx/.csv)、Markdown(.md)、图片(PNG/JPG/WebP)、TXT、XMind、音频(MP3/M4A/WAV/AAC)。会自动检查文件名重复、创建媒体、上传到 COS、注册到知识库。
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | 本地文件的绝对路径(如 C:\\Users\\xxx\\report.pdf)。 | |
| folder_id | No | 目标文件夹 ID(folder_ 前缀)。省略则添加到根目录。 | |
| knowledge_base_id | No | 目标知识库 ID(可省略,自动解析)。 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals the internal pipeline: duplicate name check, media creation, COS upload, and knowledge base registration. However, it does not mention outcomes on duplicate names or potential side effects beyond the listed steps, which would be useful.
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 concise, consisting of two sentences. The first sentence states the primary purpose and supported formats, and the second enumerates the internal process steps. No redundant or filler content is present.
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?
For a file upload tool, the description is fairly complete: it covers supported formats and the multi-step backend process. However, it does not specify the behavior when a duplicate file name is detected (e.g., rejection, overwrite, or renaming), leaving a notable gap in edge-case handling. No output schema exists, so return value explanation is not required.
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?
The input schema already describes all three parameters with 100% coverage. The description adds no additional semantic information about the parameters themselves, such as default behaviors or constraints, so the baseline score of 3 is appropriate.
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 clearly states the verb 'upload' and the resource 'local files to knowledge base', with a comprehensive list of supported file formats. This distinguishes it from siblings like import_urls, which handle URLs, and create_note, which creates notes.
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 supported file types imply the intended use case, but there is no explicit statement of when to use this tool versus alternatives. For instance, it does not say 'use import_urls for URLs' or exclude non-file inputs. The context is clear but not explicitly guided.
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. Dates show when Glama detected each change.
10 tool updates
v1.0.0- First observed
add_note_to_knowledge_base - First observed
ask_knowledge_base - First observed
check_repeated_names - First observed
create_note - First observed
get_addable_knowledge_base_list - First observed
get_media_info - First observed
get_note_content - First observed
import_urls - First observed
list_knowledge_bases_full - First observed
upload_file
TDQS
Most tools have clear distinct purposes, but get_media_info and get_note_content both retrieve note content, which could cause confusion. However, they accept different ID types (media_id vs note_id) and are described with explicit usage contexts, reducing ambiguity.
All tool names follow a consistent snake_case verb_noun pattern (get, import, create, add, check, upload, list, ask). There is no mixing of naming conventions or inconsistent verb styles.
With 10 tools, the server is well-scoped for an IMA knowledge base assistant. It covers listing knowledge bases, adding content (URLs, files, notes), retrieving content, and querying without being overwhelming or sparse.
The tool set covers core workflows: list KBs, add content via URLs/files/notes, get media/note content, and ask questions. However, it lacks update/delete operations for content or knowledge bases, and there is no direct search or browse tool to list KB entries without using ask_knowledge_base. References are only obtainable through ask_knowledge_base, creating a potential dead end.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
DocBase MCP server for AI agents
MCP server for querying Forkast documentation
Related MCP Servers
AlicenseBqualityBmaintenanceMCP server that integrates Google Drive, RAG, and memory services for context-aware knowledge management, enabling session, project, document, catalog, and knowledge operations for AI assistants.46MIT- AlicenseNot gradedqualityDmaintenanceA knowledge base MCP server backed by Qdrant vector database with local embeddings for semantic search and document management.21ISC
- FlicenseNot gradedqualityBmaintenanceA local RAG knowledge base MCP server that exposes semantic document search as tools using zvec for vector storage and Qwen3-Embedding for text embedding.-
- FlicenseNot gradedqualityBmaintenanceMCP server for Tencent IMA OpenAPI, enabling notes and knowledge base management through tools like search, create, and list.94-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/qqpp13465/ima-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server