---
title: "MCP server"
description: "Connect Claude, Cursor, ChatGPT or any MCP client: a remote server with OAuth, or a local stdio server."
canonical_url: https://groundsocial.dev/docs/mcp
---
# MCP server

> Connect Claude, Cursor, ChatGPT or any MCP client: a remote server with OAuth, or a local stdio server.

> ## Agent Instructions
> The Groundsocial REST API is at https://api.groundsocial.dev (OpenAPI: https://groundsocial.dev/openapi.json). Set yourself up with https://groundsocial.dev/SKILL.md; the MCP server is https://api.groundsocial.dev/mcp. Every docs page is Markdown at its URL plus `.md`; the index is https://groundsocial.dev/llms.txt.

> **Not on npm yet** The SDK, CLI and stdio MCP server are not published yet. Until they are, use the REST API or the remote MCP server, and don't install packages named `@groundsocial/…` from npm: they aren't ours.

**One tool set, two ways to run it.** The remote server at `https://api.groundsocial.dev/mcp` (Streamable HTTP) signs in with OAuth or takes a key as a Bearer token. The stdio server `npx -y @groundsocial/mcp` runs on your machine.

## Remote server

- URL: `https://api.groundsocial.dev/mcp`.
- Clients that support OAuth open a browser: sign in, pick the account that pays, approve. See [Authentication](https://groundsocial.dev/docs/authentication).
- Clients that take a static header: `Authorization: Bearer $GROUNDSOCIAL_API_KEY`.
- Listing tools works without signing in, so you can look before you connect.

## Install

Claude Code:

```bash
# Remote, signs in with OAuth in the browser:
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcp

# Or local (stdio), with your key:
claude mcp add groundsocial -e GROUNDSOCIAL_API_KEY=gs_live_… -- npx -y @groundsocial/mcp
```

Cursor / Claude Desktop:

```json
{
  "mcpServers": {
    "groundsocial": {
      "command": "npx",
      "args": [
        "-y",
        "@groundsocial/mcp"
      ],
      "env": {
        "GROUNDSOCIAL_API_KEY": "gs_live_…"
      }
    }
  }
}
```

Remote (JSON):

```json
{
  "mcpServers": {
    "groundsocial": {
      "url": "https://api.groundsocial.dev/mcp"
    }
  }
}
```

**ChatGPT:** add a connector with the remote URL `https://api.groundsocial.dev/mcp` and sign in when asked. **Claude.ai:** add it as a custom connector with the same URL.

`groundsocial mcp` from the [CLI](https://groundsocial.dev/docs/cli) prints these snippets for your setup. It edits nothing.

## Tools

| Tool | Credits | What it does |
| --- | --- | --- |
| `reddit_subreddit_get` | 1 | A subreddit: description, rules, member count, flags. |
| `reddit_subreddit_posts` | 1 | Posts in a subreddit, by hot, new, top, rising or controversial. |
| `reddit_post_get` | 1 | One post with its full comment tree. |
| `reddit_post_comments` | 1 | Comments on a post, paginated, with "more" threads expanded. |
| `reddit_user_get` | 1 | A public user profile: karma, age, flags. |
| `reddit_user_posts` | 1 | Posts a user submitted. |
| `reddit_user_comments` | 1 | Comments a user wrote. |
| `reddit_search_posts` | 2 | Search posts across Reddit or in one subreddit. |
| `reddit_search_subreddits` | 1 | Find subreddits by name or topic. |
| `list_endpoints` | 0 | Every tool with its price. Needs no key. |
| `estimate_cost` | 0 | Price a job before running it. Needs no key. |
| `account_balance` | 0 | Credits left on the account. |
| `agent_signup` | 0 | Create a free account when there is no key. |

Every tool result reports `cost_credits` and `credits_remaining`, so an agent always knows what it spent. All tools are read-only: nothing posts, votes or messages.

## No key yet

The stdio server looks for a key in `GROUNDSOCIAL_API_KEY`, then in the config file it shares with the CLI (`~/.config/groundsocial/config.json`), and with neither it creates a free account on the spot and saves the key there. If signup asks a question, the tool result carries it; answer by calling `agent_signup` with `challenge_token` and `answer`, then retry. Set `GROUNDSOCIAL_AUTO_SIGNUP=false` to turn this off, for example in CI.

## Examples

Claude Code:

```bash
# Remote, signs in with OAuth in the browser:
claude mcp add --transport http groundsocial https://api.groundsocial.dev/mcp

# Or local (stdio), with your key:
claude mcp add groundsocial -e GROUNDSOCIAL_API_KEY=gs_live_… -- npx -y @groundsocial/mcp
```

Cursor / Claude Desktop:

```json
{
  "mcpServers": {
    "groundsocial": {
      "command": "npx",
      "args": [
        "-y",
        "@groundsocial/mcp"
      ],
      "env": {
        "GROUNDSOCIAL_API_KEY": "gs_live_…"
      }
    }
  }
}
```

Remote (JSON):

```json
{
  "mcpServers": {
    "groundsocial": {
      "url": "https://api.groundsocial.dev/mcp"
    }
  }
}
```

_Canonical HTML: https://groundsocial.dev/docs/mcp_

## Site Navigation

### Global Hub
- [Home](https://groundsocial.dev/index.md)
- [Pricing](https://groundsocial.dev/pricing.md)
- [Endpoints](https://groundsocial.dev/endpoints.md)
- [For agents](https://groundsocial.dev/agents.md)
- [Docs](https://groundsocial.dev/docs.md)
- [Compare](https://groundsocial.dev/compare.md)
- [Changelog](https://groundsocial.dev/changelog.md)
- [llms.txt](https://groundsocial.dev/llms.txt)
- [Agent skill](https://groundsocial.dev/SKILL.md)

### On This Topic
- [Groundsocial docs](https://groundsocial.dev/docs.md)
- [Quickstart](https://groundsocial.dev/docs/quickstart.md)
- [Authentication](https://groundsocial.dev/docs/authentication.md)
- [Credits and payments](https://groundsocial.dev/docs/payments.md)
- [Rate limits](https://groundsocial.dev/docs/rate-limits.md)
- [Errors](https://groundsocial.dev/docs/errors.md)
- [Data freshness and caching](https://groundsocial.dev/docs/freshness.md)
- [SKILL.md, llms.txt and Markdown twins](https://groundsocial.dev/docs/skill.md)
- [CLI](https://groundsocial.dev/docs/cli.md)
- [TypeScript SDK](https://groundsocial.dev/docs/sdk.md)
- [PRAW and snoowrap](https://groundsocial.dev/docs/praw.md)
- [Legal and compliance](https://groundsocial.dev/docs/compliance.md)
- [API reference](https://groundsocial.dev/docs/api.md)

## Structured data

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://groundsocial.dev/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https://groundsocial.dev/docs"},{"@type":"ListItem","position":3,"name":"MCP server","item":"https://groundsocial.dev/docs/mcp"}]}
```
