Overview
Model Context Protocol (MCP) lets Gitar connect to external tools and data sources. An MCP server provides the tools Gitar can call, such as searching internal documentation or updating an issue. Register your own MCP server and Gitar’s rules and agents get its tools while reviewing pull requests and running automations, alongside the built-in integrations like Jira, Linear, and Slack.Remote MCP Servers
Connect a server that supports Streamable HTTP over HTTPS.
Skills for Guidance
For instructions with no server, commit a skill under
.gitar/skills/.Use in Rules
Name the integration in a rule and the agent picks it up.
Secrets
API tokens are stored securely, per organization.
Custom integrations are an Enterprise feature, with unlimited MCP connections.
Before you start
You need an organization admin role in Gitar and an Enterprise plan. See Plans for details. Have the server’s complete MCP endpoint URL, any required authentication headers, and the names of the tools you want Gitar to use. The endpoint must support Streamable HTTP and be reachable from Gitar over public HTTPS. To verify a tool from a PR comment, use a repository connected to Gitar and a PR where you have write access. Choose a test resource that the server’s credentials can access.Connect engineering knowledge
Custom integrations make internal documentation and enterprise tools available to Gitar’s agents and rules. They extend the knowledge sources Gitar can consult during a review. Configure the tools and credentials each connection needs. A documentation search tool can supply a design decision, while a workflow can use an issue tracker tool to record the follow-up work.How It Works
A custom integration is an MCP server. Give Gitar its https URL and the agent gets your server’s tools. Gitar derives a new integration’s name and description from the endpoint host. Add authentication headers if the server requires them, and optionally limit which tools Gitar can use. For guidance with no server, commit a repo skill instead. A skill is versioned with the code it describes, where an org-level setting is not. An integration saved without an endpoint, from before the URL became required, still loads. Give it an endpoint or delete it.Add a Custom Integration
1
Open the Integrations settings
In the Gitar dashboard, go to your organization’s Settings → Integrations, find Custom MCP servers at the bottom, and click Add MCP server.
2
Point Gitar at your MCP server
Enter the MCP server URL, for example
https://mcp.example.com/mcp. It must use https and name a public host. A URL carrying credentials, a query string, a bare IP, or an internal hostname is rejected, and the dialog says why.Use the complete MCP endpoint, such as https://mcp.example.com/mcp, rather than the service’s home page. URL fragments are also rejected.The name comes from the host, so https://mcp.acme.com/mcp becomes Acme. Tool descriptions come from your server.3
Add credentials
A credential reaches your server as an HTTP header. Leave Authentication on None if the server needs none, or pick Auth header and fill in one row.A row is a header name and its value. It starts as
Authorization, and the value is whatever your server expects there, prefix included, so a bearer token goes in as Bearer sk-....Click Add Header for each additional header your server requires. For an X-API-Key header, enter the API key as its value without a Bearer prefix unless the server requires one.Gitar stores the value securely and never reads it back into the form. Editing a server shows it as Unchanged, so type a new one only to rotate it. Never put a credential in the URL.4
Narrow the allowed tools (optional)
Leave Allowed Tools empty and the agent gets every tool your server advertises. Name tools there to narrow it to those, spelled exactly as your server advertises them.Click Add Tool for each allowed tool and enter its exact name, such as
search_docs. Get the names from the server’s documentation. Gitar does not populate a tool picker.Narrowing is how you withhold a tool. The dialog warns before you save a server narrowed to nothing.5
Create the integration
Click Create. The integration appears on your Integrations page and can be enabled or disabled at any time.New integrations are enabled when created. Saving the integration stores its configuration. Use Test connection to check whether Gitar can connect and discover tools.
Verify the connection
On the saved integration’s card, click Test connection. If you edited the configuration, click Save Changes first. A successful result shows Connected, the number of tools advertised by the server, and the number allowed by the saved filter. If no tools are allowed, check the tool names and filter before continuing. This check initializes the MCP connection and lists tools. It does not call a tool or verify access to a particular document, project, or record.Verify a tool from a PR
Choose an allowed read-only tool and a test resource with a known result. In a PR comment, name the integration exactly as it appears on its card, identify the tool and resource, and specify what Gitar should return. For example:Gitar, use the Acme integration’s search_docs tool to find the document titled ‘MCP verification’. Return its title and link. Do not create or update anything.Replace
Acme, search_docs, and MCP verification with your integration name, tool name, and test document title.
Confirm that the returned title and link match the test document. If available, check the MCP server’s request logs to confirm the tool call. Test write tools separately on an approved test resource and verify the change in the destination system.
Using a Custom Integration in Rules
Once an integration is enabled it is available to every rule. Name it in the rule and the agent uses it, the same way it handles Jira, Linear, or Slack:.gitar/rules/internal-docs.md. Replace Acme Search with the integration name shown on its card, then commit the rule to a repository connected to Gitar.
Plain language is enough. Use the integration’s name and say what you want.
See Repository Rules for the full rule format, and Skills for the no-server alternative.
Managing Integrations
To enable or disable a connection, click Edit, change Enabled, and click Save Changes.
To rotate a credential, enter its replacement value in Edit, keep any required prefix, and click Save Changes. Leave an Unchanged value blank to retain the stored credential. Repeat Test connection afterward.
To delete a connection, click Edit → Delete → Confirm. Deleting the connection does not revoke its credential at the provider. Revoke that credential separately when it is no longer needed.
Best practices
- Start with a read-only tool and a known test result before enabling rules broadly.
- Allow only the tools the workflow needs. Leaving Allowed Tools empty also allows tools the server adds later.
- Use credentials limited to the required projects and actions. A tool filter does not change the credential’s permissions.
- State which repository information may be sent to the MCP server and what results may be posted on the PR.
- Repeat connection and tool checks after changing the endpoint, credentials, or allowed tools.
Frequently Asked Questions (FAQ)
What transports are supported?
What transports are supported?
Remote MCP servers must support Streamable HTTP over HTTPS. JSON and streaming responses work. Legacy servers with separate SSE and message endpoints are unsupported.Locally-run servers are not supported. A server that only ships as a local package needs to be hosted at a URL Gitar can reach.
Where are my secrets stored?
Where are my secrets stored?
Securely, scoped to your organization and to the server you added them to. They are not written to rule files or your repository, and the model never sees them.Two of your servers can hold different credentials on the same header without either receiving the other’s.
What can my MCP server access?
What can my MCP server access?
The server receives its configured authentication headers and the arguments Gitar sends when calling its tools. Those arguments can include repository content or information Gitar extracts from a pull request.The server has no direct access to the repository checkout or Gitar’s own configuration. It does not receive another integration’s credentials.Register only servers trusted to receive repository data. Gitar connects to public HTTPS endpoints, and the server’s hosting environment controls its own outbound access.
Can tools receive information Gitar has extracted or assessed?
Can tools receive information Gitar has extracted or assessed?
Yes. A rule or skill can instruct Gitar to gather information and pass it as tool arguments.For example, a rule can ask Gitar to extract a ticket reference from the pull request description and assess whether the diff changes CI configuration, then pass those values to a risk-assessment tool. The returned risk level can guide the agent’s next steps.
Can auto-approve criteria call an MCP tool?
Can auto-approve criteria call an MCP tool?
No. The auto-approve evaluator cannot call MCP tools, and results from earlier integration calls are not automatically passed into its decision. Naming a risk-assessment tool in auto-approve criteria does not make its result an approval condition.
Can I limit which tools a server exposes?
Can I limit which tools a server exposes?
Yes. An empty Allowed Tools list gives the agent every tool your server advertises. Name tools there to narrow it to those.Gitar does not list your server’s tools for you, so take the names from the server’s own documentation.
Who can create custom integrations?
Who can create custom integrations?
Enterprise plan, organization administrators only. Deleting stays available even if the entitlement is later removed, so an org can always clean up.
Why does Test connection succeed but my task fails?
Why does Test connection succeed but my task fails?
The test verifies MCP initialization and tool discovery. A tool call can still fail because its inputs are invalid, the credential lacks access to the requested resource, or the tool is excluded by the saved filter. Follow Verify a tool from a PR to check the specific operation.