> ## Documentation Index
> Fetch the complete documentation index at: https://docs.govly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP for Developers

> Connect APIs and developer tools to Govly MCP

Use this guide to connect an AI provider API, command-line tool, or other MCP client to Govly. To use Govly in the hosted Claude app, follow [Connect to Claude](/enterprise/integrations/mcp/claude) instead.

## Before you start

You need:

* A Govly account with a paid seat. Enterprise API access is not required to connect.
* A client that supports remote HTTP MCP servers.
* A personal Govly API key if your client only accepts a static bearer token.

Use Govly's remote MCP server URL:

```text theme={null}
https://app.govly.com/api/mcp
```

## Choose an authentication method

Govly supports two connection methods:

* **OAuth** — recommended whenever your client supports it. You sign in to Govly in a browser, approve access, and let the client manage the connection.
* **Personal API key** — use this when a client only accepts a static bearer token or authorization header.

### Connect with OAuth

<Steps>
  <Step title="Add a remote MCP server">
    In your client, add a remote MCP server named `Govly` with the URL `https://app.govly.com/api/mcp`.
  </Step>

  <Step title="Sign in to Govly">
    Follow the browser prompt and sign in to your existing Govly account. Govly's OAuth flow does not create new users.
  </Step>

  <Step title="Approve access">
    Review the authorization request and approve the connection.
  </Step>

  <Step title="Test the connection">
    Ask the client to list its Govly tools or try a small request such as, “What workspaces do I have in Govly?”
  </Step>
</Steps>

Clients that support OAuth discovery do not require a separate OAuth client ID or client secret. Manage OAuth connections under **Govly Settings → API → Connected Apps**.

## Connect with a personal API key

<Warning>
  A personal API key lets an external client access Govly as you. Store it in a secret manager or environment variable, never commit it to source control, and revoke it immediately if it is exposed.
</Warning>

### Create a personal API key

<Steps>
  <Step title="Open API settings">
    In Govly, go to **Settings → API → API Keys**.
  </Step>

  <Step title="Create a personal key">
    Under **Personal API Keys**, select **New key** and name it after the client that will use it.
  </Step>

  <Step title="Copy and store the key">
    Copy the `gk_...` token immediately. It is only shown once.
  </Step>
</Steps>

You can keep up to two active personal keys at a time. Personal keys are tied to a specific user and must not be shared across users or systems.

### Configure your client

Most MCP clients accept a configuration block like this:

```json theme={null}
{
  "mcpServers": {
    "govly": {
      "url": "https://app.govly.com/api/mcp",
      "headers": {
        "Authorization": "Bearer gk_<your_personal_api_key>"
      }
    }
  }
}
```

The exact configuration format and location vary by client. Use your client's secure secret or authorization-token setting when available instead of saving the key directly in a configuration file.

### Connect through an AI provider API

When an AI provider API supports remote MCP servers:

1. Add a remote MCP server named `govly`.
2. Use `https://app.govly.com/api/mcp` as the server URL.
3. Use your personal Govly API key as the server authorization token.
4. Require approval for tool calls while you test the integration.
5. Start with a low-risk request, such as listing Govly tools or running one opportunity search.

Provider request formats differ, so use the provider's current remote MCP documentation for exact field names and approval settings.

### Verify the connection

Send a JSON-RPC `tools/list` request with your personal key:

```bash theme={null}
curl -X POST https://app.govly.com/api/mcp \
  -H "Authorization: Bearer gk_<your_personal_api_key>" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

A successful response lists the Govly tools available to your account, including `search_opportunities`, `search_awards`, `search_contacts`, `document_read`, `document_download`, and `list_workspaces`.

## Shared or service accounts

If your team needs a shared agent or service account, email **[support@govly.com](mailto:support@govly.com)** with:

* The requested display name and email address.
* A short description of how the account will be used.

Do not reuse a person's API key for a shared integration.

## Multiple Govly organizations

OAuth connections and personal API keys are scoped to the Govly organization where they were authorized or created. To connect another organization, authorize a separate OAuth connection while viewing that organization or create a separate personal API key from it.

## Manage personal keys

Personal-key connections do not appear under **Connected Apps**. Manage, rotate, or revoke them under **Govly Settings → API → API Keys**. After rotating a key, update every client that used the previous value.

## Troubleshooting

| Issue                                         | What to check                                                                                                                                   |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `401 Unauthorized`                            | Confirm the personal key is correct, active, and sent as a bearer token.                                                                        |
| `401 Grant has been revoked`                  | Reconnect through your client's OAuth flow.                                                                                                     |
| A tool you expected is missing                | Some tools require Enterprise API access or another Govly subscription. Contact your Govly administrator if you believe you should have access. |
| The connection is missing from Connected Apps | Personal-key connections are managed under API Keys instead.                                                                                    |

Still stuck? Email **[support@govly.com](mailto:support@govly.com)** with the client you're using and any error messages you're seeing.
