Skip to content

feat(agent): Support SSL/TLS for MCP#2591

Merged
yyhhyyyyyy merged 3 commits into
eosphoros-ai:mainfrom
fangyinc:mcp-ssl
Apr 8, 2025
Merged

feat(agent): Support SSL/TLS for MCP#2591
yyhhyyyyyy merged 3 commits into
eosphoros-ai:mainfrom
fangyinc:mcp-ssl

Conversation

@fangyinc
Copy link
Copy Markdown
Member

@fangyinc fangyinc commented Apr 7, 2025

Description

  • Support SSL/TLS for MCP
  • Fix tool emply list bug

How Has This Been Tested?

  # Default ssl_verify is True
  tools = MCPToolPack(
      "https://your_ssl_domain/sse",
  )

  # Set the default ssl_verify to False to disable ssl verify
  tools2 = MCPToolPack(
      "https://your_ssl_domain/sse", default_ssl_verify=False
  )

  # With Custom CA file
  tools3 = MCPToolPack(
      "https://your_ssl_domain/sse", default_ssl_cafile="/path/to/your/ca.crt"
  )

  # Set the ssl_verify for each server
  import ssl

  tools4 = MCPToolPack(
      "https://your_ssl_domain/sse",
      ssl_verify={
          "https://your_ssl_domain/sse": ssl.create_default_context(
              cafile="/path/to/your/ca.crt"
          ),
      },
  )

Snapshots:

Webpage:

image

Checklist:

  • My code follows the style guidelines of this project
  • I have already rebased the commits and make the commit message conform to the project standard.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

@fangyinc fangyinc changed the title Mcp ssl feat(agent): Support SSL/TLS for MCP Apr 7, 2025
@github-actions github-actions Bot added agent Module: agent enhancement New feature or request labels Apr 7, 2025
Copy link
Copy Markdown
Collaborator

@chenliang15405 chenliang15405 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@Aries-ckt Aries-ckt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@yyhhyyyyyy yyhhyyyyyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yyhhyyyyyy yyhhyyyyyy merged commit e9ce534 into eosphoros-ai:main Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Module: agent enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants