Skip to content

speakeasy-api/gram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Gram

Gram - The MCP Cloud Platform


Learn more »

Built by Speakeasy
Documentation · Tech Stack · Contributing · Login ·


Introduction

Gram is a platform for creating, curating, and hosting MCP servers. Curate and scope toolsets for every use case. Host and secure MCP servers with ease.

What can you do with Gram?

With Gram you can empower your LLM and Agents to access the right data at the right time. Gram provides a high-level TypeScript SDK and OpenAPI support to define tools, compose higher order custom tools and group tools together into toolsets. Every toolset is instantly available as a hosted and secure MCP server.

If you are looking to get started on the hosted platform you can do that here or check out the quickstart guide.

Features

└ Minimal, lightweight, and open source.
└ High-level TypeScript framework that makes working with MCP easy.
└ Use a custom tool builder to create higher-order tools by chaining lower level tools.
└ OAuth support out-of-the-box: DCR, BYO Authorisation, and standard flows.
└ First class support for OpenAPI 3.0.X and 3.1.X.
└ Follows the MCP specification.

Getting started with Gram Functions

Create agentic tools from simple TypeScript code using the Gram Functions Framework. See the getting started guide to learn more.

The fastest way to get started is with the npm create @gram-ai/function@latest command, which creates a complete TypeScript project with a working Gram function. Deployable and runnable locally as a MCP server.

# Install the CLI and Create a new project
npm create @gram-ai/function@latest

# Build and Deploy
npm build
npm push

# Check out your first function
cd my_function/src/gram.ts

A default function is created for you.

import { Gram } from "@gram-ai/functions";
import * as z from "zod/mini";
 
const gram = new Gram().tool({
  name: "add",
  description: "Add two numbers together",
  inputSchema: { a: z.number(), b: z.number() },
  async execute(ctx, input) {
    return ctx.json({sum: input.a + input.b});
  },
});
 
export default gram;

In addition you get a:

  • A server.ts is created so you can run the tool locally as a MCP server with MCP inspector with pnpm run dev
  • A README and CONTRIBUTING guide for next steps on building out your custom tool.

Common use cases include:

└ Host one or more remote MCP servers at a custom domain like mcp.{your-company}.com.
└ Power your in-application chat by exposing context from your internal APIs or 3rd Party APIs through tools.
└ Add data to your AI workflows in Zapier, N8N and other workflow platforms
└ Manage and secure MCP servers for your entire organization through a unified control plane.

Check out the examples folder in this repo for working examples. Or open a pull request if you have one to share!

gram CLI

The gram CLI a tool for programmatic access to Gram. Get started with documentation here.

Local development

Quickstart:

cd cli
go run . --help

Releases

Note

All CLI updates must follow the changeset process.

New versions of the CLI are released automatically with GoReleaser.

Version bumps are determined by the git commit's prefix:

Prefix Version bump Example commit message
feat!: Major feat!: breaking change to deployments
feat: Minor feat: new status fields
fix: Patch patch: update help docs

Support

  • Slack: Join our slack for support and discussions
  • In-App: When using the application you can engage with the core maintainers of the product.
  • GitHub: Contribute or report issues on this repository.
  • Documentation for Gram is also open source. View it here and contribute here.

Contributing

Contributions are welcome! Please open an issue or discussion for questions or suggestions before starting significant work! Here's how you can develop on the stack and contribute to the project.

Development

Run ./zero until it succeeds. This script is what you will use to run the dashboard and services for local development. It will also handle installing dependencies and running pending database migrations before starting everything up.

The main dependencies for this project are Mise and Docker. The ./zero script will guide you to install these if they are not found.

Coding guidelines

All AI coding guidelines are written out in CLAUDE.md. Please make sure you read the contributing guidelines before submitting changes to this project.

Putting up pull requests

Please have a good title and description for your PR. Go nuts with streams of commits but invest in a reviewable PR with good context.

Techstack

TypeScript – dashboard language.
Golang - backend language.
Goa - design-first API framework.
Temporal - workflow engine.
Polar - usage based billing.
OpenRouter - LLM gateway.
Speakeasy - Generated SDKs. Spec hosted here.