APIs & MCP

Let your AI work inside your local media business.

Connect ChatGPT, Claude or your own agent to mainstreet gravity. It can read your stories, events and businesses, build newsletter drafts and file articles. A person still approves everything that goes out.

1
address for every AI app
Sign in
no key to copy for ChatGPT and Claude
0
emails sent without a person

Connect your AI

MCP server address

https://app.mainstreetgravity.com/api/mcp

You sign in with your mainstreet gravity login, pick one brand and tick what the AI may do.

How it works

Three steps, about a minute.

  1. 1

    Add the address

    Paste https://app.mainstreetgravity.com/api/mcp into your AI app as a connector or MCP server.

  2. 2

    Sign in and choose

    Sign in with your mainstreet gravity login, pick the brand and tick what the AI may do. Reading and drafts are on; the rest is off until you turn it on.

  3. 3

    Ask in plain words

    "What events are on this weekend?" or "Start next week's newsletter." Your AI uses the tools and shows you what it did.

Connect your app

Pick your AI app.

Every app uses the same address. Apps with a sign-in button need no key; the rest use a key from Settings, API keys.

ChatGPT

  1. 1In ChatGPT, open Settings, then Apps & Connectors. Turn on Developer mode under Advanced if you do not see Create.
  2. 2Press Create, name it mainstreet gravity, and paste the address https://app.mainstreetgravity.com/api/mcp.
  3. 3Choose OAuth as the sign-in, then press Create.
  4. 4Sign in with your mainstreet gravity login, pick your brand, tick what ChatGPT may do and press Allow.
  5. 5In a new chat, add the connector from the + menu and ask it something.
Business and Enterprise plans

A workspace admin may need to allow custom connectors first.

Claude.ai and Claude desktop

  1. 1Open Settings, then Connectors, and press Add custom connector.
  2. 2Name it mainstreet gravity and paste https://app.mainstreetgravity.com/api/mcp.
  3. 3Press Connect, sign in, pick your brand and press Allow.
  4. 4In a chat, turn the connector on from the tools menu.

Claude Code

  1. 1Make a key in mainstreet gravity: Settings, API keys, pick the brand and what it may do.
  2. 2Run the command below in your terminal, with your key in place of lkf_...
  3. 3Type /mcp in Claude Code to check it is connected.
claude mcp add --transport http mainstreet-gravity \
  https://app.mainstreetgravity.com/api/mcp \
  --header "Authorization: Bearer lkf_..."

Cursor

  1. 1Press Add to Cursor to add the server in one click.
  2. 2Or add it by hand in .cursor/mcp.json with your key, as below.
{
  "mcpServers": {
    "mainstreet-gravity": {
      "url": "https://app.mainstreetgravity.com/api/mcp",
      "headers": { "Authorization": "Bearer lkf_..." }
    }
  }
}

OpenAI Codex

  1. 1Put your key in an environment variable named MG_API_KEY.
  2. 2Add the lines below to ~/.codex/config.toml.
[mcp_servers.mainstreet-gravity]
url = "https://app.mainstreetgravity.com/api/mcp"
bearer_token_env_var = "MG_API_KEY"

Zapier, n8n and Make

  1. 1Use an HTTP request step with the header Authorization: Bearer lkf_....
  2. 2Call a REST route (below) or any tool with POST https://app.mainstreetgravity.com/api/mcp?tool=<name> and a JSON body.
  3. 3List every tool and its inputs with GET https://app.mainstreetgravity.com/api/mcp?tools=1.

Your own code

  1. 1Any MCP client works over streamable HTTP at the address above.
  2. 2Send your key as a Bearer token, or sign in with OAuth 2.1 (PKCE, dynamic client registration). Discovery lives at /.well-known/oauth-authorization-server.
curl -s "https://app.mainstreetgravity.com/api/mcp?tool=list_events" \
  -H "Authorization: Bearer lkf_..." \
  -H "Content-Type: application/json" -d '{}'

What stays in your hands

Your AI drafts. A person decides.

  1. One brand per sign-in

    Each connection reaches one brand you can already manage, and nothing else.

  2. You pick what it may do

    Reading and drafts are on by default. Publishing is off and only an Owner or Admin can turn it on.

  3. Nothing sends by itself

    No tool sends or schedules a newsletter. Drafts wait for a person.

  4. Turn it off any time

    Every connection shows on Settings, API keys, with its activity. Revoke it and it stops at once.

Things to ask

Try these first.

  1. What events are coming up this weekend? Make me a short list for the newsletter.

  2. Start next week's newsletter from our template and fill the sections you can.

  3. Here are my notes from the council meeting. Write an article draft from them.

  4. Which new businesses joined the directory this month?

  5. Review this issue and tell me what to fix before I send it.

  6. Add these three topics to our topic list for later articles.

Every tool

69 tools your AI can use.

This list comes straight from the software, so it is always current. Each tool only works if the connection was allowed to do that kind of work.

