GitHub - speakeasy-api/gram: Platform to create, curate and host MCP servers ⚒️ Build production quality tools for your agents.

3 min read Original article ↗
Gram

Gram - The MCP Cloud Platform


Introduction

Gram is a platform for creating, curating, and hosting Model Context Protocol (MCP) servers with ease. We currently support both OpenAPI documents as well as custom TypeScript functions as sources for tools.

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 Sign up, 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.

Gram Functions

Create agentic tools from simple TypeScript code using the Gram Functions Framework. Refer to 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 follow the prompts
npm create @gram-ai/function@latest

# Once created, move into your newly created function directory
cd my_function

# Build and Deploy
npm run build
npm run push

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 CLI allows for programmatic access to Gram, enabling you to manage the process of pushing sources (either OpenAPI documents or Gram Functions) for your MCP servers. Get started with documentation here.

curl -fsSL https://go.getgram.ai/cli.sh | bash

And then:

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.

See CONTRIBUTING.md for development setup and detailed contribution guidelines.

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.