
johnrobinsn/askit
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
LLM 기능 MCP Server에 대한 지원과 라이브러리 및 CLI 호출
개요
AskIt는 Model Context Protocol (MCP) 서버에서 부동 서비스를 확장하기 위해 다양한 LLM 모델을 허용하는 유연한 asyncio Python 라이브러리 및 CLI 도구이며 로컬 정의 Python 기능을 호출합니다. * 단순하고 경량 * 여러 MCP 서버에 연결하여 동시에 * 지원 STDIO, SSE 및 Streamable-HTTP MCP 서버 * 도구 사용 / 기능 지원 MCP 서버로 작성된 모든 언어 * 도구 사용 / 기능에 대한 지원 로컬 정의 파이썬 기능 * 지원 Multiple LLM Providers * OpenAI 및 XAI (Grok) 현재 지원 * Anthropic, Ollama 및 LMStudio 지원 * 선택 사양에 대한 자세한 내용은 여기를 참조하십시오. AskIt MCP로 시작하려면 시스템에 Python 3.11+가 설치되어 있어야 합니다. python 버전 관리자가 권장됩니다.
개요(AI 번역)
AskIt는 Model Context Protocol (MCP) 서버에서 부동 서비스를 확장하기 위해 다양한 LLM 모델을 허용하는 유연한 asyncio Python 라이브러리 및 CLI 도구이며 로컬 정의 Python 기능을 호출합니다.
특징
- 간단하고 경량
- 동시에 여러 MCP 서버에 연결
- STDIO, SSE 및 Streamable-HTTP MCP 서버 지원
- MCP Servers로 호출하는 Tool Use/Function에 대한 지원은 어떤 언어로 작성됩니다.
- Locally-Defined Python Functions로 호출하는 공구 사용/기능 지원
- 지원 다수 LLM 회사 소개
- OpenAI 및 XAI (Grok) 현재 지원
- Anthropic, Ollama 및 LMStudio 지원 Coming Soon
- LLM 응답을 스트리밍하기위한 옵션 지원
- 환경 변수의 Securely Store API 키
설치
AskIt MCP로 시작하려면 시스템에 Python 3.11+가 설치되어 있어야 합니다. python 버전 관리자가 권장됩니다. 다음 pip를 사용하여 패키지를 설치할 수 있습니다.
AskIt CLI 시작하기
AskIt로 시작하는 가장 쉬운 방법은 통합 명령 줄 인터페이스 (CLI) 도구를 사용하는 것입니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
AskIt MCP Client and Library - Apache License 2.0
AskIt is a flexible asyncio Python library and CLI tool that allows various LLM models to extend their abilities by invoking services from Model Context Protocol (MCP) servers and by calling locally-defined Python functions.
Features
- Simple and Lightweight
- Connect to multiple MCP servers simultaneously
- Supports STDIO, SSE and Streamable-HTTP MCP Servers
- Support for Tool Use/Function Calling with MCP Servers Written in any Language
- Support for Tool Use/Function Calling with Locally-Defined Python Functions
- Supports Multiple LLM Providers
- OpenAI and XAI (Grok) Currently Supported
- Anthropic, Ollama, and LMStudio Support Coming Soon
- Optional Support for Streaming LLM Responses
- Securely Store API Keys in Environment Variables
Installation
To get started with AskIt MCP, you need to have Python 3.11+ installed on your system. A python version manager is recommended. You can then install the package using pip:
pip install git+https://github.com/johnrobinsn/askit.git
Getting Started with the AskIt CLI
The easiest way to get started with AskIt is to use its integrated command-line interface (CLI) tool. The CLI allows you to interact with MCP servers and LLMs using natural language queries, making it easy to access and manipulate data from various sources.
The following command will leverage the default OpenAI model (gpt-4o-mini) to enter into a “chat-eval” loop with the configured LLM.
You just need to provide your OpenAI API key as a command line argument.
eg.
python -m askit --api_key="your_openai_api_key_here"
You can also provide the OpenAI API key as a provider specific environment variable.
OPENAI_API_KEY="your_openai_api_key_here" python -m askit
You can specify a different model or provider using command-line options. Here is an example using the XAI provider (Grok) with a specific model. You will need to provide your XAI API key as an environment variable or command line argument.
python -m askit --model="grok-4-latest" --provider="XAI" --api_key="your_xai_api_key_here"
Find out more about Provider Specific Environment Variables.
Connect MCP Servers to Askit
You can connect to multiple MCP servers by creating a mcp_config.json file in your current working directory. This file should contain the configuration for the MCP servers you want to connect to. The AskIt CLI will automatically load this configuration and connect to the specified MCP servers.
eg.
{
"mcpServers": {
"example-stdio": {
"command" : "node",
"cwd" : "/mnt2/code/mcpcalc",
"args": [
"mcpcalc.mjs"
],
"env": {
"debug_log": "false"
}
},
"example-streamable-http": {
"transport" : "http",
"url" : "http://127.0.0.1:8000/mcp",
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"example-stdio": {
"command" : "node",
"cwd" : "/mnt2/code/mcpcalc",
"args": [
"mcpcalc.mjs"
],
"env": {
"debug_log": "false"
}
},
"example-streamable-http": {
"transport" : "http",
"url" : "http://127.0.0.1:8000/mcp",
"disabled" : false
}
}
}