Workshops ... Part 10: Use the FAQ server from Cursor

Part 10: Use the FAQ server from Cursor

Once the FAQ tools are behind MCP, the client does not have to be your notebook. Cursor can use the same server while generating code.

Create a project-specific Cursor config at .cursor/mcp.json. If you want Cursor to start the server with stdio, use a command config:

{
  "mcpServers": {
    "faqmcp": {
      "command": "uv",
      "args": [
        "run",
        "--project", "mcp_faq",
        "python",
        "mcp_faq/main.py"
      ]
    }
  }
}

If the server is already running with SSE, use a URL config instead:

{
  "mcpServers": {
    "faqmcp": {
      "url": "http://localhost:8000/sse"
    }
  }
}

The SSE version is a convenient setup here. Cursor detects the server and shows the two tools after it connects.

If Cursor does not ask to enable the server, open Cursor settings, go to MCP and integrations, find the server, and enable it.

Try FAQ-aware prompts

Use prompts that explicitly tell Cursor to consult the FAQ before coding:

Write code for module 1, check the FAQ for requirements

Use a more concrete prompt when you want Cursor to research first:

Implement Kafka connection with Python. Use FAQ to do comprehensive research first and then explain your choices.

Cursor can call the FAQ MCP server, find course guidance about Kafka, and use the course-recommended Python Kafka library in the generated code.

This FAQ server is a small teaching example. The more useful version in real projects is documentation search. If a framework changes after the model is trained, an MCP server over the current docs gives Cursor fresher information than the model has by default.

Context7 and documentation search

Context7 is an example of this documentation pattern. It indexes documentation for frameworks and exposes it through MCP so coding agents can consult current docs while writing code.

The course version builds a similar idea for Evidently documentation. The same pieces apply:

  • Parse or crawl documentation
  • Index it for retrieval
  • Expose search as an MCP tool
  • Add the MCP server to Cursor or another coding agent

DeepWiki is a related idea for GitHub repositories. The same idea applies: index a knowledge source, make it searchable for the agent, and route the agent through a tool instead of relying only on training data.

Add the server to VS Code

For VS Code, use this .vscode/mcp.json shape:

{
  "servers": {
    "faq-mcp": {
      "type": "http",
      "url": "http://127.0.0.1:8000/sse"
    }
  }
}

Microsoft documents this shape in the VS Code MCP servers guide.

Start the FastMCP server first:

cd mcp_faq
uv run python main.py

Then open the project in VS Code and let Copilot connect to the server. At that point the same search and add_entry tools are available to the IDE.

Project and global MCP config

Cursor can use MCP servers at different scopes. A project-specific .cursor/mcp.json keeps this FAQ server attached only to the workshop project. A global config makes a server available across projects.

For a course FAQ, project-specific config is usually safer. For a common tool like Docker, Postgres, or framework docs, global config can be more convenient.

Questions & Answers (0)

Sign in to ask questions