PostHog Agent Toolkit for LangChain and other AI frameworks
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
PostHog MCP Server - Python Implementation
Python wrapper of the MCP server tools to make using PostHog easier in agents.
Setup
1. Install Dependencies with uv
For production:
uv sync
For development (includes schema generation tools):
uv sync --dev
2. Alternative: Create Virtual Environment Manually
If you prefer to use pip:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e .
Development
Schema Generation
The Python implementation uses Pydantic models generated from the TypeScript Zod schemas:
# From the root directory
pnpm run schema:build # Generate both JSON schema and Python models
This generates type-safe Pydantic models in schema/tool_inputs.py based on the shared JSON schema.
Project Structure
python/
├── pyproject.toml # Project configuration and dependencies
├── uv.lock # Locked dependency versions (generated by uv)
├── schema/
│ └── tool_inputs.py # Generated Pydantic models
└── scripts/
└── generate-pydantic-models.sh # Schema generation script
Running Commands
All Python commands should be run through uv:
# Run tests
uv run pytest
# Format code
uv run ruff format .
# Lint code
uv run ruff check --fix .
Dependencies
Dependencies are managed in pyproject.toml.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file posthog_agent_toolkit-0.1.0.tar.gz.
File metadata
- Download URL: posthog_agent_toolkit-0.1.0.tar.gz
- Upload date:
- Size: 82.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d4c1303445ad140eae0f54fe47fb118bcf005db3895fc80eb4ffb91e09aee0d
|
|
| MD5 |
f04bf663578f8be35fa5ad4e7f573dd5
|
|
| BLAKE2b-256 |
fdf938403ede0ffce124aa68502b60c74b53072de4fbea387d8ab7b562959394
|
File details
Details for the file posthog_agent_toolkit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: posthog_agent_toolkit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
127dd2b17baafae0782cfc17a02a83b151d6e4636eacd6bb8a1059e2e5e71eca
|
|
| MD5 |
99ccf64f5a885e0da38fec0a8c64525b
|
|
| BLAKE2b-256 |
b786ba0140e406183809f84ad062a7de4b9ddd216e746abaad061334ba46ace7
|