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/mcpYou 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
Add the address
Paste
https://app.mainstreetgravity.com/api/mcpinto your AI app as a connector or MCP server. - 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
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
- 1In ChatGPT, open Settings, then Apps & Connectors. Turn on Developer mode under Advanced if you do not see Create.
- 2Press Create, name it mainstreet gravity, and paste the address
https://app.mainstreetgravity.com/api/mcp. - 3Choose OAuth as the sign-in, then press Create.
- 4Sign in with your mainstreet gravity login, pick your brand, tick what ChatGPT may do and press Allow.
- 5In a new chat, add the connector from the + menu and ask it something.
A workspace admin may need to allow custom connectors first.
Claude.ai and Claude desktop
- 1Open Settings, then Connectors, and press Add custom connector.
- 2Name it mainstreet gravity and paste
https://app.mainstreetgravity.com/api/mcp. - 3Press Connect, sign in, pick your brand and press Allow.
- 4In a chat, turn the connector on from the tools menu.
Claude Code
- 1Make a key in mainstreet gravity: Settings, API keys, pick the brand and what it may do.
- 2Run the command below in your terminal, with your key in place of lkf_...
- 3Type
/mcpin 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
- 1Press Add to Cursor to add the server in one click.
- 2Or add it by hand in
.cursor/mcp.jsonwith your key, as below.
{
"mcpServers": {
"mainstreet-gravity": {
"url": "https://app.mainstreetgravity.com/api/mcp",
"headers": { "Authorization": "Bearer lkf_..." }
}
}
}OpenAI Codex
- 1Put your key in an environment variable named
MG_API_KEY. - 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
- 1Use an HTTP request step with the header
Authorization: Bearer lkf_.... - 2Call a REST route (below) or any tool with
POST https://app.mainstreetgravity.com/api/mcp?tool=<name>and a JSON body. - 3List every tool and its inputs with
GET https://app.mainstreetgravity.com/api/mcp?tools=1.
Your own code
- 1Any MCP client works over streamable HTTP at the address above.
- 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.
One brand per sign-in
Each connection reaches one brand you can already manage, and nothing else.
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.
Nothing sends by itself
No tool sends or schedules a newsletter. Drafts wait for a person.
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.
What events are coming up this weekend? Make me a short list for the newsletter.
Start next week's newsletter from our template and fill the sections you can.
Here are my notes from the council meeting. Write an article draft from them.
Which new businesses joined the directory this month?
Review this issue and tell me what to fix before I send it.
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 onlist_issuesList recent issuesget_issueRead an issue and its sectionsget_issue_treeRead the full content of an issuelist_templatesList saved templatesget_templateRead one template and its sectionscreate_issueStart a new draft issuegenerate_issueHave the brand writer draft a whole issuesave_issue_treeSave a full set of changes to a draft issueupdate_block_textChange the words of one blockupdate_issue_detailsSet the subject line and preview textwrite_introWrite the intro for an issuesuggest_subject_linesSuggest subject linesadd_storyAdd a story to a sectionadd_eventAdd an event cardupdate_eventChange an event in the issueadd_dealAdd a dealadd_jobAdd a job listingupdate_jobChange a job in the issueadd_featured_homeAdd the featured homeset_featuredMark one event or job as featuredset_section_visibilityHide or show a sectionremove_blocksRemove blocks from an issuemark_issue_doneMark a draft issue finisheddelete_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 collectedbrowse_placesBrowse local restaurants and businessesbrowse_jobsBrowse the job feedbrowse_listingsBrowse homes for saleread_linkRead a web page and write it upwrite_story_for_sectionWrite one story in a section’s voiceweb_searchSearch the webweb_extractRead the text of a web page
Photos and GIFs3Add pictures and make GIFs.
make_gifMake a GIF from a business’s photosupload_image_from_urlSave an image from a web addressupload_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 factsget_reviewRead the latest review of an issueexport_issue_htmlGet the finished email as HTMLpush_to_beehiivPut the issue in Beehiiv as a draftpush_to_activecampaignPut the issue in ActiveCampaign as a draftpublish_articlePublish an article when the publisher says soapprove_page_changesApply a page’s waiting changes
Sources and settings6Read your brand, sources and writing rules.
get_selection_rulesRead what belongs in this newsletterlist_sourcesList the sources the brand readslist_meme_setsList the weeks of memesadd_meme_setAdd a week of memesget_brandRead the brand’s name, colors and voiceget_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 articlesget_articleRead one articlecheck_article_draftCheck a draft against the writing rulesfile_article_draftFile an article draft for reviewwrite_from_brain_dumpTurn rough notes into an article draftget_draft_statusSee where a draft standslist_sectionsList the site’s sectionsget_pageRead a site pagefile_page_draftDraft a site page for approvallist_beatsList beatsfile_beatSet up a beat (saved switched off)run_beat_previewPreview what a beat would writelist_topicsList topics waiting to be writtenadd_topicsAdd topics to writeupdate_topicChange or skip a topic
Events, jobs and the directory5Read and submit events, jobs and businesses.
list_eventsList eventslist_jobsList jobslist_businessesList businesses in the directorysubmit_eventSubmit an event for reviewsubmit_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
/llms.txtWhat mainstreet gravity is and how an agent connects/.well-known/oauth-authorization-serverOAuth sign-in discovery/.well-known/oauth-protected-resourceWhich sign-in protects the MCP
Questions
Good to know.
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.
Does it cost extra?
There is no extra charge to connect. AI writing an agent asks for counts toward your normal AI use.
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.
How do I disconnect?
Open Settings, API keys in mainstreet gravity and revoke the connection. It stops working at once.