Sketch out MCP

This commit is contained in:
Sean Goedecke
2025-07-15 23:23:39 +00:00
parent 75eeed10d7
commit 0b82ac474e
8 changed files with 15531 additions and 220 deletions
+41 -10
View File
@@ -80,21 +80,52 @@ steps:
cat "${{ steps.inference.outputs.response-file }}"
```
### GitHub MCP Integration (Model Context Protocol)
This action now supports integration with the GitHub-hosted Model Context
Protocol (MCP) server, which provides access to GitHub tools like repository
management, issue tracking, and pull request operations.
```yaml
steps:
- name: AI Inference with GitHub Tools
id: inference
uses: actions/ai-inference@v1
with:
prompt: 'List my open pull requests and create a summary'
enable-mcp: true
mcp-server-url: 'https://github-mcp-server.fly.dev/mcp' # Optional, this is the default
```
When MCP is enabled, the AI model will have access to GitHub tools and can
perform actions like:
- Listing and managing repositories
- Creating, reading, and updating issues
- Managing pull requests
- Searching code and repositories
- And more GitHub operations
**Note:** MCP integration requires appropriate GitHub permissions for the
operations the AI will perform.
## Inputs
Various inputs are defined in [`action.yml`](action.yml) to let you configure
the action:
| Name | Description | Default |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| `token` | Token to use for inference. Typically the GITHUB_TOKEN secret | `github.token` |
| `prompt` | The prompt to send to the model | N/A |
| `prompt-file` | Path to a file containing the prompt. If both `prompt` and `prompt-file` are provided, `prompt-file` takes precedence | `""` |
| `system-prompt` | The system prompt to send to the model | `"You are a helpful assistant"` |
| `system-prompt-file` | Path to a file containing the system prompt. If both `system-prompt` and `system-prompt-file` are provided, `system-prompt-file` takes precedence | `""` |
| `model` | The model to use for inference. Must be available in the [GitHub Models](https://github.com/marketplace?type=models) catalog | `gpt-4o` |
| `endpoint` | The endpoint to use for inference. If you're running this as part of an org, you should probably use the org-specific Models endpoint | `https://models.github.ai/inference` |
| `max-tokens` | The max number of tokens to generate | 200 |
| Name | Description | Default |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| `token` | Token to use for inference. Typically the GITHUB_TOKEN secret | `github.token` |
| `prompt` | The prompt to send to the model | N/A |
| `prompt-file` | Path to a file containing the prompt. If both `prompt` and `prompt-file` are provided, `prompt-file` takes precedence | `""` |
| `system-prompt` | The system prompt to send to the model | `"You are a helpful assistant"` |
| `system-prompt-file` | Path to a file containing the system prompt. If both `system-prompt` and `system-prompt-file` are provided, `system-prompt-file` takes precedence | `""` |
| `model` | The model to use for inference. Must be available in the [GitHub Models](https://github.com/marketplace?type=models) catalog | `gpt-4o` |
| `endpoint` | The endpoint to use for inference. If you're running this as part of an org, you should probably use the org-specific Models endpoint | `https://models.github.ai/inference` |
| `max-tokens` | The max number of tokens to generate | 200 |
| `enable-mcp` | Enable Model Context Protocol integration with GitHub tools | `false` |
| `mcp-server-url` | URL of the MCP server to connect to for GitHub tools | `https://github-mcp-server.fly.dev/mcp` |
## Outputs