Homemade-MCP
Homemade-MCP is a tiny Python library that gives you one standard input/output format for multiple AI providers (OpenAI GPT, Google Gemini, Mistral OCR).
✨ Features:
-
Unified request/response schema (no more provider-specific formats).
-
LLM & OCR support: text, text+image, and documents.
-
Structured outputs: enforce JSON schema across models.
-
Thinking control (reasoning budget / effort) when supported.
-
Search grounding (Gemini’s Google Search integration).
-
Batch processing:
- “Concurrent” mode → fast async fan-out.
- “Native” batch (OpenAI & Gemini) → cheaper large jobs with JSONL.
Why?
Each provider (OpenAI, Gemini, Mistral) exposes different SDKs, request shapes, and batch/structured-output quirks. Homemade-MCP acts as a “universal socket”: one entry point, one output format. Swap providers or models without rewriting your code.
Installation
pip install -e .
Quick start
from homemade_mcp.client import LLMClient
from homemade_mcp.schemas import StdRequest, LLMInput, PDFDoc
client = LLMClient({
"openai": {"api_key": "..."},
"gemini": {"api_key": "..."},
"mistral_ocr": {"api_key": "..."},
})
req = StdRequest(
provider="openai",
model="gpt-5",
task="llm",
input=LLMInput(
blocks=["Extract title & price: Widget X costs 12.99"],
json_schema={"type":"object","properties":{"title":{"type":"string"},"price":{"type":"number"}},"required":["title","price"]},
thinking="low"
)
)
resp = await client.run(req)
print(resp.content) # {'title': 'Widget X', 'price': 12.99}
Roadmap
- Add batch job polling helpers (OpenAI & Gemini).
- Extend OCR adapter (PDFs, multi-page).
- PDF rasterization helper (images for LLM vision) [optional extra dep].
- Add more providers (Anthropic, Cohere, Claude OCR).
- CLI tool for quick testing.
Contributing
Pull requests and issues welcome!
- Keep code simple (no heavy abstractions).
- Follow PEP8.
- Add examples if you add features.
Metadata
Release files for homemade-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| homemade_mcp-0.1.0.tar.gz | 11.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| homemade_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.7 kB
Release files / homemade_mcp-0.1.0.tar.gz
| Download URL | homemade_mcp-0.1.0.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08977a0bba0a09b5d5d62ea7e651483fed1f503d1160aecece0ef014e1d481f3
|
|
BLAKE2b-256 checksum How to use checksums |
57601208e63d73915ad2c9e5324aba6752b6c09b058694442f245c139d1bd761
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.12.1 Linux/6.8.0-1030-azure
|
Release files / homemade_mcp-0.1.0-py3-none-any.whl
| Download URL | homemade_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10e8257d2c55d9cffb07e2c625e97e9a31705a9f27f6cca99896f22982d5f46a
|
|
BLAKE2b-256 checksum How to use checksums |
6b636545d40952facabc9c9a9078fb2ec7f52ff4405a46a8f4bf543ecfc0e81a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.12.1 Linux/6.8.0-1030-azure
|
Security for homemade-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.