You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`flags` - [Feature flag management](https://posthog.com/docs/feature-flags)
112
-
-`llm-analytics` - [LLM usage and cost tracking](https://posthog.com/docs/llm-analytics)
113
-
-`docs` - PostHog documentation search
114
-
115
-
To view which tools are available per feature, see our [documentation](https://posthog.com/docs/model-context-protocol) or alternatively check out `schema/tool-definitions.json`,
116
-
117
-
### Data processing
118
-
119
-
The MCP server is hosted on a Cloudflare worker which can be located outside of the EU / US, for this reason the MCP server does not store any sensitive data outside of your cloud region.
120
-
121
-
### Using self-hosted instances
122
-
123
-
If you're using a self-hosted instance of PostHog, you can specify a custom base URL by adding the `POSTHOG_BASE_URL`[environment variable](https://developers.cloudflare.com/workers/configuration/environment-variables) when running the MCP server locally or on your own infrastructure, e.g. `POSTHOG_BASE_URL=https://posthog.example.com`
124
-
125
-
# Development
126
-
127
-
To run the MCP server locally, run the following command:
128
-
129
-
```
130
-
pnpm run dev
131
-
```
132
-
133
-
And replace `https://mcp.posthog.com/mcp` with `http://localhost:8787/mcp` in the MCP configuration.
134
-
135
-
## Project Structure
136
-
137
-
This repository is organized to support multiple language implementations:
138
-
139
-
-`typescript/` - TypeScript implementation of the MCP server & tools
140
-
-`schema/` - Shared schema files generated from TypeScript
141
-
142
-
### Development Commands
143
-
144
-
-`pnpm run dev` - Start development server
145
-
-`pnpm run schema:build:json` - Generate JSON schema for other language implementations
146
-
-`pnpm run lint && pnpm run format` - Format and lint code
147
-
148
-
### Adding New Tools
149
-
150
-
See the [tools documentation](typescript/src/tools/README.md) for a guide on adding new tools to the MCP server.
151
-
152
-
### Environment variables
153
-
154
-
- Create `.dev.vars` in the root
155
-
- Add Inkeep API key to enable `docs-search` tool (see `Inkeep API key - mcp`)
156
-
157
-
```
158
-
INKEEP_API_KEY="..."
159
-
```
160
-
161
-
162
-
### Configuring the Model Context Protocol Inspector
163
-
164
-
During development you can directly inspect the MCP tool call results using the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector).
0 commit comments