DEV Community

Bulat
Bulat

Posted on

I built an MCP server for VK (VKontakte) — here's how

Why VK?

MCP (Model Context Protocol) already has servers for Twitter, Slack, Discord — but nothing for VK, the largest social network in Russia and CIS (100M+ monthly users). I decided to fix that.

What it does

vk-mcp-server gives AI assistants (Claude, etc.) access to VK API through 10 tools:

  • Users — get profiles by ID or screen name
  • Wall — read posts, publish, comment
  • Groups — list memberships, get community info
  • Friends — get friend lists with filters
  • Newsfeed — access user feed
  • Photos — browse albums
  • Stats — community analytics (admin)

Quick start

npm install -g vk-mcp-server
Enter fullscreen mode Exit fullscreen mode

Add to your Claude config:

{
  "mcpServers": {
    "vk": {
      "command": "vk-mcp-server",
      "env": {
        "VK_ACCESS_TOKEN": "your_token_here"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Get your token at vk.com/dev.

How it works

The server uses the official @modelcontextprotocol/sdk and communicates over stdio. It wraps VK API v5.199 calls into MCP tools with proper input schemas, so AI assistants can discover and use them automatically.

The entire server is a single file (~350 lines) with zero dependencies beyond the MCP SDK. No frameworks, no abstractions — just a clean VK API client and tool definitions.

Example: what you can do

Once connected, you can ask Claude things like:

  • "Show me the latest posts from this community"
  • "Post 'Hello world' on my wall"
  • "Who are my online friends right now?"
  • "Get stats for my community for the last week"

Claude will use the appropriate VK tools automatically.

Links

Feedback and PRs welcome!

Top comments (0)