Build issues25Make, fill and edit newsletter issue drafts.
  • list_publicationsList the newsletters this key can work on
  • list_issuesList recent issues
  • get_issueRead an issue and its sections
  • get_issue_treeRead the full content of an issue
  • list_templatesList saved templates
  • get_templateRead one template and its sections
  • create_issueStart a new draft issue
  • generate_issueHave the brand writer draft a whole issue
  • save_issue_treeSave a full set of changes to a draft issue
  • update_block_textChange the words of one block
  • update_issue_detailsSet the subject line and preview text
  • write_introWrite the intro for an issue
  • suggest_subject_linesSuggest subject lines
  • add_storyAdd a story to a section
  • add_eventAdd an event card
  • update_eventChange an event in the issue
  • add_dealAdd a deal
  • add_jobAdd a job listing
  • update_jobChange a job in the issue
  • add_featured_homeAdd the featured home
  • set_featuredMark one event or job as featured
  • set_section_visibilityHide or show a section
  • remove_blocksRemove blocks from an issue
  • mark_issue_doneMark a draft issue finished
  • delete_issueArchive a draft issue
Find and write stories8Find your content and the news, and write stories for a section.
  • browse_contentBrowse stories and items already collected
  • browse_placesBrowse local restaurants and businesses
  • browse_jobsBrowse the job feed
  • browse_listingsBrowse homes for sale
  • read_linkRead a web page and write it up
  • write_story_for_sectionWrite one story in a section’s voice
  • web_searchSearch the web
  • web_extractRead the text of a web page
Photos and GIFs3Add pictures and make GIFs.
  • make_gifMake a GIF from a business’s photos
  • upload_image_from_urlSave an image from a web address
  • upload_mediaUpload an image
Review and publish7Check an issue, and with permission put a draft in your email service or publish an article.
  • review_issueCheck an issue’s links, images and facts
  • get_reviewRead the latest review of an issue
  • export_issue_htmlGet the finished email as HTML
  • push_to_beehiivPut the issue in Beehiiv as a draft
  • push_to_activecampaignPut the issue in ActiveCampaign as a draft
  • publish_articlePublish an article when the publisher says so
  • approve_page_changesApply a page’s waiting changes
Sources and settings6Read your brand, sources and writing rules.
  • get_selection_rulesRead what belongs in this newsletter
  • list_sourcesList the sources the brand reads
  • list_meme_setsList the weeks of memes
  • add_meme_setAdd a week of memes
  • get_brandRead the brand’s name, colors and voice
  • get_writer_guideRead the brand’s writing guide
Articles, pages and beats15File article and page drafts, keep the topic list and set up beats.
  • list_articlesList articles
  • get_articleRead one article
  • check_article_draftCheck a draft against the writing rules
  • file_article_draftFile an article draft for review
  • write_from_brain_dumpTurn rough notes into an article draft
  • get_draft_statusSee where a draft stands
  • list_sectionsList the site’s sections
  • get_pageRead a site page
  • file_page_draftDraft a site page for approval
  • list_beatsList beats
  • file_beatSet up a beat (saved switched off)
  • run_beat_previewPreview what a beat would write
  • list_topicsList topics waiting to be written
  • add_topicsAdd topics to write
  • update_topicChange or skip a topic
Events, jobs and the directory5Read and submit events, jobs and businesses.
  • list_eventsList events
  • list_jobsList jobs
  • list_businessesList businesses in the directory
  • submit_eventSubmit an event for review
  • submit_jobSubmit a job for review

For developers

Plain REST, too.

Every route takes the same lkf_ key as a Bearer token and works on the key's brand only.

REST API

  • GET/api/v1/articlesPublished articles
  • GET/api/v1/articles/{id}One article by id or slug
  • GET/api/v1/businessesThe business directory
  • GET/api/v1/eventsUpcoming events
  • POST/api/v1/eventsSubmit an event for review
  • GET/api/v1/jobsOpen jobs
  • POST/api/v1/jobsSubmit a job for review
  • POST/api/v1/draftsFile an article draft
  • POST/api/v1/drafts/checkCheck a draft before filing
  • POST/api/v1/publishPublish (publishing permission only)

List upcoming events

curl https://app.mainstreetgravity.com/api/v1/events \
  -H "Authorization: Bearer lkf_..."

Files for AI agents

Questions

Good to know.

  1. Does my AI need its own account?

    No. You sign in as yourself, and the connection can only do what you allow on one brand you already manage.

  2. Does it cost extra?

    There is no extra charge to connect. AI writing an agent asks for counts toward your normal AI use.

  3. Can it send my newsletter?

    No. It can build a draft and, if you allow it, put that draft in your email service. A person sends it.

  4. How do I disconnect?

    Open Settings, API keys in mainstreet gravity and revoke the connection. It stops working at once.

Contact us

Got a question? Ask us anything.

Ask about the system, the plans or your market. A real person on our team reads every note and replies by email.

  • See if mainstreet gravity fits your publication
  • Ask about one product or a full plan
  • Book a live walkthrough of the system