Skip to content

MCP Servers

Model Context Protocol (MCP) is a standard for connecting tools to AI models. SWEny uses MCP to give Claude access to external services beyond the built-in skills — things like full GitHub repository search, Sentry issue analysis, or Slack channel history.

SWEny automatically injects the right MCP servers based on your configuration. You can also add custom servers for services SWEny doesn’t have built-in skills for.

When you configure a provider (source control, issue tracker, observability), SWEny checks whether that provider has a well-known MCP server and injects it automatically. No manual setup required.

These servers are injected when the corresponding provider is configured and the required credentials are present.

Provider configMCP server injectedTransportCredential
source-control-provider: github@modelcontextprotocol/server-githubstdioGITHUB_TOKEN
source-control-provider: gitlab@modelcontextprotocol/server-gitlabstdioGITLAB_TOKEN
issue-tracker-provider: linearLinear MCP (mcp.linear.app)HTTPLINEAR_API_KEY
issue-tracker-provider: jira@sooperset/mcp-atlassianstdioJIRA_URL + JIRA_EMAIL + JIRA_API_TOKEN
observability-provider: datadogDatadog MCP (mcp.datadoghq.com)HTTPDD_API_KEY + DD_APP_KEY
observability-provider: sentry@sentry/mcp-serverstdioSENTRY_AUTH_TOKEN
observability-provider: newrelicNew Relic MCP (mcp.newrelic.com)HTTPNEW_RELIC_API_KEY
observability-provider: betterstackBetterStack MCP (mcp.betterstack.com)HTTPBETTERSTACK_API_TOKEN

These servers require explicit opt-in via the workspace-tools action input (or --workspace-tools CLI flag). They are injected only when both the opt-in is present and the required credential is set.

Workspace toolMCP server injectedTransportCredential
slack@modelcontextprotocol/server-slackstdioSLACK_BOT_TOKEN
notion@notionhq/notion-mcp-serverstdioNOTION_TOKEN
pagerdutyPagerDuty MCP (mcp.pagerduty.com)HTTPPAGERDUTY_API_TOKEN
monday@mondaydotcomorg/monday-api-mcpstdioMONDAY_TOKEN
asanaasana-mcpstdioASANA_ACCESS_TOKEN

Enable workspace tools in the GitHub Action:

- uses: swenyai/triage@v1
with:
workspace-tools: "slack,notion"
# ... other inputs
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}

Or in the CLI:

Terminal window
sweny triage --workspace-tools slack,notion

For services without built-in support, pass custom MCP servers via the mcp-servers-json action input (JSON string) or CLI config.

- uses: swenyai/triage@v1
with:
mcp-servers-json: |
{
"my-database": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@my-org/db-mcp-server"],
"env": { "DATABASE_URL": "${{ secrets.DATABASE_URL }}" }
}
}

Each server is a key-value pair where the key is a name and the value is an McpServerConfig:

{
"server-name": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@some-org/mcp-server@latest"],
"env": { "API_KEY": "..." }
}
}

For HTTP transport (preferred for performance when available):

{
"server-name": {
"type": "http",
"url": "https://mcp.example.com/mcp",
"headers": { "Authorization": "Bearer ..." }
}
}

Fields:

FieldTypeDescription
type"stdio" or "http"Transport protocol
commandstringExecutable to run (stdio only)
argsstring[]Arguments to pass (stdio only)
urlstringServer endpoint (HTTP only)
headersobjectHTTP headers (HTTP only)
envobjectEnvironment variables passed to the process (stdio only)

If a custom server has the same key as an auto-injected server, the custom server wins. This lets you override auto-injection when you need a specific version or configuration:

mcp-servers-json: |
{
"github": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github@0.6.0"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ secrets.GH_TOKEN }}" }
}
}

This replaces the auto-injected GitHub MCP server with a pinned version.

The buildAutoMcpServers() function in @sweny-ai/core takes the current provider configuration and credentials, builds the auto-injection map, then merges user-supplied servers on top:

auto-injected servers (from provider config)
+ workspace tool servers (from workspace-tools input)
+ user-supplied servers (from mcp-servers-json input) ← wins on conflict
= final MCP server map passed to Claude Code

The merged map is passed to the Claude Code SDK’s query() function as the mcpServers option. Claude Code manages the MCP server lifecycle — starting stdio processes, connecting to HTTP endpoints, and routing tool calls.