Skip to content

UNABLE_TO_GET_ISSUER_CERT_LOCALLY #1666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
riponbanik opened this issue May 5, 2025 · 0 comments
Open

UNABLE_TO_GET_ISSUER_CERT_LOCALLY #1666

riponbanik opened this issue May 5, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@riponbanik
Copy link

riponbanik commented May 5, 2025

Describe the bug
Can't work with local proxy certificate. Node environment variable set for internal CA.
export NODE_EXTRA_CA_CERTS="xxx"

To Reproduce
Steps to reproduce the behavior:
Use the block below to create Slack MCP Server
slack_command = "npx -y @modelcontextprotocol/server-slack"
slack_server = MCPServerStdio(
name="Slack MCP Server",
params={
"command": slack_command.split(" ")[0],
"args": slack_command.split(" ")[1:],
"env": {
"SLACK_BOT_TOKEN": os.environ["SLACK_BOT_TOKEN"],
"SLACK_TEAM_ID": os.environ["SLACK_TEAM_ID"],
},
},

Expected behavior
A clear and concise description of what you expected to happen.
Need to have local ca support like below if cant honour systemwide ca cert.

"SLACK_MCP_SERVER_CA": os.environ["NODE_EXTRA_CA_CERTS],
"SLACK_MCP_SERVER_CA_INSECURE": "true"

Logs
Error executing tool: TypeError: fetch failed
at node:internal/deps/undici/undici:13502:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async SlackClient.getChannelHistory (file:///home/user/.npm/_npx/71b7d53511ff2b57/node_modules/@modelcontextprotocol/server-slack/dist/index.js:236:26)
at async file:///home/user/.npm/_npx/71b7d53511ff2b57/node_modules/@modelcontextprotocol/server-slack/dist/index.js:338:38 {
[cause]: Error: unable to get local issuer certificate
at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
at TLSSocket.emit (node:events:518:28)
at TLSSocket._finishInit (node:_tls_wrap:1078:8)
at ssl.onhandshakedone (node:_tls_wrap:864:12) {
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
}
}

Additional context
Calling MCP server with OpenAI agent:

async with fs_server as fs, slack_server as slack:

        agent = Agent(
            name="OpenAI Agent w/ MCP Servers",
            instructions="Use the tools to access the filesystem and slack workspaces.",
            mcp_servers=[fs, slack],

        )
        prompt = input("Enter a prompt (MCP servers (fs, slack) are available): ")
        result = await Runner.run(starting_agent=agent, input=prompt)
        print(result.final_output
@riponbanik riponbanik added the bug Something isn't working label May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant