- Home
- MCP servers
- Case Study
Case Study
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"davidcaraman-custom-client-case-study-mcp": {
"command": "python",
"args": [
"/path/to/case-study-mcp/mcp_server.py"
],
"env": {
"LOG_LEVEL": "INFO",
"OLLAMA_HOST": "http://localhost:11434",
"GITHUB_TOKEN": "YOUR_GITHUB_TOKEN",
"OLLAMA_MODEL": "gemma3n:e4b",
"TAVILY_API_KEY": "YOUR_TAVILY_API_KEY"
}
}
}
}You can run the Case Study MCP Server locally to extract structured business insights from documents, analyze GitHub repositories, and perform real-time company research. It uses Gemma3 on Ollama for private, on-device processing, giving you fast, privacy-preserving case study generation.
How to use
Use this MCP server with your preferred MCP client to automate case study creation. You provide a document or proposal content and a GitHub repository, and the server returns structured insights you can turn into a compelling case study. You can also enable real-time company research to enrich the study with up-to-date business context. The workflow is designed to keep data local when you run the server on your machine.
How to install
Prerequisites you need before running the MCP server:
- Python 3.11+ installed on your system
- Ollama installed and running
- Gemma3 model available to Ollama
Install Ollama and pull Gemma3 model:
ollama pull gemma3n:e4b
ollama list
Starting the MCP server
Run the MCP server from your project directory. The server communicates via standard I/O and waits for MCP protocol messages.
python mcp_server.py
Configure client to connect to the MCP server
In your MCP client setup, reference the local stdio server you run. Provide the command and arguments so the client can launch the server process and establish the MCP channel.
{
"mcpServers": {
"case_study_mcp": {
"command": "python",
"args": ["/path/to/case-study-mcp/mcp_server.py"],
"cwd": "/path/to/case-study-mcp"
}
}
}
Example usage pattern
Provide a mix of document content and repository information to generate a case study. The client triggers three main actions: process the document text, analyze the GitHub repository, and perform company research for context. The MCP server returns structured insights that you can assemble into your final case study.
Configuration and environment
The server is designed to read configuration and environment from a local setup. You can place optional environment variables in a .env file at the project root to control access tokens, API keys, and logging.
# Example .env
GITHUB_TOKEN=your_github_token_here
TAVILY_API_KEY=your_tavily_api_key_here
OLLAMA_HOST=http://localhost:11434
OLLAMA_MODEL=gemma3n:e4b
LOG_LEVEL=INFO
Security and privacy
Data remains on your machine when you use Ollama with Gemma3 for local LLM processing. This keeps proposals, contracts, and repository data private and within your control.
Troubleshooting
Common issues and fixes you may encounter during setup or use.
Error: Failed to connect to Ollama
Solution: Ensure Ollama is running and the Gemma3 model is pulled.
Error: GitHub API rate limit exceeded
Solution: Add a GitHub token to your environment (.env) for higher limits.
Error: Model not found
Solution: Pull the correct Gemma3 model with ollama pull gemma3n:e4b.
ImportError: No module named 'mcp'
Solution: Install dependencies with pip install -r requirements.txt.
## Project structure and tools
This project provides three MCP tools that you can invoke from your client to build the case study.
## Notes
The server’s standard I/O interface simplifies integration with MCP clients and enables streamlined workflows for document processing, repository analysis, and company research.
## Available tools
### process\_document\_text
Extract business insights from an input document, supporting various document types like proposals, case studies, contracts, and general text.
### analyze\_github\_repo
Analyze a GitHub repository to identify business value, key features, tech stack, and scalability considerations.
### research\_company\_basic
Perform real-time company research combining web search and AI analysis to summarize a company profile and needs.