rosetta-mcp 2.0.1__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.
- rosetta_mcp-2.0.1/PKG-INFO +619 -0
- rosetta_mcp-2.0.1/README.md +596 -0
- rosetta_mcp-2.0.1/pyproject.toml +38 -0
- rosetta_mcp-2.0.1/rosetta_mcp.egg-info/PKG-INFO +619 -0
- rosetta_mcp-2.0.1/rosetta_mcp.egg-info/SOURCES.txt +8 -0
- rosetta_mcp-2.0.1/rosetta_mcp.egg-info/dependency_links.txt +1 -0
- rosetta_mcp-2.0.1/rosetta_mcp.egg-info/entry_points.txt +2 -0
- rosetta_mcp-2.0.1/rosetta_mcp.egg-info/requires.txt +1 -0
- rosetta_mcp-2.0.1/rosetta_mcp.egg-info/top_level.txt +1 -0
- rosetta_mcp-2.0.1/setup.cfg +4 -0
|
@@ -0,0 +1,619 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rosetta-mcp
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: Model Context Protocol server for Rosetta (Enterprise Engineering Governance and Instructions Management System)
|
|
5
|
+
Author-email: Rosetta Team <rosetta-support@griddynamics.com>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/griddynamics/rosetta
|
|
8
|
+
Project-URL: Discord, https://discord.gg/QzZ2cWg36g
|
|
9
|
+
Project-URL: Website, https://griddynamics.github.io/rosetta/
|
|
10
|
+
Project-URL: Support, https://github.com/griddynamics/rosetta/issues
|
|
11
|
+
Keywords: mcp,rosetta,retrieval,rag,ai,llm,model-context-protocol,knowledge-base
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Requires-Dist: ims-mcp==2.0.1
|
|
23
|
+
|
|
24
|
+
# rosetta-mcp
|
|
25
|
+
|
|
26
|
+
**Model Context Protocol (MCP) server for Rosetta (Enterprise Engineering Governance and Instructions Management System)**
|
|
27
|
+
|
|
28
|
+
*Powered by [RAGFlow](https://github.com/infiniflow/ragflow) for advanced RAG capabilities*
|
|
29
|
+
|
|
30
|
+
This package provides a FastMCP server that connects to Rosetta servers for advanced retrieval-augmented generation (RAG) capabilities. It enables AI assistants like Claude Desktop, Cursor, and other MCP clients to search, retrieve, and manage documents in Rosetta knowledge bases.
|
|
31
|
+
|
|
32
|
+
## Community
|
|
33
|
+
|
|
34
|
+
- [Discord](https://discord.gg/QzZ2cWg36g)
|
|
35
|
+
- [Website](https://griddynamics.github.io/rosetta/)
|
|
36
|
+
- [rosetta-support@griddynamics.com](mailto:rosetta-support@griddynamics.com)
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- π§ **Context Bootstrap** - `get_context_instructions` loads bootstrap rules for agent setup
|
|
41
|
+
- π **Instruction Retrieval** - `query_instructions` fetches docs by keyword or tags
|
|
42
|
+
- ποΈ **Instruction Browsing** - `list_instructions` lists folders/files by virtual path prefix
|
|
43
|
+
- ποΈ **Project Context Management** - discover, query, and store project datasets
|
|
44
|
+
- π **Feedback Capture** - structured `submit_feedback` for workflow learning loops
|
|
45
|
+
- π **Execution Plans** - `plan_manager` stores and manages AI execution plans
|
|
46
|
+
- π **Instruction Resources** - `rosetta://{path*}` resource template for bundled reads
|
|
47
|
+
- π **Environment-Based Config** - Zero configuration, reads from environment variables
|
|
48
|
+
- π **STDIO + HTTP OAuth** - API-key runtime plus OAuth proxy support for HTTP transports
|
|
49
|
+
- π **Usage Analytics** - Built-in PostHog integration for tracking feature adoption (enabled by default, opt-out)
|
|
50
|
+
|
|
51
|
+
## Installation
|
|
52
|
+
|
|
53
|
+
### Using uvx (recommended)
|
|
54
|
+
|
|
55
|
+
The easiest way to use rosetta-mcp is with `uvx`, which automatically handles installation:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
uvx rosetta-mcp@latest
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Using pip
|
|
62
|
+
|
|
63
|
+
Install globally or in a virtual environment:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install rosetta-mcp
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Then run:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
rosetta-mcp
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### As a Python Module
|
|
76
|
+
|
|
77
|
+
You can also run it as a module:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
python -m ims_mcp
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Configuration
|
|
84
|
+
|
|
85
|
+
Rosetta MCP supports two runtime modes:
|
|
86
|
+
|
|
87
|
+
1. `STDIO` (default) for MCP clients that launch a local process (`command` + `args`)
|
|
88
|
+
2. `HTTP` for remote/server deployment behind OAuth
|
|
89
|
+
|
|
90
|
+
### Complete Environment Variable Reference
|
|
91
|
+
|
|
92
|
+
| Variable | Scope | Default | Notes |
|
|
93
|
+
|----------|-------|---------|-------|
|
|
94
|
+
| `ROSETTA_SERVER_URL` | Runtime (all modes) | `https://ims.evergreen.gcp.griddynamics.net/` | Rosetta Server base URL |
|
|
95
|
+
| `ROSETTA_API_KEY` | Runtime (all modes) | Empty | Required for Rosetta Server access |
|
|
96
|
+
| `VERSION` | Runtime (all modes) | `r1` | Used for instruction dataset resolution (`aia-{version}`) |
|
|
97
|
+
| `ROSETTA_TRANSPORT` | Runtime (all modes) | `stdio` | `stdio` or `http` |
|
|
98
|
+
| `ROSETTA_HTTP_HOST` | Runtime (HTTP) | `0.0.0.0` | HTTP bind host |
|
|
99
|
+
| `ROSETTA_HTTP_PORT` | Runtime (HTTP) | `8000` | HTTP bind port |
|
|
100
|
+
| `REDIS_URL` | Runtime (HTTP) | Empty | Optional Redis session store; empty uses in-memory store |
|
|
101
|
+
| `ROSETTA_ALLOWED_ORIGINS` | Runtime (HTTP) | Empty | Comma-separated `Origin` allowlist |
|
|
102
|
+
| `ROSETTA_OAUTH_MODE` | Runtime (HTTP OAuth) | `oauth` | `oauth` (introspection) or `oidc` (JWT via discovery doc) |
|
|
103
|
+
| `ROSETTA_OAUTH_OIDC_CONFIG_URL` | Runtime (HTTP OAuth, oidc) | Empty | IdP OIDC discovery URL (e.g. `https://keycloak.host/realms/x/.well-known/openid-configuration`) |
|
|
104
|
+
| `ROSETTA_OAUTH_AUTHORIZATION_ENDPOINT` | Runtime (HTTP OAuth, oauth) | Empty | IdP authorize endpoint |
|
|
105
|
+
| `ROSETTA_OAUTH_TOKEN_ENDPOINT` | Runtime (HTTP OAuth, oauth) | Empty | IdP token endpoint |
|
|
106
|
+
| `ROSETTA_OAUTH_INTROSPECTION_ENDPOINT` | Runtime (HTTP OAuth, oauth) | Empty | IdP token introspection endpoint |
|
|
107
|
+
| `ROSETTA_OAUTH_REVOCATION_ENDPOINT` | Runtime (HTTP OAuth) | Empty | IdP token revocation endpoint (optional) |
|
|
108
|
+
| `ROSETTA_OAUTH_CLIENT_ID` | Runtime (HTTP OAuth) | Empty | Client ID registered with the IdP |
|
|
109
|
+
| `ROSETTA_OAUTH_CLIENT_SECRET` | Runtime (HTTP OAuth) | Empty | Client secret registered with the IdP |
|
|
110
|
+
| `ROSETTA_OAUTH_BASE_URL` | Runtime (HTTP OAuth) | Empty | Our public MCP URL for OAuth callbacks; fallback is `http://{ROSETTA_HTTP_HOST}:{ROSETTA_HTTP_PORT}` |
|
|
111
|
+
| `ROSETTA_OAUTH_CALLBACK_PATH` | Runtime (HTTP OAuth) | `/auth/callback` | OAuth callback path mounted by Rosetta MCP |
|
|
112
|
+
| `ROSETTA_OAUTH_REQUIRED_SCOPES` | Runtime (HTTP OAuth) | Empty | Space-separated scopes required on tokens (e.g. `offline_access`) |
|
|
113
|
+
| `ROSETTA_OAUTH_VALID_SCOPES` | Runtime (HTTP OAuth, oauth) | Empty | Space-separated scopes advertised in `.well-known`; empty = derived from required scopes |
|
|
114
|
+
| `ROSETTA_OAUTH_EXTRA_SCOPES` | Runtime (HTTP OAuth) | Empty | Space-separated scopes forwarded to IdP authorize endpoint (e.g. `openid email offline_access`) |
|
|
115
|
+
| `ROSETTA_JWT_SIGNING_KEY` | Runtime (HTTP OAuth) | Empty | Secret for signing FastMCP JWTs; if unset, derived from client secret |
|
|
116
|
+
| `FERNET_KEY` | Runtime (HTTP OAuth) | Empty | Fernet key for encrypting OAuth token storage in Redis |
|
|
117
|
+
| `ROSETTA_READ_POLICY` | Runtime (authz) | `all` | `all`, `team`, `none` for project dataset reads |
|
|
118
|
+
| `ROSETTA_WRITE_POLICY` | Runtime (authz) | `all` | `all`, `team`, `none` for project dataset writes/creates |
|
|
119
|
+
| `ROSETTA_USER_EMAIL` | Runtime (authz) | `rosetta@griddynamics.net` | STDIO identity and HTTP fallback identity |
|
|
120
|
+
| `ROSETTA_INVITE_EMAILS` | Runtime (authz) | Empty | Comma-separated invite list for project dataset creation flow |
|
|
121
|
+
| `ROSETTA_MODE` | Runtime (prompts) | `HARD` | Prompt mode selection: `HARD` or `SOFT` |
|
|
122
|
+
| `ROSETTA_PLAN_TTL_DAYS` | Runtime (plan manager) | `5` | Plan expiry in days |
|
|
123
|
+
| `INSTRUCTION_ROOT_FILTER` | Runtime (instructions query) | Empty | Comma-separated root tags filter |
|
|
124
|
+
| `IMS_DEBUG` | Runtime (debug) | Disabled | Enable debug logs (`1`, `true`, `yes`, `on`) |
|
|
125
|
+
| `FASTMCP_LOG_LEVEL` | Runtime (debug) | `INFO` | Set to `DEBUG` alongside `IMS_DEBUG=1` for full FastMCP internals (auth, middleware) |
|
|
126
|
+
| `FASTMCP_ENABLE_RICH_LOGGING` | Runtime (debug) | `true` | Set to `false` to disable Rich formatting β use in production/Grafana to prevent multiline log splitting |
|
|
127
|
+
| `POSTHOG_API_KEY` | Runtime (analytics) | Package-injected key | Set to `""` to disable analytics |
|
|
128
|
+
| `POSTHOG_HOST` | Runtime (analytics) | `https://eu.i.posthog.com` | PostHog endpoint |
|
|
129
|
+
| `USER` | Runtime (analytics context) | OS-dependent | Username source (priority 1) |
|
|
130
|
+
| `USERNAME` | Runtime (analytics context) | OS-dependent | Username source (priority 2) |
|
|
131
|
+
| `LOGNAME` | Runtime (analytics context) | OS-dependent | Username source (priority 3) |
|
|
132
|
+
|
|
133
|
+
### Shared Variables (Both Modes)
|
|
134
|
+
|
|
135
|
+
| Variable | Description | Default |
|
|
136
|
+
|----------|-------------|---------|
|
|
137
|
+
| `ROSETTA_SERVER_URL` | Rosetta Server base URL | `https://ims.evergreen.gcp.griddynamics.net/` |
|
|
138
|
+
| `ROSETTA_API_KEY` | API key used by Rosetta MCP to access Rosetta Server | Required |
|
|
139
|
+
| `VERSION` | Instruction release used for instruction dataset resolution (`aia-{version}`) | `r1` |
|
|
140
|
+
| `IMS_DEBUG` | Enable debug logging to stderr (`1/true/yes/on`) | Disabled |
|
|
141
|
+
| `FASTMCP_LOG_LEVEL` | Set to `DEBUG` alongside `IMS_DEBUG=1` for full FastMCP internals | `INFO` |
|
|
142
|
+
| `FASTMCP_ENABLE_RICH_LOGGING` | Set to `false` to disable Rich formatting (use in production/Grafana) | `true` |
|
|
143
|
+
| `POSTHOG_API_KEY` | PostHog project API key (set `""` to disable analytics) | Package default |
|
|
144
|
+
| `POSTHOG_HOST` | PostHog host | `https://eu.i.posthog.com` |
|
|
145
|
+
|
|
146
|
+
### STDIO Mode (Default)
|
|
147
|
+
|
|
148
|
+
Set:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
ROSETTA_TRANSPORT=stdio
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
STDIO keeps API-key access and does not use OAuth. User identity for authorization checks comes from:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
ROSETTA_USER_EMAIL=rosetta@griddynamics.net
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### HTTP Mode
|
|
161
|
+
|
|
162
|
+
Set:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
ROSETTA_TRANSPORT=http
|
|
166
|
+
ROSETTA_HTTP_HOST=0.0.0.0
|
|
167
|
+
ROSETTA_HTTP_PORT=8000
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Optional HTTP runtime settings:
|
|
171
|
+
|
|
172
|
+
| Variable | Description | Default |
|
|
173
|
+
|----------|-------------|---------|
|
|
174
|
+
| `REDIS_URL` | Shared session store for multi-instance deployments | In-memory store |
|
|
175
|
+
| `ROSETTA_ALLOWED_ORIGINS` | Comma-separated allowlist for `Origin` header validation | No restriction |
|
|
176
|
+
|
|
177
|
+
OAuth variables for HTTP mode:
|
|
178
|
+
|
|
179
|
+
| Variable | Mode | Description |
|
|
180
|
+
|----------|------|-------------|
|
|
181
|
+
| `ROSETTA_OAUTH_MODE` | both | `oauth` (default) or `oidc` |
|
|
182
|
+
| `ROSETTA_OAUTH_OIDC_CONFIG_URL` | oidc | IdP OIDC discovery URL |
|
|
183
|
+
| `ROSETTA_OAUTH_AUTHORIZATION_ENDPOINT` | oauth | IdP authorize URL |
|
|
184
|
+
| `ROSETTA_OAUTH_TOKEN_ENDPOINT` | oauth | IdP token URL |
|
|
185
|
+
| `ROSETTA_OAUTH_INTROSPECTION_ENDPOINT` | oauth | IdP introspection URL |
|
|
186
|
+
| `ROSETTA_OAUTH_REVOCATION_ENDPOINT` | both | IdP revocation URL (optional) |
|
|
187
|
+
| `ROSETTA_OAUTH_CLIENT_ID` | both | Client ID registered with IdP |
|
|
188
|
+
| `ROSETTA_OAUTH_CLIENT_SECRET` | both | Client secret registered with IdP |
|
|
189
|
+
| `ROSETTA_OAUTH_BASE_URL` | both | Our public MCP URL for OAuth callbacks |
|
|
190
|
+
| `ROSETTA_OAUTH_CALLBACK_PATH` | both | Callback path (default `/auth/callback`) |
|
|
191
|
+
| `ROSETTA_OAUTH_REQUIRED_SCOPES` | both | Space-separated scopes required on tokens |
|
|
192
|
+
| `ROSETTA_OAUTH_VALID_SCOPES` | oauth | Space-separated scopes advertised in `.well-known` |
|
|
193
|
+
| `ROSETTA_OAUTH_EXTRA_SCOPES` | both | Space-separated scopes forwarded to IdP authorize |
|
|
194
|
+
| `ROSETTA_JWT_SIGNING_KEY` | both | Secret for signing FastMCP JWTs |
|
|
195
|
+
| `FERNET_KEY` | both | Fernet key for encrypting token storage in Redis |
|
|
196
|
+
|
|
197
|
+
Authorization policy variables (dataset-level):
|
|
198
|
+
|
|
199
|
+
| Variable | Description | Default |
|
|
200
|
+
|----------|-------------|---------|
|
|
201
|
+
| `ROSETTA_READ_POLICY` | `all`, `team`, `none` for read access on `project-*` datasets | `all` |
|
|
202
|
+
| `ROSETTA_WRITE_POLICY` | `all`, `team`, `none` for write/create on `project-*` datasets | `all` |
|
|
203
|
+
| `ROSETTA_USER_EMAIL` | Fallback user email (used in STDIO, and HTTP fallback) | `rosetta@griddynamics.net` |
|
|
204
|
+
| `ROSETTA_INVITE_EMAILS` | Comma-separated emails auto-invited on project dataset creation | Empty |
|
|
205
|
+
|
|
206
|
+
OAuth callback URL examples:
|
|
207
|
+
- Production: `https://rosetta.evergreen.gcp.griddynamics.net/auth/callback`
|
|
208
|
+
- Local: `http://localhost:8000/auth/callback`
|
|
209
|
+
|
|
210
|
+
## Usage with MCP Clients
|
|
211
|
+
|
|
212
|
+
### STDIO Mode (Cursor / Claude / local MCP clients)
|
|
213
|
+
|
|
214
|
+
Add to `.cursor/mcp.json` (or equivalent client config):
|
|
215
|
+
|
|
216
|
+
```json
|
|
217
|
+
{
|
|
218
|
+
"mcpServers": {
|
|
219
|
+
"Rosetta": {
|
|
220
|
+
"command": "uvx",
|
|
221
|
+
"args": ["rosetta-mcp@latest"],
|
|
222
|
+
"env": {
|
|
223
|
+
"ROSETTA_TRANSPORT": "stdio",
|
|
224
|
+
"ROSETTA_SERVER_URL": "https://ims.evergreen.gcp.griddynamics.net",
|
|
225
|
+
"ROSETTA_API_KEY": "your-rosetta-api-key",
|
|
226
|
+
"ROSETTA_USER_EMAIL": "you@griddynamics.com"
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### HTTP Mode (Server deployment)
|
|
234
|
+
|
|
235
|
+
Start Rosetta MCP in HTTP mode:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
ROSETTA_TRANSPORT=http \
|
|
239
|
+
ROSETTA_SERVER_URL="https://ims.evergreen.gcp.griddynamics.net" \
|
|
240
|
+
ROSETTA_API_KEY="your-rosetta-api-key" \
|
|
241
|
+
ROSETTA_HTTP_HOST=0.0.0.0 \
|
|
242
|
+
ROSETTA_HTTP_PORT=8000 \
|
|
243
|
+
ROSETTA_OAUTH_AUTHORIZATION_ENDPOINT="https://keycloak.evergreen.gcp.griddynamics.net/realms/<realm>/protocol/openid-connect/auth" \
|
|
244
|
+
ROSETTA_OAUTH_TOKEN_ENDPOINT="https://keycloak.evergreen.gcp.griddynamics.net/realms/<realm>/protocol/openid-connect/token" \
|
|
245
|
+
ROSETTA_OAUTH_INTROSPECTION_ENDPOINT="https://keycloak.evergreen.gcp.griddynamics.net/realms/<realm>/protocol/openid-connect/token/introspect" \
|
|
246
|
+
ROSETTA_OAUTH_CLIENT_ID="<client-id>" \
|
|
247
|
+
ROSETTA_OAUTH_CLIENT_SECRET="<client-secret>" \
|
|
248
|
+
ROSETTA_OAUTH_BASE_URL="https://rosetta.evergreen.gcp.griddynamics.net" \
|
|
249
|
+
rosetta-mcp
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
For multi-instance deployment with shared session state, add `REDIS_URL`:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
ROSETTA_TRANSPORT=http \
|
|
256
|
+
ROSETTA_SERVER_URL="https://ims.evergreen.gcp.griddynamics.net" \
|
|
257
|
+
ROSETTA_API_KEY="your-rosetta-api-key" \
|
|
258
|
+
ROSETTA_HTTP_HOST=0.0.0.0 \
|
|
259
|
+
ROSETTA_HTTP_PORT=8000 \
|
|
260
|
+
REDIS_URL="redis://localhost:6379/0" \
|
|
261
|
+
ROSETTA_OAUTH_AUTHORIZATION_ENDPOINT="https://keycloak.evergreen.gcp.griddynamics.net/realms/<realm>/protocol/openid-connect/auth" \
|
|
262
|
+
ROSETTA_OAUTH_TOKEN_ENDPOINT="https://keycloak.evergreen.gcp.griddynamics.net/realms/<realm>/protocol/openid-connect/token" \
|
|
263
|
+
ROSETTA_OAUTH_INTROSPECTION_ENDPOINT="https://keycloak.evergreen.gcp.griddynamics.net/realms/<realm>/protocol/openid-connect/token/introspect" \
|
|
264
|
+
ROSETTA_OAUTH_CLIENT_ID="<client-id>" \
|
|
265
|
+
ROSETTA_OAUTH_CLIENT_SECRET="<client-secret>" \
|
|
266
|
+
ROSETTA_OAUTH_BASE_URL="https://rosetta.evergreen.gcp.griddynamics.net" \
|
|
267
|
+
rosetta-mcp
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
If your MCP client supports HTTP servers directly, point it to:
|
|
271
|
+
|
|
272
|
+
```text
|
|
273
|
+
http://<host>:<port>/mcp
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Minimal HTTP client config shape (client-specific fields may vary):
|
|
277
|
+
|
|
278
|
+
```json
|
|
279
|
+
{
|
|
280
|
+
"mcpServers": {
|
|
281
|
+
"RosettaHTTP": {
|
|
282
|
+
"url": "https://rosetta.evergreen.gcp.griddynamics.net/mcp"
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Available MCP Tools
|
|
289
|
+
|
|
290
|
+
### 1. get_context_instructions
|
|
291
|
+
|
|
292
|
+
Load bootstrap context instructions (prep step entry point).
|
|
293
|
+
|
|
294
|
+
**Parameters:**
|
|
295
|
+
- `topic` (str, optional): Brief intent summary (<=10 words), used for tracking only
|
|
296
|
+
|
|
297
|
+
**Example:**
|
|
298
|
+
```python
|
|
299
|
+
get_context_instructions(topic="update readme")
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### 2. query_instructions
|
|
303
|
+
|
|
304
|
+
Fetch instruction documents from the instruction dataset.
|
|
305
|
+
|
|
306
|
+
**Parameters:**
|
|
307
|
+
- `query` (str, optional): Keyword query
|
|
308
|
+
- `tags` (list[str], optional): Tag-based query (`OR` logic)
|
|
309
|
+
- `topic` (str, optional): Tracking-only intent hint
|
|
310
|
+
|
|
311
|
+
At least one of `query` or `tags` is required.
|
|
312
|
+
|
|
313
|
+
Validation notes:
|
|
314
|
+
- `query`: up to 2000 characters
|
|
315
|
+
- `tags`: up to 50 items, each up to 128 characters
|
|
316
|
+
- single-string `tags` input must be non-empty
|
|
317
|
+
|
|
318
|
+
**Example:**
|
|
319
|
+
```python
|
|
320
|
+
query_instructions(tags=["bootstrap"])
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### 3. list_instructions
|
|
324
|
+
|
|
325
|
+
List immediate children under a virtual instruction path without loading file content.
|
|
326
|
+
|
|
327
|
+
**Parameters:**
|
|
328
|
+
- `path_prefix` (str): Virtual path prefix such as `skills`, `rules`, or `workflows`, or `all` to list all instruction files without content
|
|
329
|
+
|
|
330
|
+
Validation notes:
|
|
331
|
+
- Use `""` or `/` to list the root
|
|
332
|
+
- Use `all` to list all `<rosetta:file />` entries without content
|
|
333
|
+
- `all` includes a note that duplicate `path` values are bundled/combined when acquired
|
|
334
|
+
- Use guaranteed unique 3-part/2-part tags to read specific content
|
|
335
|
+
- `path_prefix` must stay relative
|
|
336
|
+
- `path_prefix` must not contain `.` or `..` path segments
|
|
337
|
+
- max length: 512 characters
|
|
338
|
+
|
|
339
|
+
**Example:**
|
|
340
|
+
```python
|
|
341
|
+
list_instructions(path_prefix="rules")
|
|
342
|
+
list_instructions(path_prefix="all")
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### 4. submit_feedback
|
|
346
|
+
|
|
347
|
+
Store workflow feedback for continuous improvement.
|
|
348
|
+
|
|
349
|
+
**Parameters:**
|
|
350
|
+
- `request_mode` (str): Non-empty workflow mode, e.g. `coding.md`
|
|
351
|
+
- `feedback` (dict): Structured payload with required keys:
|
|
352
|
+
- `summary` (non-empty)
|
|
353
|
+
- `root_cause` (non-empty)
|
|
354
|
+
- `prompt_suggestions` (non-empty string or non-empty list of strings)
|
|
355
|
+
- `context` (non-empty)
|
|
356
|
+
|
|
357
|
+
**Example:**
|
|
358
|
+
```python
|
|
359
|
+
submit_feedback(
|
|
360
|
+
request_mode="coding.md",
|
|
361
|
+
feedback={
|
|
362
|
+
"summary": "User asked for README fixes.",
|
|
363
|
+
"root_cause": "README had stale tool docs.",
|
|
364
|
+
"prompt_suggestions": "Keep README in sync with tool surface.",
|
|
365
|
+
"context": "ims-mcp-server README alignment"
|
|
366
|
+
}
|
|
367
|
+
)
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
### 5. discover_projects
|
|
371
|
+
|
|
372
|
+
List readable project datasets (`project-*`) available in Rosetta Server.
|
|
373
|
+
|
|
374
|
+
**Parameters:**
|
|
375
|
+
- `query` (str, optional): Name filter; empty or whitespace-only means no filter
|
|
376
|
+
|
|
377
|
+
Validation notes:
|
|
378
|
+
- `query`: up to 256 characters
|
|
379
|
+
|
|
380
|
+
**Example:**
|
|
381
|
+
```python
|
|
382
|
+
discover_projects(query="rulesofpower")
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### 6. query_project_context
|
|
386
|
+
|
|
387
|
+
Query documents inside a project dataset.
|
|
388
|
+
|
|
389
|
+
**Parameters:**
|
|
390
|
+
- `repository_name` (str): Project name
|
|
391
|
+
- `query` (str, optional): Keyword query
|
|
392
|
+
- `tags` (list[str], optional): Tag filter
|
|
393
|
+
- `topic` (str, optional): Tracking-only intent hint
|
|
394
|
+
|
|
395
|
+
At least one of `query` or `tags` is required.
|
|
396
|
+
|
|
397
|
+
Validation notes:
|
|
398
|
+
- `repository_name`: up to 256 characters
|
|
399
|
+
- `query`: up to 2000 characters
|
|
400
|
+
- `tags`: up to 50 items, each up to 128 characters
|
|
401
|
+
|
|
402
|
+
**Example:**
|
|
403
|
+
```python
|
|
404
|
+
query_project_context(
|
|
405
|
+
repository_name="rulesofpower",
|
|
406
|
+
tags=["architecture"]
|
|
407
|
+
)
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### 7. store_project_context
|
|
411
|
+
|
|
412
|
+
Create or update a project context document.
|
|
413
|
+
|
|
414
|
+
**Parameters:**
|
|
415
|
+
- `repository_name` (str): Project name
|
|
416
|
+
- `document` (str): Relative document path
|
|
417
|
+
- `tags` (list[str]): 1-50 non-empty document tags
|
|
418
|
+
- `content` (str): Non-empty document body
|
|
419
|
+
- `force` (bool, optional): If `true`, creates dataset when missing
|
|
420
|
+
|
|
421
|
+
Validation notes:
|
|
422
|
+
- `repository_name`, `document`, and `content` must be non-empty
|
|
423
|
+
- `document` must not be absolute and must not contain `.` or `..` path segments
|
|
424
|
+
- `repository_name`: up to 256 characters
|
|
425
|
+
- `document`: up to 512 characters
|
|
426
|
+
- `content`: up to 200000 characters
|
|
427
|
+
- `tags`: 1-50 items, each up to 128 characters
|
|
428
|
+
|
|
429
|
+
**Example:**
|
|
430
|
+
```python
|
|
431
|
+
store_project_context(
|
|
432
|
+
repository_name="rulesofpower",
|
|
433
|
+
document="ARCHITECTURE.md",
|
|
434
|
+
tags=["architecture", "backend"],
|
|
435
|
+
content="# Architecture\\n...",
|
|
436
|
+
force=True
|
|
437
|
+
)
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
### 8. plan_manager
|
|
441
|
+
|
|
442
|
+
Manage execution plans stored in Rosetta.
|
|
443
|
+
|
|
444
|
+
**Parameters:**
|
|
445
|
+
- `command` (str): `upsert`, `query`, `show_status`, `update_status`, or `next`
|
|
446
|
+
- `plan_name` (str): Non-empty plan identifier
|
|
447
|
+
- `target_id` (str, optional): `entire_plan`, phase id, or step id
|
|
448
|
+
- `data` (dict | str, optional): RFC 7396 merge-patch payload for `upsert`
|
|
449
|
+
- `new_status` (str, optional): New status for `update_status`
|
|
450
|
+
- `limit` (int, optional): Max items returned by `next`; `0` means all
|
|
451
|
+
|
|
452
|
+
**Example:**
|
|
453
|
+
```python
|
|
454
|
+
plan_manager(
|
|
455
|
+
command="query",
|
|
456
|
+
plan_name="rulesofpower-hardening",
|
|
457
|
+
)
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
## Resource Template
|
|
461
|
+
|
|
462
|
+
### rosetta://{path*}
|
|
463
|
+
|
|
464
|
+
Reads bundled instruction content by resource path.
|
|
465
|
+
|
|
466
|
+
`path` must be a relative resource path without `.` or `..` path segments.
|
|
467
|
+
Blank paths are not valid resource URIs.
|
|
468
|
+
|
|
469
|
+
```text
|
|
470
|
+
rosetta://rules/bootstrap-core-policy.md
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
## Development
|
|
474
|
+
|
|
475
|
+
### Local Installation
|
|
476
|
+
|
|
477
|
+
Install directly from PyPI:
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
pip install rosetta-mcp
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
Or for the latest development version, install from source if you have the code locally:
|
|
484
|
+
|
|
485
|
+
```bash
|
|
486
|
+
pip install -e .
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
### Running Tests
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
pip install -e ".[dev]"
|
|
493
|
+
pytest
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### Building for Distribution
|
|
497
|
+
|
|
498
|
+
```bash
|
|
499
|
+
python -m build
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
### Docker Image Build
|
|
503
|
+
|
|
504
|
+
The project includes a GitHub Actions workflow for automated Docker image building and publishing to GCP Artifact Registry.
|
|
505
|
+
|
|
506
|
+
**Version Management:** The workflow automatically extracts the version from `pyproject.toml` during the build processβno manual files or commits needed.
|
|
507
|
+
|
|
508
|
+
**Image Tag Format:** `{version}-{git-short-sha}` (e.g., `2.0.0b59-a1b2c3d`)
|
|
509
|
+
|
|
510
|
+
**Image Location:** `us-central1-docker.pkg.dev/gd-gcp-rnd-evergreen/evergreen-v2/rosetta-mcp`
|
|
511
|
+
|
|
512
|
+
**How it works:**
|
|
513
|
+
1. Extracts version from `pyproject.toml`
|
|
514
|
+
2. Passes version to reusable Evergreen build workflow via `app-version` parameter
|
|
515
|
+
3. Builds and tags Docker image as `{version}-{git-sha}`
|
|
516
|
+
|
|
517
|
+
## Usage Analytics
|
|
518
|
+
|
|
519
|
+
Rosetta MCP includes built-in usage analytics via PostHog to help understand feature adoption and usage patterns.
|
|
520
|
+
|
|
521
|
+
### Default Behavior
|
|
522
|
+
|
|
523
|
+
**Published packages** (from PyPI via CI/CD): Analytics are **ENABLED BY DEFAULT** with a built-in Project API Key (write-only, safe for client-side use). No configuration required.
|
|
524
|
+
|
|
525
|
+
**Local development builds**: Analytics are **DISABLED** (placeholder key remains in source code).
|
|
526
|
+
|
|
527
|
+
### Disable Analytics
|
|
528
|
+
|
|
529
|
+
To **disable** analytics, set `POSTHOG_API_KEY` to an empty string in your MCP configuration:
|
|
530
|
+
|
|
531
|
+
```json
|
|
532
|
+
{
|
|
533
|
+
"mcpServers": {
|
|
534
|
+
"Rosetta": {
|
|
535
|
+
"command": "uvx",
|
|
536
|
+
"args": ["rosetta-mcp@latest"],
|
|
537
|
+
"env": {
|
|
538
|
+
"ROSETTA_TRANSPORT": "stdio",
|
|
539
|
+
"ROSETTA_SERVER_URL": "https://ims.evergreen.gcp.griddynamics.net",
|
|
540
|
+
"ROSETTA_API_KEY": "your-rosetta-api-key",
|
|
541
|
+
"POSTHOG_API_KEY": ""
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
### Use Custom PostHog Project
|
|
549
|
+
|
|
550
|
+
To track analytics in your own PostHog project, provide your Project API Key:
|
|
551
|
+
|
|
552
|
+
```json
|
|
553
|
+
{
|
|
554
|
+
"mcpServers": {
|
|
555
|
+
"Rosetta": {
|
|
556
|
+
"env": {
|
|
557
|
+
"POSTHOG_API_KEY": "phc_YOUR_CUSTOM_PROJECT_API_KEY",
|
|
558
|
+
"POSTHOG_HOST": "https://eu.i.posthog.com"
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
```
|
|
564
|
+
|
|
565
|
+
**Where to Find Your Project API Key:**
|
|
566
|
+
|
|
567
|
+
1. Log into PostHog dashboard
|
|
568
|
+
2. Navigate to: **Project Settings** β **Project API Key**
|
|
569
|
+
3. Copy the key (starts with `phc_`)
|
|
570
|
+
|
|
571
|
+
**Important**: Use **Project API Key** (write-only, for event ingestion), not Personal API Key.
|
|
572
|
+
|
|
573
|
+
### What's Tracked
|
|
574
|
+
|
|
575
|
+
**User Context:**
|
|
576
|
+
- Username (from `USER`/`USERNAME`/`LOGNAME` environment variables + `whoami` fallback)
|
|
577
|
+
- Repository names (from MCP `roots/list` protocol request, comma-separated if multiple; fallback to `client_id` parsing; 5-min cache)
|
|
578
|
+
- MCP server identifier (`mcp_server: "Rosetta"`) and runtime package version (`mcp_server_version`)
|
|
579
|
+
- GeoIP enabled via `disable_geoip=False` in client initialization (MCP runs locally on user's machine, IP is user's actual location)
|
|
580
|
+
|
|
581
|
+
**Business Parameters** (usage patterns):
|
|
582
|
+
- Tool arguments such as `query`, `tags`, `repository_name`, `request_mode`, `document`, and `force`
|
|
583
|
+
|
|
584
|
+
**Excluded** (technical parameters):
|
|
585
|
+
- `limit`, `offset`, `page` - Pagination
|
|
586
|
+
- `compact_view` - View settings
|
|
587
|
+
- `model`, `temperature`, `max_tokens` - RAG tuning parameters
|
|
588
|
+
|
|
589
|
+
### Privacy & Control
|
|
590
|
+
|
|
591
|
+
- **Opt-out**: Analytics enabled by default with built-in key, easy to disable
|
|
592
|
+
- **Write-only**: Project API key can only send events, cannot read analytics data
|
|
593
|
+
- **Non-blocking**: Analytics never delays or breaks MCP tool responses
|
|
594
|
+
- **User control**: Set `POSTHOG_API_KEY=""` to disable tracking anytime
|
|
595
|
+
- **Custom tracking**: Use your own PostHog project by setting custom API key
|
|
596
|
+
|
|
597
|
+
## Requirements
|
|
598
|
+
|
|
599
|
+
- Python >= 3.10
|
|
600
|
+
- Rosetta Server running and accessible
|
|
601
|
+
- ragflow-sdk >= 0.24.0
|
|
602
|
+
- mcp >= 1.26.0
|
|
603
|
+
- posthog >= 7.0.0 (for built-in analytics)
|
|
604
|
+
|
|
605
|
+
## License
|
|
606
|
+
|
|
607
|
+
Apache-2.0 - see LICENSE file for details.
|
|
608
|
+
|
|
609
|
+
This package is built on [RAGFlow](https://github.com/infiniflow/ragflow) by InfiniFlow, which is licensed under the Apache-2.0 License. We gratefully acknowledge the RAGFlow project and its contributors.
|
|
610
|
+
|
|
611
|
+
## Links
|
|
612
|
+
|
|
613
|
+
- **RAGFlow**: https://github.com/infiniflow/ragflow
|
|
614
|
+
- **Model Context Protocol**: https://modelcontextprotocol.io/
|
|
615
|
+
- **FastMCP**: https://github.com/jlowin/fastmcp
|
|
616
|
+
|
|
617
|
+
## Support
|
|
618
|
+
|
|
619
|
+
For issues and questions, visit the package page: https://pypi.org/project/rosetta-mcp/
|