Skip to content

Commit 3606d18

Browse files
committed
Add copilot-research workflow for Firecrawl-powered issue research; update README
1 parent 69623b8 commit 3606d18

2 files changed

Lines changed: 66 additions & 0 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
on:
2+
issues:
3+
types: [opened, edited, reopened]
4+
5+
jobs:
6+
on-failure:
7+
runs-on: ubuntu-latest
8+
if: ${{ github.event.issue.state == 'open' && contains(github.event.issue.title, 'Research') }}
9+
steps:
10+
- uses: austenstone/copilot-cli-actions@main
11+
with:
12+
github-token: ${{ secrets.PAT }}
13+
mcp-config: |
14+
{
15+
"mcpServers": {
16+
"firecrawl": {
17+
"command": "npx",
18+
"args": ["-y", "firecrawl-mcp"],
19+
"env": {
20+
"FIRECRAWL_API_KEY": "${FIRECRAWL_API_KEY}"
21+
}
22+
}
23+
}
24+
}
25+
prompt: |
26+
## Role
27+
28+
You are a research assistant. Analyze the current GitHub issue and identify the research topic. Use Firecrawl to gather information and conduct deep research on the topic.
29+
30+
## Guidelines
31+
32+
1. **For discovering information:**
33+
- Use `firecrawl_search` when you don't know which websites contain the information
34+
- Use `firecrawl_map` to discover URLs on a specific website before scraping
35+
36+
2. **For extracting content:**
37+
- Use `firecrawl_scrape` for a single known URL
38+
- Use `firecrawl_batch_scrape` for multiple known URLs (more efficient than multiple scrapes)
39+
- Use `firecrawl_extract` when you need structured data (e.g., prices, names, specific details)
40+
41+
3. **For comprehensive coverage:**
42+
- Use `firecrawl_crawl` carefully with appropriate `limit` and `maxDepth` to avoid token overflow
43+
- Consider using `map` + `batch_scrape` for better control over large sites
44+
45+
4. **Best practices:**
46+
- Always use reliable and up-to-date sources
47+
- Provide summaries and key points from your research
48+
- Cite all sources with URLs
49+
- Use `onlyMainContent: true` to extract clean content
50+
- Enable `deduplicateSimilarURLs` for crawls to reduce redundancy
51+
52+
## Input Data
53+
```json
54+
${{ toJson(github.event) }}
55+
```
56+
57+
## Output Format
58+
59+
Generate a comprehensive Markdown research report and post it as a comment to: ${{ github.event.issue.html_url }}
60+
61+
The report should include:
62+
- Executive summary
63+
- Key findings with citations
64+
- Detailed analysis sections
65+
- Source URLs for all information
66+

README.md

3.08 KB

MCP Server Configuration

The action supports Model Context Protocol (MCP) servers for extending Copilot's capabilities:

The action supports Model Context Protocol (MCP) servers for extending Copilot's capabilities. Configure MCP servers using JSON format with an mcpServers object where each key is the server name and the value contains its configuration.

See the official MCP server configuration docs for complete details.

Required for all MCP servers:

  • type: Must be "local", "http", or "sse"
  • tools: Array of tool names to enable, or ["*"] to enable all tools

Local MCP Server Example

Local MCP servers (type: "local"):

  • command (required): The command to start the server
  • args (required): Array of arguments for the command
  • env (optional): Environment variables as key-value pairs.
mcp-config: |
  {
    "mcpServers": {
      "time": {
        "type": "local",
        "command": "uvx",
        "args": ["mcp-server-time", "--local-timezone", "America/New_York"],
        "env": {
          "API_KEY": "$COPILOT_MCP_TIME_API_KEY",
          "DEBUG": "true"
        },
        "tools": ["get_current_time", "convert_time"]
      },
      "filesystem": {
        "type": "local",
        "command": "npx",
        "args": ["-y", "@modelcontextprotocol/server-filesystem", "/workspace"],
        "tools": ["*"]
      }
    }
  }

Remote MCP Server Examples

Remote MCP servers (type: "http" or type: "sse"):

  • url (required): The server's URL
  • headers (optional): HTTP headers.
mcp-config: |
  {
    "mcpServers": {
      "context7": {
      "database-server": {
        "type": "http",
        "url": "https://mcp.context7.com/mcp",
        "url": "https://your-db-mcp-server.com",
        "headers": {
          "CONTEXT7_API_KEY": "$COPILOT_MCP_CONTEXT7_KEY"
          "Authorization": "Bearer ${{ secrets.DB_TOKEN }}"
        },
        "tools": ["get-library-docs", "resolve-library-id"]
        "tools": ["query_db", "update_schema"]
      },
      "sentry": {
        "type": "sse",
        "url": "https://mcp.sentry.io/sse",
      "context7": {
        "type": "http",
        "url": "https://mcp.context7.com/mcp",
        "headers": {
          "Authorization": "$COPILOT_MCP_SENTRY_TOKEN",
          "X-Organization": "my-org"
          "CONTEXT7_API_KEY": "YOUR_API_KEY"
        },
        "tools": ["search_issues", "get_issue_details"]
        "tools": ["get-library-docs", "resolve-library-id"]
      }
    }
  }

Default Copilot Configuration

{
  "banner": "never",
  "render_markdown": true,
  "theme": "auto",
  "trusted_folders": []
}

0 commit comments

Comments
 (0)