Precogly MCP

Precogly MCP

MCP server for Precogly threat modeling, enabling users to integrate threat modeling capabilities into AI assistants.

Category
Visit Server

README

Precogly MCP

MCP server for Precogly threat modeling.

Status

Early. One tool, read-only:

  • list_threat_models — threat models in the caller's organizations, most recently updated first. Returns the first page of twenty and cannot page past it.

Authentication is not finished. The server forwards a bearer token it does not own and never mints; today that token is a Precogly access token with a 60-minute lifetime, which is fine for development and cannot drive anything unattended. 0003 records what replaces it and why.

Configuration

Two environment variables, both read by the server process:

PRECOGLY_TOKEN Bearer token for the Precogly API. Required.
PRECOGLY_URL Base URL of the deployment. Defaults to http://localhost:8000.

Against a locally seeded instance, a token comes from the login endpoint:

export PRECOGLY_URL=http://localhost:8000
export PRECOGLY_TOKEN=$(curl -s -X POST "$PRECOGLY_URL/api/auth/login/" \
  -H 'Content-Type: application/json' \
  -d '{"email":"admin@precogly.dev","password":"admin123"}' \
  | python3 -c "import sys,json;print(json.load(sys.stdin)['access'])")

Running it

The server speaks stdio. Either entry point works:

uv run precogly-mcp                  # console script
uv run python -m precogly_mcp.server # equivalent

Under the MCP Inspector, for poking at schemas by hand. --with-editable . is required — mcp dev runs the file in an ephemeral environment containing only mcp, so without it nothing in this package imports:

uv run mcp dev src/precogly_mcp/server.py --with-editable .

Connecting a client

Any MCP client that can launch a local stdio server. For opencode, an opencode.json in the project root, with the token interpolated rather than written in:

{
  "mcp": {
    "precogly": {
      "type": "local",
      "command": ["uv", "run", "python", "-m", "precogly_mcp.server"],
      "enabled": true,
      "environment": {
        "PRECOGLY_TOKEN": "{env:PRECOGLY_TOKEN}",
        "PRECOGLY_URL": "{env:PRECOGLY_URL}"
      }
    }
  }
}

Development

This project uses uv for dependencies and tooling.

uv sync                    # create .venv and install deps + dev tools
uv run pytest              # run tests
uv run ruff check .        # lint
uv run ruff format .       # format
uv run mypy src            # type-check (strict)
uv run pip-audit           # scan dependencies for CVEs

Install the git hooks once:

uv run pre-commit install

Tests need no running Precogly. mcp.client.Client drives the server over in-memory streams, so tools/list and tools/call are exercised as a client sees them, and httpx2.MockTransport stands in for the API.

Design

  • 0001 — service token model (partially superseded by 0003)
  • 0002 — tool implementation order
  • 0003 — Precogly is the authorization server
  • 0004 — where the user authorizes

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured