testing-mcp-tools-locally

testing-mcp-tools-locally is a skill for Claude Code, Codex from PostHog/posthog-foss. It costs 98 tokens per session (2,230 once invoked), scanned A, original, MIT.

A local testing guide for staff-only MCP tools that support managed batch migrations. It covers starting the development environment, preparing databases and API access, and checking tool responses and discovery.

In plain words
What is it for?
Use it to test the managed-migrations support list and detail tools end to end, verify access scopes, run migrations, and troubleshoot local setup failures.
Why use it?
It helps explain why these tools may not appear or work during development, including missing staff access, API-key permissions, or unapplied migrations. MCP is a standard way for agents to use external tools.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it to test the managed-migrations support list and detail tools end to end, verify access scopes, run migrations, and troubleshoot local setup failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/posthog/posthog-foss/testing-mcp-tools-locally
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PostHog/posthog-foss --skill testing-mcp-tools-locally
Clone the repo
git clone --depth 1 https://github.com/PostHog/posthog-foss

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-mcp-tools-locally

README.md
[![agentmods](https://agentmods.dev/badge/skills/posthog/posthog-foss/testing-mcp-tools-locally/github.svg)](https://agentmods.dev/skills/posthog/posthog-foss/testing-mcp-tools-locally)
Your own site
<a href="https://agentmods.dev/skills/posthog/posthog-foss/testing-mcp-tools-locally"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/testing-mcp-tools-locally/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testing-mcp-tools-locally

Your own site · 80×15
<a href="https://agentmods.dev/skills/posthog/posthog-foss/testing-mcp-tools-locally"><img src="https://agentmods.dev/badge/skills/posthog/posthog-foss/testing-mcp-tools-locally.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,230 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00098 $0.02230
Opus 5.5 $0.00039 $0.00892
Sonnet 5.5 $0.00020 $0.00446
Haiku 4.5 $0.00010 $0.00223

Measured 2mo ago against content hash fc3aba4e6b81, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing-mcp-tools-locally scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -H "Authorization: Bearer <token>" \
.agents/skills/testing-mcp-tools-locally/SKILL.md · 219 lines

How it starts

The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing managed migrations MCP tools locally

Prerequisites

The dev environment must be running with Docker services healthy. The batch import support API and MCP tools require:

  • A staff user (is_staff = True)
  • A Personal API Key carrying both batch_import_support:read and user:read, explicitly
  • Postgres migrations applied (ClickHouse not required)

Why both scopes: the backend accepts batch_import_support:read alone, but MCP tool discovery verifies staffness via /api/users/@me/ and hides the tools (fail-closed) when the key cannot make that call. A * wildcard does not substitute for either — the discovery gate requires the hidden scope explicitly, and the backend's INTERNAL scope handling rejects wildcard keys outright. For the production setup flow, see docs/support-mcp-tools.md.

1. Start the dev environment

hogli start -d
hogli wait

If hogli wait fails on migrate-persons-db or migrate-behavioral-cohorts, those are optional separate databases — ignore them. If it fails on migrate-postgres, check Docker port forwarding (see troubleshooting below).

2. Run Postgres migrations

hogli migrations:run

ClickHouse migration failures are fine — batch imports only need Postgres.

3. Verify DB connectivity from the Django shell

hogli dev:shell-plus -y -- -c "
from posthog.models import Team, User
print(Team.objects.first(), User.objects.first())
"

If this fails with connection refused on port 5432, see troubleshooting below.

4. Seed batch import test data

Use hogli dev:shell-plus to create BatchImport records in various states. The secrets field is an EncryptedJSONStringField — empty {} serializes to null and violates the NOT NULL constraint; always pass a non-empty dict.

from products.managed_migrations.backend.models.batch_imports import BatchImport

BatchImport.objects.create(
    team=team,
    created_by_id=user.id,
    status=BatchImport.Status.PAUSED,
    import_config={
        'source': {'type': 's3', 'bucket': 'test', 'region': 'us-east-1', 'prefix': 'data/'},
        'data_format': {'type': 'json_lines', 'skip_blanks': True, 'content': {'type': 'mixpanel'}},
        'sink': {'type': 'capture'},
    },
    secrets={'access_key': 'test', 'secret_key': 'test'},
    state={'parts': [
        {'key': 'part-1', 'current_offset': 50000, 'total_size': 50000},
        {'key': 'part-2', 'current_offset': 10000, 'total_size': 50000},
        {'key': 'part-3'},
    ]},
)

Read the full file on GitHub · 219 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed fc3aba4e6b81
  2. 3mo ago First seen · 219 lines · 98 tokens per session scan A cf0cc10bd7ac

Subscribe to this mod's changes

testing-mcp-tools-locally is a skill published in the GitHub repository PostHog/posthog-foss (736 stars, last pushed today), licensed MIT. It adds 98 tokens to every session and 2,230 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

testing-mcp-tools-locally compared with skills from other repositories

testing-mcp-tools-locally next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
testing-mcp-tools-locallyPostHog/posthog-fossSkill736todayMITA98Claude Code, Codex
eval-dataset-designbojieli/ai-agent-bookSkill61k2d agoApache-2.0A138Claude Code, Codex
create-verification-skillYeachan-Heo/oh-my-claudecodeSkill41ktodayMITA45Claude Code
verify-omnigentomnigent-ai/omnigentSkill12ktodayApache-2.0A100Claude Code, Codex
test-masterJeffallan/claude-skillsSkill13ktodayMITA104Claude Code
dogfoodcallstack/agent-deviceSkill5.6ktodayMITA55Claude Code
cua-driverdavidondrej/skillsSkill4.4kyesterdayMITA68Claude Code, Codex