mcp-client-for-ollama
The mcp-client-for-ollama is a simple yet powerful Python client designed for interacting with Model Context Protocol (MCP) servers using Ollama. This client enables local large language models (LLMs) to utilize tools effectively. It primarily facilitates communication with APIs, streamlining workflows and enhancing the capabilities of LLMs.
GitHub Stars
215
User Rating
Not Rated
Favorites
0
Views
175
Forks
35
Issues
10
Python 3.10以上Installation
Installation
Prerequisites
Installation Steps
1. Clone Repository
bash
git clone https://github.com/jonigl/mcp-client-for-ollama.git
cd mcp-client-for-ollama
2. Install Dependencies
bash
pip install -r requirements.txt
3. Start the Server
bash
python -m mcp_client
Troubleshooting
Common Issues
Issue: Server won't start Solution: Check Python version and reinstall dependencies.Configuration
Configuration
Basic Configuration
Server Setup
Edit~/.config/mcp_client/config.json:
json
{
"mcpServers": {
"example-server": {
"url": "http://localhost:3000",
"model": "example-model"
}
}
}
Advanced Configuration
Environment Variables
Set the following environment variables as needed:bash
export MCP_SERVER_URL="http://localhost:3000"
Security Settings
Examples
Examples
Basic Usage
Here are basic usage examples for the MCP server:Command-line Usage
bash
mcp-client --server example-server --model example-model
Programmatic Usage
python
import requests
response = requests.get('http://localhost:3000/mcp/call', params={'tool': 'example-tool'})
print(response.json())
Use Cases
Additional Resources
16
Followers
50
Repositories
13
Gists
0
Total Contributions
The Prospectio MCP API is a FastAPI-based application designed for lead prospecting, implementing the Model Context Protocol (MCP). It adheres to Clean Architecture principles, ensuring a clear separation of concerns across domain, application, and infrastructure layers. The project focuses on core business entities and logic, along with use cases and API routes, facilitating integration with external services.