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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://mcp-use.com/docs/feedback

```json
{
  "path": "/home/index",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Welcome

export const SimpleSplitCard = ({imgDark, imgLight, title, description, leftHref, rightHref, leftLogo, rightLogo, leftLabel = "Typescript", rightLabel = "Python", className, imgAlt}) => {
  return <div className={`bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-2xl flex flex-col overflow-hidden ${className || ""}`}>
      <div className="relative group overflow-hidden">
        {}
        <img src={imgLight} alt={imgAlt || title} noZoom className="w-full h-48 object-cover group-hover:scale-105 group-hover:blur-lg block dark:hidden" />
        {}
        <img src={imgDark} alt={imgAlt || title} noZoom className="w-full h-48 object-cover group-hover:scale-105 group-hover:blur-lg hidden dark:block" />
        <div className="absolute inset-0 opacity-0 group-hover:opacity-100">
          <div className="grid grid-cols-2 h-full">
            <a href={leftHref} className="flex items-center justify-center bg-black/20 hover:bg-black/50" aria-label={leftLabel}>
              <img noZoom src={leftLogo} alt={leftLabel} className="h-10 w-10 filter grayscale" />
            </a>
            <a href={rightHref} className="flex items-center justify-center bg-black/20 hover:bg-black/50" aria-label={rightLabel}>
              <img noZoom src={rightLogo} alt={rightLabel} className="h-10 w-10 filter grayscale" />
            </a>
          </div>
        </div>
      </div>
      <div className="p-4 flex-grow flex flex-col">
        <h3 className="font-semibold text-zinc-900 dark:text-zinc-100">{title}</h3>
        <p className="text-zinc-600 dark:text-zinc-400 text-sm mt-1 flex-grow">{description}</p>
        <div className="mt-4 flex items-center justify-between text-sm">
          <a href={leftHref} className="flex items-center text-zinc-500 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white group">
            <img noZoom src={leftLogo} alt={leftLabel} className="h-5 w-5 mr-2 filter grayscale group-hover:grayscale-0 transition-all duration-200" />
            <span>{leftLabel}</span>
          </a>
          <a href={rightHref} className="flex items-center text-zinc-500 hover:text-zinc-900 dark:text-zinc-300 dark:hover:text-white group">
            <img noZoom src={rightLogo} alt={rightLabel} className="h-5 w-5 mr-2 filter grayscale group-hover:grayscale-0 transition-all duration-200" />
            <span>{rightLabel}</span>
          </a>
        </div>
      </div>
    </div>;
};

<div style={{display: 'none'}}>
  > For the complete documentation index, see [llms.txt](https://manufact.com/docs/llms.txt).
</div>

<div className="px-4 py-8 mt-24 lg:pb-24 max-w-5xl mx-auto">
  <div className="text-center">
    <img noZoom src="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/logo/light.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=81637706df88c2bacf4c63c6c739b257" className="block dark:hidden mx-auto h-16 w-auto" alt="mcp_use" width="2476" height="480" data-path="logo/light.svg" />

    <img noZoom src="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/logo/dark.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=4b3e46903bada69d9bd25afbfd475880" className="hidden dark:block mx-auto h-16 w-auto" alt="mcp_use" width="2476" height="480" data-path="logo/dark.svg" />
  </div>

  <p className="max-w-2xl mx-auto px-4 mt-6 text-center">
    <p className="text-xl">The fullstack MCP framework</p>
    <p className="mt-3">Build <b>MCP Apps</b> for ChatGPT / Claude and <b>MCP Servers</b> for AI Agents — in <b>TypeScript</b> and <b>Python</b>.</p>
  </p>

  <div className="mt-10 grid sm:grid-cols-3 gap-4 max-w-2xl mx-auto text-center text-sm">
    <div><b>Build</b><br /><span className="text-zinc-500">with the mcp-use SDK</span></div>
    <div><b>Preview</b><br /><span className="text-zinc-500">with the MCP Inspector</span></div>
    <div><b>Deploy</b><br /><span className="text-zinc-500">to production in one command</span></div>
  </div>

  <div className="px-6 lg:px-0 mt-14 grid sm:grid-cols-2 gap-x-6 gap-y-6">
    <SimpleSplitCard imgDark="https://cdn.mcp-use.com/docs/server.jpg" imgLight="https://cdn.mcp-use.com/docs/server_white.png" title="Build an MCP Server" description="Expose tools, resources, and prompts to any AI agent." leftHref="/typescript/server/index" rightHref="/python/server/index" leftLogo="https://cdn.mcp-use.com/docs/typescriptlogo.svg" rightLogo="https://cdn.mcp-use.com/docs/pythonlogo.svg" />

    <SimpleSplitCard imgDark="https://cdn.mcp-use.com/docs/agent.jpg" imgLight="https://cdn.mcp-use.com/docs/agent_white.png" title="Build an MCP App" description="Interactive widgets that run in Claude, ChatGPT, and any MCP client." leftHref="/typescript/server/mcp-apps" rightHref="/python/server/mcp-apps" leftLogo="https://cdn.mcp-use.com/docs/typescriptlogo.svg" rightLogo="https://cdn.mcp-use.com/docs/pythonlogo.svg" />
  </div>
</div>

<div className="max-w-5xl mx-auto px-6">
  ## Quickstart

  <Tabs>
    <Tab title="TypeScript">
      ```bash theme={null}
      npx create-mcp-use-app@latest
      ```

      Or create a server manually:

      ```typescript theme={null}
      import { MCPServer, text } from "mcp-use/server";
      import { z } from "zod";

      const server = new MCPServer({
        name: "my-server",
        version: "1.0.0",
      });

      server.tool({
        name: "get_weather",
        description: "Get weather for a city",
        schema: z.object({ city: z.string() }),
      }, async ({ city }) => {
        return text(`Temperature: 72°F, Condition: sunny, City: ${city}`);
      });

      await server.listen(3000);
      // Inspector at http://localhost:3000/inspector
      ```

      <Card title="Full TypeScript Server Documentation" icon="arrow-right" href="/typescript/server/index" horizontal />
    </Tab>

    <Tab title="Python">
      ```bash theme={null}
      pip install mcp-use
      ```

      ```python theme={null}
      from typing import Annotated
      from mcp.types import ToolAnnotations
      from pydantic import Field
      from mcp_use import MCPServer

      server = MCPServer(name="Weather Server", version="1.0.0")

      @server.tool(
          name="get_weather",
          description="Get current weather information for a location",
          annotations=ToolAnnotations(readOnlyHint=True, openWorldHint=True),
      )
      async def get_weather(
          city: Annotated[str, Field(description="City name")],
      ) -> str:
          return f"Temperature: 72°F, Condition: sunny, City: {city}"

      server.run(transport="streamable-http", port=8000)
      # Inspector at http://localhost:8000/inspector
      ```

      <Card title="Full Python Server Documentation" icon="arrow-right" href="/python/server/index" horizontal />
    </Tab>
  </Tabs>

  ## MCP Apps

  MCP Apps let you build interactive widgets that work across Claude, ChatGPT, and other MCP clients — write once, run everywhere.

  ```typescript theme={null}
  import { MCPServer, widget } from "mcp-use/server";
  import { z } from "zod";

  const server = new MCPServer({ name: "weather-app", version: "1.0.0" });

  server.tool({
    name: "get-weather",
    description: "Get weather for a city",
    schema: z.object({ city: z.string() }),
    widget: "weather-display", // references resources/weather-display/widget.tsx
  }, async ({ city }) => {
    return widget({
      props: { city, temperature: 22, conditions: "Sunny" },
      message: `Weather in ${city}: Sunny, 22°C`,
    });
  });

  await server.listen(3000);
  ```

  Widgets in `resources/` are **auto-discovered** — no manual registration needed.

  <CardGroup cols={2}>
    <Card title="MCP Apps Guide" icon="app-window-mac" href="/typescript/server/mcp-apps">
      Build widgets with React, auto-discovery, and client-side hooks.
    </Card>

    <Card title="ChatGPT Apps Flow" icon="message-square" href="/guides/chatgpt-apps-flow">
      Step-by-step: ship an MCP App to ChatGPT.
    </Card>
  </CardGroup>

  ## Templates

  Ready-to-use MCP Apps and Servers you can deploy in one click or remix as your own.

  <CardGroup cols={3}>
    <Card title="Chart Builder" icon="chart-column" href="https://github.com/mcp-use/mcp-chart-builder">
      Natural-language chart generation.
    </Card>

    <Card title="Diagram Builder" icon="sitemap" href="https://github.com/mcp-use/mcp-diagram-builder">
      Conversational diagramming.
    </Card>

    <Card title="Widget Gallery" icon="grid" href="https://github.com/mcp-use/mcp-widget-gallery">
      Reference patterns for every widget type.
    </Card>
  </CardGroup>

  <Card title="Browse all templates" icon="layout-template" href="/home/templates" horizontal>
    Full gallery with demo URLs and one-click deploy buttons.
  </Card>

  ## Inspector

  Test and debug your MCP servers interactively. The Inspector is **auto-included** in every server:

  ```typescript theme={null}
  server.listen(3000);
  // Inspector at http://localhost:3000/inspector
  ```

  Or use the hosted inspector at [inspector.mcp-use.com](https://inspector.mcp-use.com), or standalone:

  ```bash theme={null}
  npx @mcp-use/inspector --url http://localhost:3000/mcp
  ```

  <Card title="Inspector Documentation" icon="bug-play" href="/inspector/index" horizontal />

  ## Deploy

  Ship to production in one command:

  ```bash theme={null}
  npx @mcp-use/cli login
  npx @mcp-use/cli deploy
  ```

  Or connect a GitHub repo on [manufact.com](https://manufact.com) — production-ready with observability, metrics, logs, and branch deployments.

  ## Also: MCP Agent & MCP Client

  mcp-use is fullstack. Alongside MCP Servers and MCP Apps, it ships a full **MCP Agent** and **MCP Client** implementation.

  <AccordionGroup>
    <Accordion title="MCP Agent — Build AI agents that use MCP servers" icon="brain">
      Connect any LLM (OpenAI, Anthropic, Google, LangChain) to any MCP server.

      ```python theme={null}
      from langchain_openai import ChatOpenAI
      from mcp_use import MCPAgent, MCPClient

      client = MCPClient.from_dict({ "mcpServers": { "fs": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] } } })
      agent = MCPAgent(llm=ChatOpenAI(model="gpt-4o"), client=client)
      result = await agent.run("List all files in the directory")
      ```

      <CardGroup cols={2}>
        <Card title="Python Agent" icon="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/images/pythonlogo.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=c7e14bf0a4c75ce1e6cd1187fe39913b" href="/python/agent/agent-configuration" width="110" height="110" data-path="images/pythonlogo.svg" />

        <Card title="TypeScript Agent" icon="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/images/typescriptlogo.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=42b7b5880c4065c7532afa4a000d6fc0" href="/typescript/agent/index" width="512" height="512" data-path="images/typescriptlogo.svg" />
      </CardGroup>
    </Accordion>

    <Accordion title="MCP Client — Connect to any MCP server programmatically" icon="router">
      Fully spec-compliant: tools, resources, prompts, sampling, elicitation, logging, notifications.

      ```typescript theme={null}
      import { MCPClient } from "mcp-use";
      const client = new MCPClient({ mcpServers: { calculator: { command: "npx", args: ["-y", "@modelcontextprotocol/server-everything"] } } });
      await client.createAllSessions();
      const result = await client.getSession("calculator").callTool("add", { a: 5, b: 3 });
      ```

      <CardGroup cols={2}>
        <Card title="Python Client" icon="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/images/pythonlogo.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=c7e14bf0a4c75ce1e6cd1187fe39913b" href="/python/client/client-configuration" width="110" height="110" data-path="images/pythonlogo.svg" />

        <Card title="TypeScript Client" icon="https://mintcdn.com/mcpuse/C8kWie3B44RcXcXB/images/typescriptlogo.svg?fit=max&auto=format&n=C8kWie3B44RcXcXB&q=85&s=42b7b5880c4065c7532afa4a000d6fc0" href="/typescript/client/index" width="512" height="512" data-path="images/typescriptlogo.svg" />
      </CardGroup>
    </Accordion>
  </AccordionGroup>

  ## Learn More

  <CardGroup cols={2}>
    <Card title="MCP 101" icon="brain" href="/home/mcp101">
      Principles of MCP: hosts, clients, servers, and the three primitives.
    </Card>

    <Card title="Examples on GitHub" icon="github" href="https://github.com/mcp-use/mcp-use/tree/main/examples">
      Runnable samples for Python and TypeScript.
    </Card>

    <Card title="Join the Discord" icon="discord" href="https://discord.gg/XkNkSkMz3V">
      Chat with the community and the team.
    </Card>

    <Card title="Report an Issue" icon="github" href="https://github.com/mcp-use/mcp-use/issues">
      Bugs, feature requests, and questions.
    </Card>
  </CardGroup>
</div>
