devvit-mcp logo

devvit-mcp

by reddit

devvit-mcp is a companion MCP server for writing applications on Reddit's developer platform. It is currently under active development and APIs are experimental.

View on GitHub

Last updated: N/A

UNDER ACTIVE DEVELOPMENT! All APIs are considered experimental and may change at any time.

devvit-mcp

A companion MCP server for writing applications on Reddit's developer platform.

Installation

Add the following to your mcp.json for the editor or LLM of choice.

{
  "mcpServers": {
    "devvit-mcp": {
      "command": "npx",
      "args": ["-y", "@devvit/mcp"]
    }
  }
}

Developing on the MCP Server

git clone ...

cd devvit-mcp

nvm use

npm install

npm run dev

MCP Gotchas

  • Never put a console.log in the hot path of your app if you're trying to debug. You'll see weird error messages like Unexpected token 'a', " at Anthrop"... is not valid JSON.
  • Only log console.error in your MCP when running through MCP.

Debugging

  • The best debugging experience I've had is using Claude desktop and connecting the MCP there. They have log files that report errors on your machine. You can view them by opening in VSCode or running tail commands.

  • If you see something like this:

Error: Server does not support logging (required for notifications/message)
    at Server.assertNotificationCapability

You need to add the capability to your new MCPServer. Use this permalink to know what key you should add.

Credits

Huge thanks to Arabold for open sourcing docs-mcp-server. Portions of this code is heavily inspired by this library. Please use it if you need other docs servers!