
mcp server exploration
这个GitHub仓库托管了MCP,这是一个使用Connect API并集成了Swagger的客户端-服务器通信工具,用于可定制的聊天交互和API测试。
Repository Info
About This Server
这个GitHub仓库托管了MCP,这是一个使用Connect API并集成了Swagger的客户端-服务器通信工具,用于可定制的聊天交互和API测试。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
MCP
A simple example of a client and server using the Connect API.
Usage
Run an MCP server:
CONNECT_API_KEY="<your key>" SWAGGER_FILE="swagger.yaml" make server
Then run the MCP client:
make client
Modify the chat in the main function of app.py to ask different questions.
Swagger Usage
The code below is a snippet of how to register Swagger tools with Chatlas.
import chatlas
import requests
from openapi_mcp.chatlas import SwaggerTool
from openapi_mcp.connect_api import map_operations_to_tools
from openapi_mcp.swagger import (
expand_all_references,
transform_swagger_to_operation_dict,
)
api_url = "127.0.0.1:8000/"
openapi_dict = requests.get(f"{api_url}/swagger.json").json()
openapi_doc = expand_all_references(openapi_dict)
operations = transform_swagger_to_operation_dict(openapi_doc)
tools = map_operations_to_tools(operations)
aws_model = os.getenv("AWS_MODEL", "us.anthropic.claude-3-5-sonnet-20241022-v2:0")
aws_region = os.getenv("AWS_REGION", "us-east-1")
chat = chatlas.ChatBedrockAnthropic(model=aws_model, aws_region=aws_region)
for operation in api_operations.values():
SwaggerTool.register_tool(
chat,
SwaggerTool(
base_url=api_url,
operation=operation,
),
)
To see this in action, run a local OpenAPI-compatible server and run the Shiny application:
# Run the OpenAPI-compatible server
make ex-starwars
# Run Shiny
make shiny
!Screenshot of Star Wars shiny app demo
Quick Start
Clone the repository
git clone https://github.com/mconflitti-pbc/mcp-server-explorationInstall dependencies
cd mcp-server-exploration
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.