FRC MCP Server

FRC MCP Server

Give your AI coding agent full access to FRC robot code, WPILib docs, and vendor library context — right inside VS Code.

MCP Endpoint → https://frc-mcp-server.vercel.app/mcp

What is this MCP server?

This is a Model Context Protocol (MCP) server. It lets AI assistants — like GitHub Copilot, Claude, or Cursor — read and search your team's robot source code and FRC/WPILib documentation directly, without you having to paste snippets manually.

Once connected, your agent can look up constants, subsystem logic, autonomous routines, WPILib APIs, and vendor library patterns just by asking natural language questions.

🤖

Robot Code Context

Indexed Java source files — subsystems, commands, constants, and more.

📚

WPILib Docs

Official FRC documentation.

🔧

Vendor Libraries

REV, CTRE, PathPlanner, PhotonVision snippets and config patterns your robot actually uses.

Available MCP Tools

The server exposes three tools that your agent can call automatically:

Tool What it does
list_frc_sources Lists all indexed files grouped by directory. Use this first to discover what context is available.
search_frc_context Full-text search across all robot code and docs. Returns ranked snippets with surrounding context.
get_frc_file Reads a complete file or a specific line range. Perfect for examining exact code or configuration details.

How to use in VS Code

VS Code supports MCP servers natively through GitHub Copilot's agent mode (VS Code 1.99+). Follow these steps:

  1. Open (or create) your workspace MCP config

    Create the file .vscode/mcp.json in your project root, or open it if it already exists. This file tells VS Code which MCP servers to load.

  2. Add the frc-mcp-server MCP server entry

    Paste the following into .vscode/mcp.json:

    {
      "servers": {
        "mcp-frc-server": {
          "type": "http",
          "url": "https://frc-mcp-server.vercel.app/mcp"
        }
      }
    }

    If you already have other servers in the file, add the "frc-mcp-server" entry alongside them inside the "servers" object.

  3. Enable agent mode in Copilot Chat

    Open the Copilot Chat panel (Ctrl+Alt+I) and switch the chat mode dropdown from Ask to Agent. The server will be listed under the Tools icon in the chat toolbar.

  4. Verify the connection

    In Agent mode, type the prompt below and confirm the agent calls list_frc_sources and returns a file tree:

    List the available FRC context sources.
Tip: You can also add the server globally (for all projects) via File → Preferences → Settings, search for "MCP", and add the entry there under github.copilot.chat.mcp.servers.

How to prompt agents effectively

The agent will automatically decide when to call MCP tools based on your question. Here are proven prompting patterns that get the best results:

🔍 Discovery prompts

Start here when you first connect or want to explore what's available:

"List all available FRC context sources so I know what robot code and docs are indexed."
"Search the FRC context for everything related to swerve drive odometry."

💡 Code question prompts

Ask about specific classes, constants, or subsystems:

"Using the team's robot code context, explain how the shooter subsystem is tuned — what are the PID constants and feed-forward values?"
"Find all usages of AutoBuilder in the robot code and explain how autonomous routines are structured."
"What swerve drive library does this robot use? Show me the relevant configuration constants."

✍️ Code generation prompts

Ask the agent to write new code that matches your team's existing style:

"Using the team's existing subsystem patterns from the robot code context, write a new Intake subsystem with a SparkMAX motor that runs at 80% speed when a button is held."
"Based on how other commands are structured in the robot code, create a new sequential command group for scoring in the amp."

📖 Docs & reference prompts

"Look up the WPILib docs for ProfiledPIDController and show me how to configure motion constraints."
"Search the FRC docs for how to use PathPlanner's on-the-fly path generation."

Best practices

FAQ

What is an MCP server?

MCP (Model Context Protocol) is an open standard developed by Anthropic that lets AI assistants connect to external tools, databases, and services in a structured way.

Think of it like a plugin system for AI agents. Instead of you copy-pasting code snippets into chat, an MCP server exposes tools the AI can call programmatically — searching files, reading documentation, querying databases, and more.

MCP is now supported by VS Code (Copilot), Claude Desktop, Cursor, Windsurf, and other AI coding tools. Any MCP-compatible agent can connect to any MCP server using a standard HTTP or stdio transport.

Why use an MCP server instead of pasting code into chat?

Pasting code manually is slow, error-prone, and limited by chat window size. An MCP server lets the agent search on demand — it only fetches the snippets relevant to your question, so responses stay focused and accurate.

It also means context is always up-to-date: when the robot code changes and the server is redeployed, every agent automatically sees the latest version.

Which AI tools support MCP?

Tools with MCP support (HTTP transport) include:

  • VS Code with GitHub Copilot (v1.99+, Agent mode)
  • Claude Desktop (Anthropic)
  • Cursor
  • Windsurf (Codeium)
  • Any tool that implements the MCP client spec
The agent isn't calling MCP tools — what's wrong?

Common fixes:

  • Make sure you're in Agent mode (not Ask or Edit) in Copilot Chat.
  • Check that .vscode/mcp.json is saved and the URL is correct.
  • Reload VS Code after changing the MCP config (Ctrl+Shift+PReload Window).
  • Look for the Tools icon in the chat toolbar — the server should appear there.
  • Try explicitly asking: "Use the frc-mcp-server MCP tools to list sources."