@modootoday/pmcp 0.10.0 → 0.11.0

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.
package/README.md CHANGED
@@ -114,6 +114,147 @@ overwritten. `doctor` calls no model: it reads `claude mcp list`,
114
114
  `codex mcp list`, `gemini skills list`, `gemini mcp list` and
115
115
  `grok inspect --json`, and skips a tool that is not installed.
116
116
 
117
+ ## Unified project MCP configuration
118
+
119
+ Antigravity receives a native project plugin at .agents/plugins/pmcp-mcp with
120
+ plugin.json and mcp_config.json. Projection removes only lock-owned entries
121
+ from the earlier .agents/mcp_config.json artifact and backs up both layouts.
122
+ Antigravity's global mcp list does not enumerate project plugin servers;
123
+ validate the generated plugin with agy plugin validate.
124
+ Its HTTP entries use serverUrl, accepted by the installed plugin validator.
125
+
126
+ Declare each MCP server once in pmcp.toml. The projector writes the native
127
+ project files for all selected runtimes. A server can narrow its targets:
128
+
129
+ ```toml
130
+ [mcp.docs]
131
+ url = "https://example.com/mcp"
132
+
133
+ [mcp.private-api]
134
+ url = "https://example.com/private-mcp"
135
+ targets = ["claude", "codex", "gemini", "grok"]
136
+ bearer_token_env_var = "PRIVATE_MCP_TOKEN"
137
+ header_env = { "X-Workspace" = "PRIVATE_MCP_WORKSPACE" }
138
+
139
+ [mcp.local-service]
140
+ command = "my-mcp-server"
141
+ env_vars = ["MY_SERVICE_KEY"]
142
+ cwd = "${PROJECT_ROOT}"
143
+
144
+ [mcp.local-service.native.codex]
145
+ startup_timeout_sec = 30
146
+
147
+ [mcp.local-service.native.gemini]
148
+ timeout = 120000
149
+ ```
150
+
151
+ url means Streamable HTTP; Gemini receives httpUrl. Legacy SSE is not imported
152
+ as HTTP. headers contains literal nonsecret headers, header_env maps header
153
+ names to environment variable names, and bearer_token_env_var references a
154
+ token without writing its value. Each runtime retains its own OAuth session.
155
+ Antigravity HTTP header projection is not qualified and is rejected; explicitly
156
+ limit those servers to supported targets. tools maps to Gemini includeTools and
157
+ Codex enabled_tools; it is not a cross-runtime security boundary. Native timeout
158
+ options retain each runtime's documented names and units. Unknown fields fail.
159
+
160
+ Import explicitly selected native configurations. Preview is the default:
161
+
162
+ ```sh
163
+ pmcp project import-mcp --source claude:/path/to/native.json
164
+ pmcp project import-mcp --source codex:/path/to/config.toml --name docs --write
165
+ pmcp project
166
+ pmcp project --check
167
+ ```
168
+
169
+ Repeat source and name to select multiple inputs. Conflicting aliases, missing
170
+ requested names, unsupported authentication fields and credential-bearing URLs
171
+ block import. Source contents and credential values are not printed. Sources
172
+ are never rewritten. Review plugin-provided servers separately to avoid
173
+ duplicating a server the runtime already loads.
174
+
175
+ Literal stdio environment values remain in their source file. The importer
176
+ stores an env_from reference containing file and an RFC 6901 JSON pointer:
177
+
178
+ ```toml
179
+ [mcp.local-service.env_from.MY_SERVICE_KEY]
180
+ file = "~/.config/my-client/settings.json"
181
+ pointer = "/mcpServers/local-service/env/MY_SERVICE_KEY"
182
+ ```
183
+
184
+ The generated entry invokes pmcp project exec-mcp for that declared server.
185
+ It reads only the referenced values and passes them to the child process, using
186
+ inherited stdio. JSON and TOML sources are supported. The source must remain
187
+ available; rotating its value takes effect on the next server launch. A project
188
+ installed CLI is referenced relative to the project; otherwise pmcp must be on
189
+ PATH. Configurations using env_from require this release on every runtime host.
190
+
191
+ Writes retain private backups in ~/.cache/pmcp/project-backups, outside the
192
+ project. Receipts record file hashes and absent paths. A conflicting unmanaged
193
+ native alias is refused before projection writes. The managed TOML block and
194
+ JSON keys preserve unrelated settings. Inspect the reported backup before
195
+ restoring any file that another process may have edited.
196
+
197
+ Configuration references: [Codex](https://developers.openai.com/codex/config-reference/),
198
+ [Claude Code](https://code.claude.com/docs/en/mcp),
199
+ [Gemini CLI](https://geminicli.com/docs/tools/mcp-server/),
200
+ and [Grok Build](https://docs.x.ai/build/features/mcp-servers).
201
+
202
+ ## Operator shell guards
203
+
204
+ Declare a project-owned guard explicitly to project it into Codex, Gemini or
205
+ Antigravity's native hooks. Without a declaration, pmcp generates no hooks.
206
+
207
+ ```toml
208
+ [[hooks.shell]]
209
+ name = "shell-command-policy"
210
+ command = ["node", ".agents/guards/shell-command-policy.mjs"]
211
+ targets = ["codex", "gemini", "antigravity"]
212
+ timeout_ms = 15000
213
+ ```
214
+
215
+ The guard script must exist under .agents/guards/ and cannot resolve outside
216
+ that directory. It receives one JSON object on stdin containing runtime,
217
+ event=before_shell, command and cwd. It returns a JSON object with
218
+ decision=allow or decision=deny and an optional reason. Malformed responses,
219
+ nonzero exits and timeouts deny the shell call. The guard receives PATH and
220
+ LANG rather than the native CLI's credential environment. Non-shell tools are
221
+ outside this contract.
222
+
223
+ Run pmcp project to write lock-owned adapter and policy artifacts under
224
+ .agents/pmcp-hooks/, plus the native entries in .codex/hooks.json,
225
+ .gemini/settings.json and .agents/hooks.json. Peer entries are retained.
226
+ Edited owned hook entries refuse projection for review. Removing a declaration
227
+ removes its generated entries and artifacts while preserving peer settings.
228
+ Writes retain private backups; pmcp project --check only reports drift.
229
+
230
+ Guard, policy and adapter fingerprints bind the generated command. Changing
231
+ guard code requires reprojection and native Codex hook review. Generated files
232
+ contain no trust bypass. Grok can load Claude project hooks, so this first scope
233
+ does not generate a second Grok guard. Hooks do not force pmcp catalog use,
234
+ inject reminders or replace the runtime's execution sandbox.
235
+
236
+ ## Native memory metadata
237
+
238
+ ```sh
239
+ pmcp doctor --memory --json
240
+ pmcp doctor --memory --tool codex
241
+ ```
242
+
243
+ This explicit operation reports selected runtimes' native memory configuration
244
+ and path existence. It reads no memory body, index or transcript, writes no
245
+ configuration, connects to no MCP server and makes no provider request.
246
+ Ordinary doctor output is unchanged.
247
+
248
+ The report distinguishes enabled, disabled, unknown and unsupported. Path
249
+ existence does not establish activation. Where native metadata cannot identify
250
+ a project-specific location, pathScope=base reports only the storage parent;
251
+ the project identifier is not guessed. Supported native home overrides are
252
+ respected. Codex uses its native features listing. Claude and Grok report
253
+ explicit user settings, with active session overrides and unverified project
254
+ trust left unknown. Gemini context filenames and the global GEMINI.md file
255
+ are separate from unexposed memory-tool activation. Antigravity trajectories
256
+ are not reported as a memory store. pmcp does not synchronize or inject memory.
257
+
117
258
  ## Package skills
118
259
 
119
260
  Skills are discovered by filename, including `skills/`, `.agents/skills/`,