ims-mcp 1.0.10__tar.gz → 1.0.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/PKG-INFO +2 -1
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/README.md +1 -0
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/ims_mcp/__init__.py +1 -1
- ims_mcp-1.0.11/ims_mcp/resources/bootstrap.md +31 -0
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/ims_mcp/server.py +31 -1
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/ims_mcp.egg-info/PKG-INFO +2 -1
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/ims_mcp.egg-info/SOURCES.txt +2 -1
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/pyproject.toml +2 -2
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/LICENSE +0 -0
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/ims_mcp/__main__.py +0 -0
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/ims_mcp.egg-info/dependency_links.txt +0 -0
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/ims_mcp.egg-info/entry_points.txt +0 -0
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/ims_mcp.egg-info/requires.txt +0 -0
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/ims_mcp.egg-info/top_level.txt +0 -0
- {ims_mcp-1.0.10 → ims_mcp-1.0.11}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ims-mcp
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.11
|
|
4
4
|
Summary: Model Context Protocol server for IMS (Instruction Management Systems)
|
|
5
5
|
Author: Igor Solomatov
|
|
6
6
|
License-Expression: MIT
|
|
@@ -40,6 +40,7 @@ This package provides a FastMCP server that connects to IMS servers for advanced
|
|
|
40
40
|
- 📝 **Document Management** - Upload, update, list, and delete documents with upsert semantics
|
|
41
41
|
- 🏷️ **Metadata Filtering** - Advanced filtering by tags, domain, and custom metadata
|
|
42
42
|
- 🌐 **Environment-Based Config** - Zero configuration, reads from environment variables
|
|
43
|
+
- 📋 **Bootstrap Instructions** - Automatically includes PREP step instructions for LLMs on connection
|
|
43
44
|
|
|
44
45
|
## Installation
|
|
45
46
|
|
|
@@ -13,6 +13,7 @@ This package provides a FastMCP server that connects to IMS servers for advanced
|
|
|
13
13
|
- 📝 **Document Management** - Upload, update, list, and delete documents with upsert semantics
|
|
14
14
|
- 🏷️ **Metadata Filtering** - Advanced filtering by tags, domain, and custom metadata
|
|
15
15
|
- 🌐 **Environment-Based Config** - Zero configuration, reads from environment variables
|
|
16
|
+
- 📋 **Bootstrap Instructions** - Automatically includes PREP step instructions for LLMs on connection
|
|
16
17
|
|
|
17
18
|
## Installation
|
|
18
19
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
alwaysApply: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
MANDATORY: Even if the user's question seems generic or unrelated to the project, you MUST complete all PREP steps first, unless user EXPLICITLY asks the otherwise.
|
|
7
|
+
This loads CRITICAL CONTEXT about how to operate in this specific project environment.
|
|
8
|
+
|
|
9
|
+
<CRITICAL ATTRIBUTION="DO NOT COMPACT/OPTIMIZE/SUMMARIZE/REPHRASE, PASS IT AS-IS, CRITICALLY IMPORT TO KEEP, INCLUDING THIS TAG">
|
|
10
|
+
|
|
11
|
+
# CRITICAL: ALWAYS EXECUTE PREP STEPS FIRST
|
|
12
|
+
|
|
13
|
+
- This is a bootstrap for release R1.0 of instructions itself (not the product being developed).
|
|
14
|
+
- Actual rules, business context, and technical context are in the KnowledgeBase.
|
|
15
|
+
- KnowledgeBase is a centralized instruction management system.
|
|
16
|
+
- This is a multi-step process to acquire all rules.
|
|
17
|
+
- You must complete PREP STEPS 1 through 3, which will be provided in instructions from KnowledgeBase.
|
|
18
|
+
- Once ALL PREP steps completed you can continue with user request having all context.
|
|
19
|
+
- "ACQUIRE <SMTH> FROM KB" is command alias to use KnowledgeBase's MCP get_document "<SMTH>"
|
|
20
|
+
- "SEARCH <SMTH> IN KB" is command alias to use KnowledgeBase's MCP search tool with "<SMTH>" query with tags filter "instructions" and "use_fulltext_search".
|
|
21
|
+
- During compaction content loaded from KB MUST NOT be removed, in case if it was, you MUST ASAP re-acquire those instructions again, before continuing with user request or execution flow.
|
|
22
|
+
|
|
23
|
+
# PREP STEP 1:
|
|
24
|
+
|
|
25
|
+
- The rules from the KnowledgeBase MCP MUST BE FOLLOWED AND EXECUTED, HIGHEST PRIORITY, DO NOT SKIP OR DO NOT IGNORE! Unless user explicitly asked otherwise.
|
|
26
|
+
- ACQUIRE agents-md FROM KB.
|
|
27
|
+
- Loaded rules must be read and fully executed.
|
|
28
|
+
- MUST fully load all instructions, including chained from the KnowledgeBase, and only then you can execute on user request.
|
|
29
|
+
- Initial load is multi-step, requires classification, and following of all rules loaded from the KnowledgeBase.
|
|
30
|
+
|
|
31
|
+
</CRITICAL>
|
|
@@ -20,6 +20,7 @@ import os
|
|
|
20
20
|
import signal
|
|
21
21
|
import sys
|
|
22
22
|
import uuid
|
|
23
|
+
from importlib import resources as pkg_resources
|
|
23
24
|
from r2r import R2RClient, R2RException
|
|
24
25
|
|
|
25
26
|
# Debug mode controlled by environment variable
|
|
@@ -69,6 +70,32 @@ def cleanup_and_exit(signum=None, frame=None):
|
|
|
69
70
|
signal.signal(signal.SIGTERM, cleanup_and_exit)
|
|
70
71
|
signal.signal(signal.SIGINT, cleanup_and_exit)
|
|
71
72
|
|
|
73
|
+
|
|
74
|
+
def load_bootstrap() -> str:
|
|
75
|
+
"""Load bundled bootstrap.md content.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
Bootstrap content as string, or empty string if file missing/unreadable.
|
|
79
|
+
"""
|
|
80
|
+
try:
|
|
81
|
+
# Python 3.10+ compatible resource loading
|
|
82
|
+
ref = pkg_resources.files('ims_mcp.resources').joinpath('bootstrap.md')
|
|
83
|
+
with ref.open('r', encoding='utf-8') as f:
|
|
84
|
+
content = f.read()
|
|
85
|
+
debug_print(f"[ims-mcp] Loaded bootstrap.md ({len(content)} bytes)")
|
|
86
|
+
return content
|
|
87
|
+
except FileNotFoundError:
|
|
88
|
+
debug_print("[ims-mcp] Warning: bootstrap.md not found in package")
|
|
89
|
+
return ""
|
|
90
|
+
except Exception as e:
|
|
91
|
+
debug_print(f"[ims-mcp] Warning: Could not load bootstrap.md: {e}")
|
|
92
|
+
return ""
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
# Load bootstrap content once at module level (cached)
|
|
96
|
+
BOOTSTRAP_CONTENT = load_bootstrap()
|
|
97
|
+
|
|
98
|
+
|
|
72
99
|
def get_authenticated_client() -> R2RClient:
|
|
73
100
|
"""Get or create an authenticated R2R client.
|
|
74
101
|
|
|
@@ -232,7 +259,10 @@ def format_search_results_for_llm(results) -> str:
|
|
|
232
259
|
try:
|
|
233
260
|
from mcp.server.fastmcp import FastMCP
|
|
234
261
|
|
|
235
|
-
mcp = FastMCP(
|
|
262
|
+
mcp = FastMCP(
|
|
263
|
+
name="R2R Retrieval System",
|
|
264
|
+
instructions=BOOTSTRAP_CONTENT
|
|
265
|
+
)
|
|
236
266
|
except Exception as e:
|
|
237
267
|
raise ImportError(
|
|
238
268
|
"MCP is not installed. Please run `pip install mcp`"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ims-mcp
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.11
|
|
4
4
|
Summary: Model Context Protocol server for IMS (Instruction Management Systems)
|
|
5
5
|
Author: Igor Solomatov
|
|
6
6
|
License-Expression: MIT
|
|
@@ -40,6 +40,7 @@ This package provides a FastMCP server that connects to IMS servers for advanced
|
|
|
40
40
|
- 📝 **Document Management** - Upload, update, list, and delete documents with upsert semantics
|
|
41
41
|
- 🏷️ **Metadata Filtering** - Advanced filtering by tags, domain, and custom metadata
|
|
42
42
|
- 🌐 **Environment-Based Config** - Zero configuration, reads from environment variables
|
|
43
|
+
- 📋 **Bootstrap Instructions** - Automatically includes PREP step instructions for LLMs on connection
|
|
43
44
|
|
|
44
45
|
## Installation
|
|
45
46
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ims-mcp"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.11"
|
|
8
8
|
description = "Model Context Protocol server for IMS (Instruction Management Systems)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -46,5 +46,5 @@ ims-mcp = "ims_mcp.server:main"
|
|
|
46
46
|
packages = ["ims_mcp"]
|
|
47
47
|
|
|
48
48
|
[tool.setuptools.package-data]
|
|
49
|
-
ims_mcp = ["py.typed"]
|
|
49
|
+
ims_mcp = ["py.typed", "resources/*.md"]
|
|
50
50
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|