> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pre.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Supercharge your AI coding agents with enterprise-grade planning capabilities

<Note>
  **The pre.dev MCP Server replaces Cursor Plan Mode** with production-ready specification generation. Give your AI agents the architecture context they need to build complex systems correctly the first time.
</Note>

## Quick Start

<Steps>
  <Step title="Sign in to pre.dev">
    <Card title="pre.dev account" icon="user" href="https://pre.dev">
      Make sure you're signed in. The MCP install will open a browser tab to ask which account (solo or enterprise organization) to authorize.
    </Card>
  </Step>

  <Step title="Install the MCP Server">
    <Tabs>
      <Tab title="Claude Code">
        Run this in your terminal:

        ```bash theme={null}
        claude mcp add --transport http predev https://api.pre.dev/mcp
        ```

        A browser window opens — sign into pre.dev (if not already), pick which account or organization to authorize, and click **Approve**. Claude Code completes the handshake automatically.

        <Info>
          For troubleshooting, see the [Claude Code MCP documentation](https://docs.claude.com/en/docs/claude-code/mcp).
        </Info>
      </Tab>

      <Tab title="VS Code">
        Run this in your terminal:

        ```bash theme={null}
        code --add-mcp "{\"name\":\"predev\",\"url\":\"https://api.pre.dev/mcp\"}"
        ```

        Restart VS Code. On first tool use, VS Code opens a browser tab to authorize — pick which account or organization to connect.

        <Info>
          For troubleshooting, see the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers).
        </Info>
      </Tab>

      <Tab title="Cursor - One-Click">
        [        <img src="https://mintcdn.com/predev/QGgGjSdBFC0UiIuz/images/addtocursor.png?fit=max&auto=format&n=QGgGjSdBFC0UiIuz&q=85&s=f5a8169180abacd0934f02f68bf5c4ec" alt="Add to Cursor" width="337" height="78" data-path="images/addtocursor.png" />](cursor://anysphere.cursor-deeplink/mcp/install?name=predev\&config=eyJ1cmwiOiJodHRwczovL2FwaS5wcmUuZGV2L21jcCJ9)

        Click the button to install. On first tool use Cursor opens a browser tab to authorize — pick which pre.dev account or organization to connect.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Test the Integration">
    Open your AI coding agent and try this command:

    ```
    Use pre.dev to generate a spec for a task management app
    ```

    <Check>
      If successful, you'll receive a comprehensive project specification!
    </Check>
  </Step>
</Steps>

## Why Your AI Agent Needs pre.dev

AI coding agents like Cursor are powerful, but they struggle with complex, multi-file projects without proper architecture. **pre.dev solves this by generating comprehensive technical specifications that transform how your AI agent understands and builds systems.**

### The Problem with Current AI Planning

Standard AI planning modes (like Cursor Plan) provide basic task decomposition, but they:

* ❌ Lack deep architectural context
* ❌ Miss critical implementation details
* ❌ Don't consider database schemas, API contracts, or system boundaries
* ❌ Force you to manually guide complex builds step-by-step

### How pre.dev Makes Your AI Agent Better

The pre.dev MCP Server equips your AI coding agent with:

* ✅ **Enterprise-Grade Architecture:** Complete system designs with database schemas, API contracts, and component hierarchies
* ✅ **Implementation Roadmaps:** Detailed, sequenced build plans that guide your agent through complex projects
* ✅ **Technology Decisions:** Pre-made architectural choices for auth, state management, APIs, and more
* ✅ **Full Context Understanding:** Your agent knows exactly what to build, how to build it, and why

**Result:** Your AI agent goes from "helpful assistant" to "senior architect + developer" in seconds.

## Available Tools

<CardGroup cols={2}>
  <Card title="fast_spec" icon="bolt">
    **Cost:** \~5-10 credits (variable) | **Speed:** \~30-60 seconds

    Quick project specifications perfect for rapid prototyping and MVP planning.

    ```
    Use pre.dev fast_spec to generate a spec for:
    A social media app with real-time messaging,
    photo sharing, and user profiles
    ```
  </Card>

  <Card title="deep_spec" icon="microscope">
    **Cost:** \~10-50 credits (variable) | **Speed:** \~2-5 minutes

    Comprehensive, detailed specifications ideal for enterprise projects and complex systems.

    ```
    Use pre.dev deep_spec to generate a detailed spec for:
    An enterprise CRM with AI-powered lead scoring,
    automated workflows, and advanced analytics
    ```
  </Card>
</CardGroup>

## Advanced Features

<AccordionGroup>
  <Accordion title="Context Integration" icon="link">
    Build on existing work by referencing previous specs or projects:

    ```
    Use pre.dev deep_spec to add payment processing 
    to this existing project: [existing_context_id]
    ```

    The MCP will automatically:

    * Fetch your existing context
    * Validate permissions
    * Generate new specs that build on your previous work
  </Accordion>

  <Accordion title="Documentation Scraping & Archives" icon="book">
    Automatically scrape and archive external documentation alongside spec generation.

    Simply reference documentation URLs in your request:

    ```
    Use pre.dev deep_spec to generate a spec for a payment system 
    with Stripe integration. Reference https://stripe.com/docs/api
    ```

    **What you get:**

    * ✅ **Accurate Specs:** AI uses the documentation to generate precise integration specifications
    * ✅ **Documentation Archives:** Downloadable ZIP files containing all scraped documentation
    * ✅ **Organized by Platform:** Each documentation source gets its own well-structured archive
    * ✅ **Parallel Processing:** Documentation scraping runs simultaneously with spec generation (no slowdown)
    * ✅ **Graceful Fallback:** Spec generation completes even if documentation scraping fails

    **Enterprise users** can view and download documentation archives from the API Usage Logs in their dashboard.

    **Example with multiple docs:**

    ```
    Use pre.dev deep_spec to generate a healthcare platform spec 
    with HL7 FHIR integration and HIPAA compliance. 
    Reference https://docs.hl7.org and https://www.hhs.gov/hipaa
    ```

    You'll receive separate archives for HL7 and HIPAA documentation alongside your spec.
  </Accordion>
</AccordionGroup>

## Cost Management

<Info>
  **Check Your Usage:** Visit [pre.dev/projects/playground](https://pre.dev/projects/playground) to view remaining credits, usage history, and upgrade options.
</Info>

<Warning>
  **Out of Credits?**

  If you run out of credits, you'll see this message:

  ```
  ❌ Insufficient Credits Available
  You have insufficient credits to generate a spec.
  ```

  Visit the playground to upgrade your plan or purchase additional credits.
</Warning>

## Common Use Cases

<Tabs>
  <Tab title="Rapid Prototyping">
    Perfect for MVPs and quick validation:

    ```
    Use pre.dev fast_spec to generate a spec for: 
    MVP of a food delivery app with restaurant listings, 
    order tracking, and payment integration
    ```
  </Tab>

  <Tab title="Enterprise Planning">
    Detailed specs for complex systems:

    ```
    Use pre.dev deep_spec to generate a detailed spec for: 
    Enterprise data analytics platform with real-time 
    dashboards, multi-tenant architecture, and role-based access
    ```
  </Tab>

  <Tab title="Feature Addition">
    Extend existing projects:

    ```
    Use pre.dev deep_spec to add user authentication 
    and authorization to this existing e-commerce project
    ```
  </Tab>

  <Tab title="Technical Documentation">
    Generate comprehensive documentation:

    ```
    Use pre.dev deep_spec to generate technical documentation for: 
    Microservices architecture with Docker, Kubernetes, 
    and service mesh
    ```
  </Tab>
</Tabs>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication Failed" icon="triangle-exclamation">
    * Re-run `claude mcp add` (or the Cursor one-click) to redo the browser authorization
    * Make sure you're signed into the right pre.dev account in your browser before the consent page loads
    * If you're an enterprise admin, pick the correct organization on the consent page — each org has its own credit pool
    * Check that your subscription is active at [pre.dev/projects/playground](https://pre.dev/projects/playground)
  </Accordion>

  <Accordion title="Tool Not Found" icon="magnifying-glass">
    * Restart your editor after adding the MCP config
    * Verify the URL: `https://api.pre.dev/mcp`
    * Check JSON syntax in configuration
  </Accordion>
</AccordionGroup>
