Skip to main content
Glama

Heroku MCP server

Official
by heroku
source-service.ts1.29 kB
import * as Heroku from '@heroku-cli/schema'; /** * [Heroku Platform API - Source](https://devcenter.heroku.com/articles/platform-api-reference#source) * A source is a location for uploading and downloading an application's source code. */ export default class SourceService { /** * * @param endpoint The endpoint to use for the source service. */ public constructor(protected readonly endpoint: string) {} /** * Create URLs for uploading and downloading source. * * @param requestInit The initializer for the request. * @returns The source. */ public async create(requestInit: Omit<RequestInit, 'body' | 'method'> = {}): Promise<Heroku.Source> { const response = await fetch(`${this.endpoint}/sources`, { ...requestInit, method: 'POST', headers: { ...requestInit?.headers, Accept: 'application/vnd.heroku+json; version=3.sdk', 'Content-Type': 'application/json' } }); if (response.ok) { return (await response.json()) as Promise<Heroku.Source>; } let message = response.statusText; try { ({ message } = (await response.json()) as { message: string }); } catch { // no-op } throw new Error(`${response.status}: ${message}`, { cause: response }); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/heroku/heroku-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server