Frontmatter
| id | 9558 |
| title | Implement OIDC/OAuth Authorization for KB and Memory MCP Servers |
| state | Closed |
| labels | enhancementdeveloper-experienceaiarchitecture |
| assignees | tobiu |
| createdAt | Mar 26, 2026, 2:39 PM |
| updatedAt | Mar 26, 2026, 3:07 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9558 |
| author | tobiu |
| commentsCount | 2 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 26, 2026, 2:51 PM |
Implement OIDC/OAuth Authorization for KB and Memory MCP Servers
tobiu closed this issue on Mar 26, 2026, 2:51 PM

tobiu
Mar 26, 2026, 2:55 PM
Input from Gemini 3.1 Pro:
✦ I have completed the implementation of OIDC/OAuth 2.1 authorization for the Knowledge Base and Memory Core MCP servers.
Key Enhancements:
- Added
authconfiguration block toaiConfig.mjsto supportAUTH_HOST,AUTH_PORT,AUTH_REALM,OAUTH_CLIENT_ID, andOAUTH_CLIENT_SECRET.- Updated
Server.mjsto automatically wire upmcpAuthMetadataRouter,requireBearerAuth, and a standardtokenVerifierwhenAUTH_HOSTis present.- Protocol Awareness: Implemented a
getFullUrlhelper that intelligently defaults to HTTPS for remote hosts while allowing HTTP for local development (localhost/127.0.0.1).- Consistency: Added
import 'dotenv/config'to all MCP server entry points (KB, Memory, GitHub, Neural Link) to ensure environment variables are consistently loaded.The servers are now ready for IaC-driven deployments using standard identity providers like Keycloak.

tobiu
Mar 26, 2026, 2:57 PM
Added CORS support to Knowledge Base and Memory Core MCP servers for better cross-origin client compatibility.
tobiu assigned to @tobiu on Mar 26, 2026, 3:07 PM
Implement out-of-the-box OAuth 2.1 / OIDC authorization for the Knowledge Base and Memory Core MCP servers. This enables IaC-driven deployments using standard identity providers like Keycloak.
Requirements:
AUTH_HOST,AUTH_PORT,AUTH_REALM,OAUTH_CLIENT_ID, andOAUTH_CLIENT_SECRETinaiConfig.mjs.Server.mjs(for bothknowledge-baseandmemory-core):mcpAuthMetadataRouterfor discovery.tokenVerifierusing standard token introspection.requireBearerAuthmiddleware to the SSE transport.authMiddlewareescape hatch remains functional.