IMS MCP Server

IMS MCP Server

Exposes the Integrated Memory System (IMS) capabilities, including session management, memory storage, and RAG-based context search, via the Model Context Protocol. It allows MCP-aware clients to interact with IMS backends to maintain long-term memory and context across sessions.

Category
访问服务器

README

IMS MCP Server

MCP server that exposes the Integrated Memory System (IMS) as tools via the Model Context Protocol Python SDK.

It wraps the existing IMS HTTP backend (session-memory, memory-core, context-rag) and makes those capabilities available to MCP-aware clients (e.g. mcphub, Warp, VS Code, LibreChat).

Prerequisites

  • Python 3.10+
  • An IMS backend running somewhere reachable (FastAPI/Uvicorn service), e.g.:
    • http://localhost:8000, or
    • http://ims.delongpa.com
  • The integrated-memory-system repo checked out on disk in this layout (relative to this project):
<some-parent-dir>/
  skills/
    integrated-memory-system/   # IMS FastAPI project (provides IMSClient)
  ims-mcp/                      # this repo

server.py imports IMSClient from skills/integrated-memory-system/app/ims_client.py using a relative path; if your layout is different, adjust server.py accordingly.

Installation (venv + pip)

From the ims-mcp directory:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

This installs the official MCP Python SDK (mcp[cli]).

Configuration

The MCP server talks to IMS via environment variables. These can be provided in three ways (in order of increasing precedence):

  1. A local .env file in the project root (or a path specified by IMS_ENV_FILE)
  2. The process environment (e.g. exported variables in your shell)
  3. Environment variables set by the MCP host (e.g. mcphub env block)

Supported variables:

  • IMS_BASE_URL (required)
    • Base URL of the IMS HTTP service, e.g. http://localhost:8000 or https://ims.delongpa.com.
  • IMS_HTTP_TIMEOUT (optional, default 5.0 seconds)
  • IMS_CLIENT_NAME (optional, default "ims-mcp")
  • IMS_ENV_FILE (optional, default .env)
    • If set, points to a .env-style file to load before reading other vars.

Using a .env file (local development)

Create a file named .env next to server.py:

IMS_BASE_URL=http://localhost:8000
IMS_HTTP_TIMEOUT=5.0
IMS_CLIENT_NAME=ims-mcp

You can override the file name/path with IMS_ENV_FILE if needed.

Setting variables directly

Example using exported variables:

export IMS_BASE_URL="http://ims.delongpa.com"
export IMS_HTTP_TIMEOUT="5.0"
export IMS_CLIENT_NAME="ims-mcp"

Running the MCP server locally

With the venv activated and IMS_BASE_URL set:

source .venv/bin/activate
export IMS_BASE_URL="http://localhost:8000"  # or your IMS URL
python server.py

The server runs over stdio, which is what MCP clients expect when they spawn it as a subprocess.

mcphub configuration example

To use this server from mcphub on a host where you cloned this repo to /opt/mcps/ims-mcp and created the venv as above, add an entry like:

"IMS-MCP": {
  "type": "stdio",
  "command": "/opt/mcps/ims-mcp/.venv/bin/python",
  "args": [
    "/opt/mcps/ims-mcp/server.py"
  ],
  "env": {
    "IMS_BASE_URL": "http://ims.delongpa.com"
  }
}

Adjust paths and IMS_BASE_URL to match your environment.

Exposed tools

The MCP server exposes the following tools (namespaces follow the IMS service names):

  • ims.context-rag.context_search
    • Wrapper over POST /context/search.
  • ims.memory-core.store_memory
    • Wrapper over POST /memories/store.
  • ims.memory-core.find_memories
    • Wrapper over POST /memories/search.
  • ims.session-memory.auto_session
    • Wrapper over POST /sessions/auto.
  • ims.session-memory.continue_session
    • Wrapper over POST /sessions/continue.
  • ims.session-memory.wrap_session
    • Wrapper over POST /sessions/wrap.
  • ims.session-memory.list_open_sessions
    • Wrapper over POST /sessions/list_open.
  • ims.session-memory.resume_session
    • Wrapper over POST /sessions/resume.

For detailed behavior of these endpoints, see spec/API_ENDPOINTS.md in the integrated-memory-system repo and AGENTS.md in this repo for the IMS agent protocol.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选