Skip to content

feat: add read-only plugins commands (list/get/stats)#18

Merged
gabe-l-hart merged 5 commits intocontextforge-org:mainfrom
MatthewGrigsby:feature/plugin-support
Feb 11, 2026
Merged

feat: add read-only plugins commands (list/get/stats)#18
gabe-l-hart merged 5 commits intocontextforge-org:mainfrom
MatthewGrigsby:feature/plugin-support

Conversation

@MatthewGrigsby
Copy link
Contributor

Addresses #8

Adds a new cforge plugins command group (list/get/stats) backed by the gateway admin plugin endpoints (/admin/plugins).

Notes

  • These are currently read-only because mcp-context-forge loads plugins from YAML at app startup and does not yet expose write endpoints for plugin CRUD/management.
  • Commands require MCPGATEWAY_ADMIN_API_ENABLED=true on the gateway and a token with admin.plugins permission.

Testing

  • Unit tests added for cforge plugins (mocked HTTP).
  • E2E smoke tested against a locally running mcp-context-forge instance with a DenyListPlugin configured.

Introduce `cforge plugins` command group (list, get, stats) backed by
the gateway's /admin/plugins endpoints.  Includes full test coverage
and README documentation.

Signed-off-by: Matthew Grigsby <38010437+MatthewGrigsby@users.noreply.github.com>
Signed-off-by: Matthew Grigsby <38010437+MatthewGrigsby@users.noreply.github.com>
Signed-off-by: Matthew Grigsby <38010437+MatthewGrigsby@users.noreply.github.com>
Copy link
Collaborator

@gabe-l-hart gabe-l-hart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks for adding it! A couple of small comments and a unit test request, but the functionality looks good.

- Use case-insensitive PluginMode enum for --mode
- Assume /admin/plugins response shape ({"plugins": [...]})
- Update tests to use invoke_typer_command for accurate option defaults/coverage

Signed-off-by: Matthew Grigsby <38010437+MatthewGrigsby@users.noreply.github.com>
Signed-off-by: Matthew Grigsby <38010437+MatthewGrigsby@users.noreply.github.com>
Copy link
Collaborator

@gabe-l-hart gabe-l-hart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks Matt!

)


class _CaseInsensitiveEnum(str, Enum):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! I think we might want to hoist this to common.py and make it a standard practice for all places that we use an enum for explicit choices. That can happen later though.

cforge plugins stats
```

Plugin commands call `/admin/plugins` endpoints and require:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for adding this!

@gabe-l-hart gabe-l-hart merged commit 7200468 into contextforge-org:main Feb 11, 2026
4 checks passed
@MatthewGrigsby MatthewGrigsby deleted the feature/plugin-support branch February 11, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants