Skip to content

Conversation

@Zaimwa9
Copy link
Contributor

@Zaimwa9 Zaimwa9 commented Jan 8, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to #6488

  • Added x-gram extensions to tag and describe API endpoints for MCP OpenAPI specs
  • Tagged endpoints with "mcp" tag to include them in the filtered MCP schema
  • Created MCPSchemaGenerator that filters to only MCP-tagged operations
  • Exposed /api/v1/mcp-schema/ endpoint serving the filtered OpenAPI spec
  • Security scheme uses Organisation API Key (Api-Key format)
  • Added makefile command generate-mcp-spec to generate it locally
  • Added CI step to push the MCP specs directly to gram (3 new secrets GRAM_PROJECT, GRAM_ORG, GRAM_API_KEY

Tag a new endpoint

  1. Add tags=["mcp"] to the @extend_schema decorator
  2. Add x-gram extension with name and description:
  @extend_schema(
      tags=["mcp"],
      extensions={
          "x-gram": {
              "name": "list_organisation_projects",
              "description": "Retrieves all the project of a given organisation",
          },
      },
  )
  3. Go to gram and add the tool to the toolsets (MCP)

How did you test this code?

  • Compared current schema generated with existing tools in gram
  • Fully configured Gram on those specs => running with them as we speak
  • Added tests

@Zaimwa9 Zaimwa9 requested review from a team as code owners January 8, 2026 16:54
@Zaimwa9 Zaimwa9 requested review from khvn26 and removed request for a team January 8, 2026 16:54
@vercel
Copy link

vercel bot commented Jan 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Review Updated (UTC)
docs Ignored Ignored Preview Jan 21, 2026 4:11pm
flagsmith-frontend-preview Ignored Ignored Preview Jan 21, 2026 4:11pm
flagsmith-frontend-staging Ignored Ignored Preview Jan 21, 2026 4:11pm

Request Review

@Zaimwa9 Zaimwa9 removed the request for review from khvn26 January 8, 2026 16:54
@github-actions github-actions bot added the api Issue related to the REST API label Jan 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-6499 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-6499 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-6499 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-6499 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-6499 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6499 Finished ✅ Results

…m:Flagsmith/flagsmith into feat/synchronize-openapi-schema-with-gram
@Zaimwa9
Copy link
Contributor Author

Zaimwa9 commented Jan 9, 2026

Adding a push to gram CI step - testing it with platform-pull-request

Zaimwa9 and others added 3 commits January 9, 2026 10:59
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@Zaimwa9 Zaimwa9 changed the title [WIP - not draft] feat: synchronize-openapi-schema-with-gram feat: synchronize-openapi-schema-with-gram Jan 16, 2026
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 21, 2026
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 21, 2026
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 21, 2026
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 21, 2026
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 21, 2026
@Zaimwa9 Zaimwa9 requested review from emyller and khvn26 January 21, 2026 15:53
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Jan 21, 2026
Copy link
Contributor

@emyller emyller left a comment

Choose a reason for hiding this comment

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

Approved for the sake of unblocking.
There is one followup [potentially] necessary: #6573

@emyller emyller merged commit 31d64ad into main Jan 21, 2026
33 checks passed
@emyller emyller deleted the feat/synchronize-openapi-schema-with-gram branch January 21, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants