MCP server: two issues found while building SDK auth interceptors
-
mcpAccount returns LOCAL_MODE on the hosted MCP endpoint
Repro:
Initialize against https://docparse.ailang.sunholo.com/mcp/, then call mcpAccount with action='info' and any apiKey (valid or empty). Server returns:
{"error":"LOCAL_MODE","message":"Account management is not available in local mode. Local parsing has no quotas or billing.","suggested_fix":"Use the hosted API at https://docparse.ailang.sunholo.com for account features. Connect via MCP with a hosted URL."}
The suggested_fix tells the caller to do exactly what they're already doing — connect via the hosted MCP URL. Looks like the LOCAL_MODE detection inside mcpAccount is broken: it isn't recognizing that the request came in over the hosted endpoint. Same behavior whether the apiKey is missing, invalid, or a real dp_ key from ~/.config/ailang-parse/credentials.json.
-
mcpParse FILE_NOT_FOUND for documented sample_id 'sample_docx_basic'
Repro:
Call mcpParse with arguments {filepath: 'sample_docx_basic', outputFormat: 'blocks', apiKey: '', requestId: ''}. Server returns:
{"error":"FILE_NOT_FOUND","message":"File not found: ","suggested_fix":"Check the file path or use a sample_id from mcpFormats"}
The error message is empty after 'File not found:' (no path printed), suggesting the sample_id-to-path resolution didn't run or returned an empty string. The suggested_fix points users back to mcpFormats as the source of valid sample_ids, so 'sample_docx_basic' is presumably one of them.
Impact: Blocks SDK auth-interceptor work — I can't trigger AUTH_REQUIRED reliably for testing, and can't validate end-to-end parse from the published @ailang/parse@0.3.0 / ailang-parse 0.3.0 / ailang-parse-go bridges. Both issues found while implementing auto-credential injection (~/.config/ailang-parse/credentials.json) into the stdio bridges.
Server version at time of repro: docparse 0.9.0, ailang_commit v0.10.7.
Binary info (auto-attached):
ailang version: v0.10.7
binary md5: 0087bd2e1de08a3783b1110d568bff13
binary path: /Users/mark/go/bin/ailang
git commit: 4b19ba71
Reported by: ailang-parse via ailang messages
MCP server: two issues found while building SDK auth interceptors
mcpAccount returns LOCAL_MODE on the hosted MCP endpoint
Repro:
Initialize against https://docparse.ailang.sunholo.com/mcp/, then call mcpAccount with action='info' and any apiKey (valid or empty). Server returns:
{"error":"LOCAL_MODE","message":"Account management is not available in local mode. Local parsing has no quotas or billing.","suggested_fix":"Use the hosted API at https://docparse.ailang.sunholo.com for account features. Connect via MCP with a hosted URL."}
The suggested_fix tells the caller to do exactly what they're already doing — connect via the hosted MCP URL. Looks like the LOCAL_MODE detection inside mcpAccount is broken: it isn't recognizing that the request came in over the hosted endpoint. Same behavior whether the apiKey is missing, invalid, or a real dp_ key from ~/.config/ailang-parse/credentials.json.
mcpParse FILE_NOT_FOUND for documented sample_id 'sample_docx_basic'
Repro:
Call mcpParse with arguments {filepath: 'sample_docx_basic', outputFormat: 'blocks', apiKey: '', requestId: ''}. Server returns:
{"error":"FILE_NOT_FOUND","message":"File not found: ","suggested_fix":"Check the file path or use a sample_id from mcpFormats"}
The error message is empty after 'File not found:' (no path printed), suggesting the sample_id-to-path resolution didn't run or returned an empty string. The suggested_fix points users back to mcpFormats as the source of valid sample_ids, so 'sample_docx_basic' is presumably one of them.
Impact: Blocks SDK auth-interceptor work — I can't trigger AUTH_REQUIRED reliably for testing, and can't validate end-to-end parse from the published @ailang/parse@0.3.0 / ailang-parse 0.3.0 / ailang-parse-go bridges. Both issues found while implementing auto-credential injection (~/.config/ailang-parse/credentials.json) into the stdio bridges.
Server version at time of repro: docparse 0.9.0, ailang_commit v0.10.7.
Binary info (auto-attached):
ailang version: v0.10.7
binary md5: 0087bd2e1de08a3783b1110d568bff13
binary path: /Users/mark/go/bin/ailang
git commit: 4b19ba71
Reported by: ailang-parse via ailang messages