Skip to content

Conversation

@JakeSCahill
Copy link
Contributor

@JakeSCahill JakeSCahill commented Dec 10, 2025

This PR introduces an MCP-to-MCP proxy that routes Redpanda documentation search requests through Kapa’s Hosted MCP server.

  • Leverages Kapa’s infrastructure for retrieval, scaling, and reliability
  • Enables visibility into search usage and performance via Kapa’s analytics
  • Keeps a single Redpanda-owned MCP endpoint for clients

The Redpanda MCP server remains the single integration point. Native Redpanda tools can be added alongside the proxied search tool without breaking clients.

Previously, deprecation warnings were only in server logs and HTTP headers,
which LLMs cannot see. This change adds the deprecation notice directly to
all tool response content so that LLMs are informed about the endpoint
shutdown in February 2026 and the migration path to https://redpanda.mcp.kapa.ai

Also removes redundant HTTP deprecation headers (Deprecation, Sunset, Link)
since they don't provide value for LLM clients. Server-side logging is
retained for monitoring purposes.
@JakeSCahill JakeSCahill requested a review from a team as a code owner December 10, 2025 14:18
@netlify
Copy link

netlify bot commented Dec 10, 2025

Deploy Preview for redpanda-documentation ready!

Name Link
🔨 Latest commit 632c695
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-documentation/deploys/69417a8ebb4dce00081b7ffb
😎 Deploy Preview https://deploy-preview-153--redpanda-documentation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 47 (🔴 down 4 from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (🟢 up 25 from production)
SEO: 83 (🔴 down 9 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@JakeSCahill JakeSCahill changed the title Fix deprecation logs Proxy to Kapa MCP Dec 16, 2025
const API_BASE = 'https://api.kapa.ai'
// Fetch Netlify env vars
// Hardcoded upstream
const KAPA_MCP_SERVER_URL = 'https://redpanda.mcp.kapa.ai'
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be 'https://docs.redpanda.com/mcp' or that's exactly what proxies that url?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the proxy

Comment on lines +38 to +40
const CONNECT_TIMEOUT_MS = 8_000
const CALL_TIMEOUT_MS = 22_000
const MAX_QUERY_CHARS = 2_000
Copy link
Contributor

Choose a reason for hiding this comment

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

those values look weird with _ . is this an api field?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just for readability. JS supports this syntax instead of 22000

Copy link
Contributor

Choose a reason for hiding this comment

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

TIL !

)
} catch (retryErr) {
const retryMsg =
retryErr instanceof Error ? retryErr.message : String(retryErr)
Copy link
Contributor

Choose a reason for hiding this comment

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

should we log this error? where would logs even go?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

to the Netlify logs. we could log it yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added logs

Comment on lines +273 to +277
windowMs: 15 * 60 * 1000, // 15 minutes
limit: 60, // limit each key to 60 requests per windowMs (tune as needed)
keyGenerator: computeLimiterKey, // use our custom key generator
standardHeaders: true, // send RateLimit-* headers if supported
legacyHeaders: true, // also send X-RateLimit-* headers
Copy link
Contributor

Choose a reason for hiding this comment

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

have you checked if we need to tweak any of these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these are our own limits. No need to change them

const method = c.req.method
if (method === 'GET') {
// Let SSE stream open/reconnect without limiter interference
return next()
Copy link
Contributor

Choose a reason for hiding this comment

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

GETs are not rate limited. Is this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They're just for keeping the SSE stream going. Allows heartbeats that we don't want to limit.

Comment on lines +330 to +338
if (
request.method !== 'POST' &&
request.method !== 'GET' &&
request.method !== 'DELETE'
) {
return new Response('Method not allowed', {
status: 405,
headers: { Allow: 'POST, GET, DELETE' },
})
Copy link
Contributor

Choose a reason for hiding this comment

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

i dont understand why we allow DELETE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used for cleaning up the session.

@JakeSCahill JakeSCahill merged commit f6f17c8 into main Dec 16, 2025
4 checks passed
@JakeSCahill JakeSCahill deleted the deprecation-notices branch December 16, 2025 15:34
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.

3 participants