FlowiseAI/Flowise · error · Error
Missing Github Access Token
Error message
Missing Github Access Token
What it means
Thrown by GithubMCP.getTools when the bound GitHub credential has no 'accessToken' value. The node needs a valid GitHub access token to call the GitHub Copilot MCP endpoint (https://api.githubcopilot.com/mcp/ or a transformed Enterprise URL) with an Authorization: Bearer header. Without it, the request cannot authenticate and the node refuses to initialize the MCPToolkit.
Source
Thrown at packages/components/nodes/tools/MCP/Github/GithubMCP.ts:116
const accessToken = getCredentialParam('accessToken', credentialData, nodeData)
const githubEnterpriseUrl = nodeData.inputs?.githubEnterpriseUrl
let url = 'https://api.githubcopilot.com/mcp/'
if (githubEnterpriseUrl) {
// Transform e.g. https://octocorp.ghe.com -> https://copilot-api.octocorp.ghe.com/mcp
const trimmed = githubEnterpriseUrl.trim().replace(/\/+$/, '')
try {
const parsed = new URL(trimmed)
parsed.hostname = `copilot-api.${parsed.hostname}`
parsed.pathname = '/mcp'
url = parsed.toString().replace(/\/$/, '')
} catch {
url = `${trimmed}/mcp`
}
}
if (!accessToken) {
throw new Error('Missing Github Access Token')
}
const serverParams = {
type: 'http',
url,
headers: {
Authorization: `Bearer ${accessToken}`
}
}
const toolkit = new MCPToolkit(serverParams, 'http')
await toolkit.initialize()
const tools = toolkit.tools ?? []
return tools as Tool[]
}
}View on GitHub (pinned to abe4a8601a)
Solutions
- Open the Github_MCP node in the editor and confirm a credential is selected in the credential dropdown.
- Open that credential and ensure the 'accessToken' field is populated with a GitHub Personal Access Token (or OAuth token) that has the required scopes.
- If using a credential that lacks the accessToken field, create a new GitHub credential of the correct type and re-bind it on the node.
- Verify the credential is not saved with a blank/whitespace-only token; re-paste and save.
Example fix
// before: nodeData.credential points to a credential with empty accessToken
// after: bind a credential whose accessToken is set
const accessToken = getCredentialParam('accessToken', credentialData, nodeData)
if (!accessToken) {
throw new Error('Missing Github Access Token')
}
// ensure the credential record has accessToken populated before selecting it on the node Defensive patterns
Strategy: validation
Validate before calling
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const accessToken = getCredentialParam('accessToken', credentialData, nodeData)
if (!accessToken || !accessToken.trim()) {
// surface a user-facing config error before calling the MCP toolkit
throw new Error('Bind a GitHub credential with a non-empty accessToken.')
} Type guard
function hasGithubAccessToken(cred: unknown): cred is { accessToken: string } {
return typeof cred === 'object' && cred !== null
&& typeof (cred as any).accessToken === 'string'
&& (cred as any).accessToken.trim().length > 0
} Try / catch
try {
const tools = await githubMcp.getTools(nodeData, options)
} catch (e) {
if (e instanceof Error && e.message === 'Missing Github Access Token') {
// prompt user to bind a credential; do not retry without input change
}
} Prevention
- Make the accessToken field required in the credential component so the UI blocks saving without it.
- Validate credentials at node-save time rather than at runtime.
- Display the bound credential name on the node so missing bindings are visible.
When it happens
Trigger: Calling getTools/init on the Github_MCP node with a credential that omits or blanks the 'accessToken' field (e.g. credential not selected, selected credential deleted, or the credential component never saved a token).
Common situations: User creates the node but forgets to attach a credential; credential is attached but the token field is empty; credential was renamed/removed so nodeData.credential resolves to nothing; migration left an old credential object with no accessToken key.
Related errors
- Missing Slack credentials. Provide either an OAuth2 access t
- No postgres url provided
- Missing credentials: provide Bearer token from flow/credenti
- Cloudflare API Token is missing in credential.
- CometAPI API Key is missing or empty. Please provide a valid
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/b4774f464e18545d.
Report an issue: GitHub.