gpt-mcp-server
by Lewis-R-L
Overview
An MCP server integrating with italki's API to provide language learning services, including teacher recommendations, language/country metadata, and personal calendar events, with an optional OAuth 2.0 authentication provider.
Installation
node dist/mcp-server/main.jsEnvironment Variables
- ICONS_CDN_BASE_URL
- WIDGET_DOMAIN
- PORT
- USE_HTTPS
- HTTPS_PORT
- SSL_CERT_PATH
- SSL_KEY_PATH
- LOG_FORMAT
- DISABLE_ACCESS_LOG
- LOG_REQUEST_RESPONSE
- MOCK_OAUTH_PROVIDER
- OAUTH_DB_PATH
- BASE_URL
- OAUTH_ACCESS_TOKEN_LIFETIME
- OAUTH_REFRESH_TOKEN_LIFETIME
- OAUTH_AUTHORIZATION_CODE_LIFETIME
- OAUTH_ALLOWED_SCOPES
- OAUTH_DEFAULT_SCOPES
- OAUTH_ISSUER
- OAUTH_CLEANUP_INTERVAL
- EXTERNAL_OAUTH_SERVER_URL
- ITALKI_ASSET_FETCH_TIMEOUT_MS
- ITALKI_FETCH_TIMEOUT_MS
- ADMIN_PORT
Security Notes
CRITICAL ISSUES: 1. Weak Password Hashing: The mock OAuth provider (NeDBUsersStore) uses SHA256 for password hashing, which is not cryptographically secure for user credentials in production environments and is highly susceptible to brute-force and rainbow table attacks. The code acknowledges this is 'for demo purposes' but it's a severe vulnerability if used. 2. Access Token Logging: When `LOG_REQUEST_RESPONSE` environment variable is set to `true`, the full `Authorization` header (including sensitive access tokens) is explicitly logged in plaintext to the console (main.ts, `oauthHeaders.authorization` in access log middleware). This is a severe security risk as access tokens grant access to user data and should never be logged. 3. Wildcard CORS for Admin API: The admin API (admin-server.ts) uses `Access-Control-Allow-Origin: *` (wildcard CORS). While the local version runs on a separate port, the Vercel deployment integrates it into the main app. Exposing an administrative interface with such permissive CORS without strong authentication and origin checks is a high security risk. OTHER ISSUES: - Non-persistent Data in Serverless: The in-memory MCP sessions and the NeDB database (when `OAUTH_DB_PATH` points to `/tmp/db` on Vercel) are not persistent across serverless function invocations or server restarts, leading to data loss for OAuth clients, users, and sessions. This is a functional limitation, not a direct security flaw in the code logic itself, but impacts the reliability and security posture of the OAuth provider in a production serverless environment.
Similar Servers
chatgpt-mcp-helloworld
A minimal, local server demonstrating integration between the Minecraft Client Protocol (MCP) and ChatGPT for development or testing purposes.
MCP-testing
A testing environment for a Minecraft Protocol (MCP) server, likely for development and protocol analysis.
mcp-server-test
Unable to determine the specific use case due to the complete absence of provided source code. The repository name 'mcp-server-test' suggests it might be a test server related to the Minecraft Protocol (MCP).
SpigotMCP
Provides a Model Context Protocol (MCP) server for a Spigot (Minecraft) plugin, allowing external AI models or clients to interact with the game state and perform actions via registered tools.