Skip to main content
Glama

Base Plugin for ChatGPT

A generic local MCP plugin base for ChatGPT.

The internal plugin identity is intentionally fixed as Plugin. The repository, project folder, and product built from this base may use any external name. No source-file or operator-script renaming is required.

Included

  • MCP server over stdio with one main channel

  • two example tools:

    • plugin_status

    • plugin_echo

  • guided local connection setup

  • saved connection reuse

  • Windows DPAPI protection for the Runtime API key

  • explicit status, stop, refresh, and reset commands

  • separated generated and persistent runtime storage

  • bounded conditional-read cache for safe read-only tools

  • automated tests

  • MIT License

The base does not include filesystem, shell, process, desktop, browser, Git, network, hardware, or other broad control tools. Add only the capabilities required by the plugin being developed.

Related MCP server: bridge-mcp

Quick start

Install dependencies and run the tests:

npm install
npm test

Configure the local connection:

Setup-Plugin.cmd

The setup wizard asks for:

  1. Tunnel ID

  2. Runtime API key

  3. Organization ID

  4. Local health port

The Runtime API key is entered using hidden input and stored locally with Windows DPAPI. The selected health port is validated before it is saved.

The setup process generates the real mcp-conf.yaml automatically. Manual YAML editing is not required for normal use.

Start the plugin:

Start-Plugin.cmd

Check status:

Status-Plugin.cmd

Stop the plugin:

Stop-Plugin.cmd

Generic identity

The base uses the following stable internal names:

Plugin.mjs
Plugin-runtime/
scripts/PluginSettings.ps1
Setup-Plugin.cmd/.ps1
Start-Plugin.cmd/.ps1
Status-Plugin.cmd/.ps1
Stop-Plugin.cmd/.ps1
Refresh-Plugin.cmd/.ps1
Clear-PluginSettings.cmd/.ps1

Plugin.mjs reports the MCP server name as Plugin.

Keeping these names stable makes the base simple to use and makes future updates easier to compare and integrate.

Connection lifecycle

Setup

Setup-Plugin.cmd creates the local connection settings and generates mcp-conf.yaml.

Saved values are preserved until they are explicitly cleared. If only part of the configuration is missing, the setup flow reuses the remaining valid values.

Start

Start-Plugin.cmd:

  • loads the saved Tunnel ID, Organization ID, and health port;

  • decrypts the locally stored Runtime API key;

  • regenerates the local profile when needed;

  • runs tunnel-client configuration checks;

  • starts the tunnel.

When the configuration is complete, startup proceeds without asking setup questions.

Status

Status-Plugin.cmd reports local configuration, process state, liveness/readiness, and local health/UI endpoints.

Stop

Stop-Plugin.cmd stops the locally tracked plugin and tunnel processes.

Refresh

Refresh-Plugin.cmd performs an offline refresh of generated local state.

It clears:

  • runtime/

  • logs/

It preserves:

  • Plugin-runtime/

  • local-secrets/

  • DPAPI-protected credentials

  • connection settings

  • mcp-conf.yaml

  • source files

  • dependencies

Stop the plugin before running a refresh.

Clear settings

Clear-PluginSettings.cmd provides explicit reset modes:

  • Runtime API key only

  • connection settings only

  • all local connection/runtime state

Normal use never clears settings automatically.

Runtime storage

Generated state and plugin-owned persistent assets are separated intentionally.

Generated state

runtime/
logs/

These directories may be cleared during refresh.

Persistent plugin assets

Plugin-runtime/

Use this directory for assets that must survive refresh, such as:

  • browser drivers

  • helper binaries

  • local models

  • persistent caches

Do not place required persistent assets under runtime/.

MCP examples

plugin_status

plugin_status returns basic runtime identity and demonstrates the conditional-read contract.

Optional request fields:

  • known_digest

  • cache_max_age_ms

The response includes SHA-256 digest metadata and can suppress an unchanged payload. A short positive TTL may also skip a safe repeated read when matching digest metadata is still fresh.

plugin_echo

plugin_echo is a minimal example of:

  • an input schema

  • a tool handler

  • a text response

Replace or remove the example tools as the real plugin is developed.

Context efficiency

lib/conditional-read-cache.mjs provides a bounded metadata-only conditional-read cache for safe read-only operations.

It can:

  • compute SHA-256 digests for returned text;

  • suppress unchanged response bodies;

  • optionally skip a safe read for a short explicit TTL;

  • distinguish fresh revalidation from cache short-circuiting;

  • retain only digest, size, and timestamp metadata;

  • bound metadata entries to avoid unbounded memory growth.

Do not use this cache for write or action tools.

Detailed design, safety boundaries, cache-key guidance, tests, metrics, and schema-refresh qualification are documented in:

docs/CONTEXT-EFFICIENCY.md

Project structure

Plugin.mjs
lib/
  conditional-read-cache.mjs
scripts/
  PluginSettings.ps1
docs/
  CONTEXT-EFFICIENCY.md
tests/
Plugin-runtime/
runtime/
mcp-conf.example.yaml
package.json

mcp-conf.example.yaml is a reference profile. Setup-Plugin.cmd generates the active ignored mcp-conf.yaml.

Development

A practical development flow is:

  1. Copy or fork the repository.

  2. Keep the generic internal Plugin identity.

  3. Add only the MCP tools required by the project.

  4. Use conditional caching only for explicitly safe read-only tools.

  5. Run npm test.

  6. Configure the local tunnel with Setup-Plugin.cmd.

  7. Start the runtime and perform live qualification.

  8. Preserve an existing ChatGPT tunnel binding when adapting a connected plugin unless changing the binding is intentional.

Security

Do not commit:

  • Runtime API keys

  • mcp-conf.yaml

  • local-secrets/

  • generated runtime state

  • browser/login profiles

  • runtime logs

.gitignore excludes these local artifacts. Contents of Plugin-runtime/ are also ignored by default except for .gitkeep.

Requirements

  • Windows for the supplied DPAPI/operator workflow

  • Node.js 20 or newer

  • supported tunnel-client.exe in the repository root for tunnel operation

License

MIT

Available Tools

2 tools
plugin_echoD

Minimal example tool. Replace or remove this when implementing the real plugin.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes

TDQS

D1.8/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden, and it discloses nothing: not that the input is returned verbatim, not the return shape, not any side effects or limits. The one behavioral trait it does convey (this is a throwaway placeholder) is meta rather than functional.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, so nothing is bloated, but neither sentence earns its place: both are about the tool being a placeholder rather than telling the agent anything actionable. Brevity here reflects under-specification, not discipline.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter, no-annotation, no-output-schema tool, the description should at minimum state the input-to-output behavior. It leaves the core contract completely unstated, so an agent would have to guess what calling it does.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage for the single 'text' parameter, and the description adds nothing about it — no length constraint context, no formatting, no expected content. The tool name 'echo' faintly implies the value is returned unchanged, but that is inference, not documented semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies the tool as a 'minimal example tool' placeholder but never states what it actually does. An agent cannot tell from the text that it echoes the provided text back, nor how it differs from the sibling plugin_status. This is closer to a meta-note about the tool's lifecycle than a purpose statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The only usage signal is an implicit 'do not use this in production' via 'Replace or remove this when implementing the real plugin.' There is no statement of when to call it versus plugin_status, and no exclusions or conditions of use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

plugin_statusB

Return basic runtime identity. Supports SHA-256 conditional reads so unchanged payloads can be suppressed, and optional short TTL reuse can skip safe read execution.

ParametersJSON Schema
NameRequiredDescriptionDefault
known_digestNo
cache_max_age_msNo

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose real behavioral traits: SHA-256 conditional reads can suppress unchanged payloads and short TTL reuse can skip safe read execution. That is useful caching/execution context, but it omits permissions, whether the read has side effects, and what the payload actually contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the core purpose front-loaded before the caching mechanics. Nothing is padded, though the second sentence is jargon-dense and would benefit from slightly plainer framing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and no annotations mean the description should explain return content and safety profile; it covers caching behavior but not what 'runtime identity' contains or whether the call is purely safe. Adequate but with clear gaps for a two-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does so conceptually: 'SHA-256 conditional reads' maps to the known_digest parameter and 'short TTL reuse' maps to cache_max_age_ms. But it never names the parameters or specifies formats/bounds, so the mapping stays implicit.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource combination ('Return basic runtime identity') that tells the agent this is a read of runtime metadata. However, it offers no differentiation from the sibling plugin_echo, and 'basic runtime identity' remains somewhat abstract about what is actually returned.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains mechanisms (conditional reads, TTL reuse) but never states when to call this tool versus plugin_echo or any other alternative. There is no explicit when-to-use or when-not-to-use guidance, leaving the agent to infer usage entirely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.0
    • First observedplugin_echo
    • First observedplugin_status

TDQS

C2.6/5.0

Scored across 2 tools

Disambiguation4/5

plugin_status and plugin_echo have distinct roles—one returns runtime identity, the other is an example echo—so they are not easily confused. However, plugin_echo's purpose is intentionally under-specified as a placeholder, leaving slight ambiguity about its intended use.

Naming Consistency5/5

Both tools follow the same plugin_ prefix with snake_case noun suffixes (status, echo), giving a fully predictable naming pattern. There is no mixing of conventions or verb styles.

Tool Count3/5

Two tools is thin for any server, and one is explicitly a placeholder to be replaced, so the set feels under-scoped. This is borderline rather than extreme, since a plugin scaffold might legitimately start small.

Completeness2/5

The surface has no real domain operations—just runtime identity and a placeholder echo—so it cannot support actual plugin workflows. Significant gaps remain before this could serve as a functional MCP server.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers