MCP ExplorerExplorer

Function Calling Adapter

@awesimonon 9 months ago
1 MIT
FreeCommunity
AI Systems
A flexible adapter for seamless function calling across various MCP services and tools.

Overview

What is Function Calling Adapter

Function-calling-adapter is a flexible adapter designed to facilitate seamless function calling across various MCP services and tools, providing a unified interface for managing function calls.

Use cases

Use cases include automating workflows that involve multiple MCP services, integrating different tools for data analysis, and developing applications that require dynamic function calls across services.

How to use

To use function-calling-adapter, install it via pip, initialize the MCPClient, connect to the desired MCP service, and call functions with the appropriate parameters using asynchronous operations.

Key features

Key features include a unified interface for multiple MCP services, seamless function calling with parameter handling, automatic connection management, comprehensive error handling, support for asynchronous operations, and an extensible plugin architecture.

Where to use

Function-calling-adapter can be used in various fields that require integration with multiple MCP services, such as cloud computing, data processing, and application development.

Content

Function Calling Adapter

A flexible adapter for seamless function calling across various MCP services and tools.

Overview

Function Calling Adapter provides a unified interface to call and manage functions across different MCP services. It streamlines the process of connecting to various services, handling authentication, managing connections, and executing function calls with proper error handling.

Features

  • Unified interface for multiple MCP services
  • Seamless function calling with proper parameter handling
  • Automatic connection management
  • Comprehensive error handling
  • Support for asynchronous operations
  • Extensible plugin architecture

Installation

pip install function-calling-adapter

Usage

from function_calling_adapter import MCPClient

# Initialize the client
client = MCPClient()

# Connect to MCP service
await client.connect()

# Call a function
result = await client.call_tool("tool_name", {
    "param1": "value1",
    "param2": "value2"
})

# Process the result
print(result.content)

Documentation

For detailed documentation, visit docs/README.md

License

MIT


Function Calling Adapter (中文版)

灵活的函数调用适配器,无缝连接各种MCP服务和工具。

概述

Function Calling Adapter提供了一个统一的接口,用于在不同的MCP服务中调用和管理函数。它简化了连接各种服务、处理认证、管理连接以及执行函数调用的过程,并提供适当的错误处理。

特性

  • 为多种MCP服务提供统一接口
  • 无缝函数调用,正确处理参数
  • 自动连接管理
  • 全面的错误处理机制
  • 支持异步操作
  • 可扩展的插件架构

安装

pip install function-calling-adapter

使用方法

from function_calling_adapter import MCPClient

# 初始化客户端
client = MCPClient()

# 连接到MCP服务
await client.connect()

# 调用函数
result = await client.call_tool("tool_name", {
    "param1": "value1",
    "param2": "value2"
})

# 处理结果
print(result.content)

文档

详细文档请访问 docs/README.md

许可证

MIT

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers