Kingpin governed fixture reader

io.github.putmanmodel由 GitHub 账号 putmanmodel 发布v0.1.0更新于 Nov 20, 2026

Local MCP fixture read and synthetic refusal example. Source-available, noncommercial preview.

发布方自己的服务:fixture.email — Email Testing for Agents

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

一个 Node.js 开发者预览版服务器,提供一个工具,用于复现被允许的固定文件读取和合成的授权拒绝。

可以做什么
  • 以空参数调用 read_governed_fixture,读取固定 fixture 文件并以 Base64 返回其字节。
  • 在 lease-required 配置下执行同一调用,得到带原因码且不含字节的明确拒绝。
  • 查看带 read、refused、adapter_error、host_error 等状态和请求 ID 的结构化结果。
  • 运行测试与演示,启动两个本地 stdio 服务器并对比两种结果。
适用场景
适合用于复现或验证文档中描述的治理执行示例,或研究宿主侧闸门如何在派发前允许或拒绝单次工具调用。它是演示用的固定样例,不是通用文件读取器。
运行要求
在 Apple 芯片的 macOS 上作为本地进程运行,需要 Node 24.14.1、npm 11.11.0 和 Git;克隆仓库并用 npm ci 安装锁定依赖。配置在进程启动时通过环境变量 KINGPIN_PROFILE 选择(normal 或 lease-required)。其他平台、版本和远程传输未经验证。
安装前请注意
该工具只读取固定 fixture;参数无法提供路径、身份或租约,路径由宿主掌控。两种配置均为合成信号,状态仅存活于单个进程,不包含实时撤销、持久审查或回滚。许可证为非商业性:商业、机构或生产用途需另行获得书面许可。请勿在报告中粘贴凭据或私人数据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Kingpin governed fixture reader,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Kingpin governed fixture reader

Kingpin is a source-available, noncommercial Node.js MCP developer preview. Reproduce two behaviors with read_governed_fixture and {}: a permitted read of fixtures/message.txt under normal, and an explicit refusal without bytes under lease-required. The host owns the path and evaluates each call before entering the reader; tool arguments cannot supply a path, identity, profile or lease.

Run locally

Use Node 24.14.1 and npm 11.11.0, with Git available. The reference environment is macOS on Apple silicon. Other operating systems, architectures, Node/npm versions and remote transports are unverified. The command-line demo needs no Copilot account. Review Rights and feedback before evaluating.

Clone the public repository into a new directory, then record the exact revision and tool versions for your report:

git clone https://github.com/putmanmodel/kingpin-governed-mcp.git
cd kingpin-governed-mcp
git rev-parse HEAD
node --version
npm --version

Keep the full commit SHA printed by git rev-parse HEAD; 0.1.0 alone does not identify the tested checkout. If reproducing someone else's report, run git checkout --detach <reported-commit-sha> with their full SHA before installation, then record git rev-parse HEAD again. Keep baseline source and dependency files unchanged and report any deviations.

Check that the versions match the qualified environment above. From this repository root, install locked dependencies (including the SDK client used by tests and demo), then run:

npm ci --include=dev --registry=https://registry.npmjs.org --ignore-scripts
npm test
npm run demo

The demo uses the SDK client to start two local stdio servers, asserts that each lists exactly one tool, and calls it. Expect 40 passing tests and two JSON results with different request IDs.

StatusWhat happened
readEnforcement permitted dispatch and the reader returned Base64. The expected value S2luZ3BpbiBmaXh0dXJlIHYxCg== decodes to “Kingpin fixture v1” followed by a newline.
refusedThe authority denied the call. The lease-required example returns gate_2_requires_valid_lease and omits bytes.
adapter_errorDispatch was allowed but the adapter failed, for example because the fixture was missing.
host_errorThe host failed to complete authentication, authority evaluation or enforcement.

The expected lease-required refusal sets MCP isError: true; that is a successful reproduction of authorization refusal, even if an editor labels the tool call failed. Confirm status: refused, reason: gate_2_requires_valid_lease and no bytes field. The normal profile must return status: read, the expected bytes and isError: false.

Both npm test and npm run demo should exit successfully. An installation error, failing test, nonzero demo exit, missing tool result, adapter_error or host_error is a setup or execution failure, not the expected refusal. The last two statuses also set MCP isError. Inspect the structured result and its request ID; server diagnostics go to stderr. A transport or protocol failure can occur before any tool result exists.

Report a successful, partial or failed reproduction.

Optional AI-assisted quick start

Open the repository in your coding assistant and paste this prompt:

Read README.md and package.json. Guide me through the documented installation and
configuration using the locked dependencies. Leave the implementation, dependency
files, versions and license terms unchanged. Ask me before editing configuration
or granting workspace or server trust.

Help me run the tests and demo. Check that read_governed_fixture with {} returns
fixture bytes under normal and refuses without bytes under lease-required.
Report what you actually observed, including failures and any steps left unverified.

Connect VS Code and Copilot

The CLI baseline above is the first evaluation path. Prior VS Code/Copilot verification was on macOS; other client versions and harness configurations are unverified until reproduced. Cursor, Claude Code and Claude Desktop have not been verified for this preview.

Current VS Code integration documentation distinguishes these configuration paths (checked November 19, 2026):

  • Native Copilot: workspace .mcp.json, using mcpServers, or user $COPILOT_HOME/mcp-config.json (~/.copilot/mcp-config.json by default). The supplied root .mcp.json selects normal and launches node ./server.mjs; open this repository as the workspace so the relative path resolves.
  • Deprecated Local harness: .vscode/mcp.json, using servers, or an editor user-profile mcp.json. These are not native Copilot configuration files. Editor forwarding is conditional; do not treat this as an interchangeable fallback. See the Local compatibility guidance.
  1. Install dependencies as above. Enable Copilot Chat, sign in, and open the repository itself with File → Open Folder. Inspect the launcher and server before granting workspace or server trust.
  2. For native Copilot, open Chat: Open Customizations → MCP Servers and inspect the workspace server. Use the supplied root launcher; if it is missing, check the active harness, workspace, organization settings and server logs using the current connection instructions. Record the VS Code and Copilot versions and configuration path in your report.
  3. Only if deliberately using the deprecated Local harness, use MCP: List Servers. Its workspace configuration below belongs in .vscode/mcp.json and has not been separately exercised in this preview. Keep a single active kingpin entry; do not configure both paths to launch duplicate servers.
{
  "servers": {
    "kingpin": {
      "type": "stdio",
      "command": "node",
      "args": ["${workspaceFolder}/server.mjs"],
      "env": { "KINGPIN_PROFILE": "normal" }
    }
  }
}
  1. Start kingpin using the controls available in your client and check the server output for discovery. In Copilot Chat select a session with tools enabled and make read_governed_fixture available; controls vary by harness and version. Ask “Call read_governed_fixture with {} and show the tool result.” Approve the call if prompted and expand the result to inspect the bytes.
  2. In the active launcher, change only KINGPIN_PROFILE to lease-required, save, and restart kingpin or run Developer: Reload Window and start it again. Repeat the call. A failed tool invocation with the structured refusal above is the expected result.
  3. Restore normal in the same launcher, save, restart, and repeat the read. Profiles select synthetic conditions at process startup. The switch starts a fresh demonstration. It implements neither live revocation nor persistent human review.

Troubleshooting

  • Unable to list tools in VS Code? If Kingpin is running but Copilot displays “Unable to list tools,” open Copilot Chat, select an available model, and send a message to initialize the session. Then reopen the MCP tools list. This resolved the initial discovery problem during verification on macOS.
  • No tool — Check folder and server trust, server output, active configuration, tool picker, and organization MCP settings. Restart after editing the configuration.
  • Node cannot launch — Compare the editor’s environment with the shell where node -v works. Replace command in your local launcher with the full Node executable path printed by node -p process.execPath.
  • Missing module — Run npm ci in the repository root with development dependencies enabled. The supplied launcher resolves ./server.mjs from the launch working directory. For another working directory use the full server path in the active configuration. The ${workspaceFolder} example above is specific to the Local harness.
  • Invalid arguments or connection error — Send exactly {}. Keep server stdout reserved for MCP. Run npm run demo from a terminal to check the SDK path separately from editor discovery.
  • Unexpected refusal or adapter error — Check which launcher started the process, restart after selecting the intended profile, and check the fixture exists as a regular single-link file within the size limit.

Scope and adaptation

The host authenticates an ephemeral service bearer and uses the public Kingpin runtime to evaluate the operation. Clients of one process share the configured service identity. The two profiles generate synthetic governance signals. They establish no end-user identity, live behavioral provenance or external lease issuance. State lasts for one process. The integration demonstrates no durable review, rollback, exactly-once delivery or production certification.

For a local experiment after reproducing the baseline, use a disposable copy and replace only the fixed fixture with non-sensitive bytes (up to 4096). Keep directories and files trusted and stable during reads. The reader checks file type, links, identity and size. Concurrent edits have no snapshot guarantee. Re-run the demo to compare the returned bytes with the replacement, then restore the fixture before baseline testing. Another operation needs its own request definition, enforcement boundary, adapter and tests. This tool governs only its own dispatch.

Name and inspiration

The name Kingpin comes from Steven Strogatz’s discussion of highly connected “kingpin proteins” in Sync: The Emerging Science of Spontaneous Order (2003, Chapter 9). The influence of individual nodes within a complex network helped shape Stephen A. Putman’s thinking about system governance.

Kingpin’s software architecture and agent-governance implementation were developed independently. This acknowledgment does not imply affiliation with or endorsement by Strogatz.

Rights and feedback

The Kingpin Community License v0.1 from Stephen A. Putman permits personal experimentation, coursework, independent noncommercial research and noncommercial forks of the covered integration. You may rename a fork and distribute source or binaries with the license, original attribution and a summary of changes. Commercial use, defined institutional operations and commissioned deliverables require separate written permission. An authorized commercial evaluation may be free. Production and OEM rights require separate agreements. The separately installed runtime retains CC BY-NC 4.0. See component notices.

For commercial or organizational evaluation inquiries, use the PUTMAN Logic contact form as a private contact route. Describe the intended use at a nonconfidential level. Submitting an inquiry is not an automatic licensing process and does not grant permission; separate written permission is required where the applicable licenses specify it. This route does not change either component's license. Continue to use GitHub Issues for reproduction reports, bugs and technical feedback.

Successful reproductions are welcome alongside partial attempts and failures. Open an independent reproduction report with your commit SHA, environment, commands, test summary, both profile results, first obstacle and any assistance required. Include only sanitized diagnostic excerpts; omit credentials and private data. If you could not reach a step, say “not run” rather than guessing its result.

Stars, forks, sharing and technical feedback are welcome and voluntary.

来源:README.md,提交 d825ff7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Nov 20, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。

其他 Fixture 集成