
VK MCP Server
io.github.ssm82由 GitHub 账号 ssm82 发布v0.2.2更新于 Oct 24, 2026
MCP server for VK API with 180+ tools: users, wall, groups, friends, photos, messages.
概览
让助手通过 180 多个自动生成的 VK API 工具读写 VKontakte 账号,涵盖墙贴、消息、群组、照片和广告等。
- 可以做什么
- 把官方 VK API schema 封装成 180 多个 MCP 工具,覆盖用户、墙、群组、好友、照片、视频、消息、市场、统计、故事、投票、广告等。内置配置档和模式过滤可把暴露的工具限制为只读、非财务写入或财务敏感方法,也可按分区或单个方法做白名单和黑名单。还提供 VK 上传服务器与保存辅助方法用于媒体流程,并支持 stdio、Streamable HTTP 和 SSE 传输。
- 适用场景
- 当助手需要操作 VK 账号或社区时使用:读取墙贴、搜索用户、管理群组、处理消息,或执行广告与市场操作。适合想要较完整 VK API 能力、又能用配置档或只读模式收窄范围的用户。
- 运行要求
- 需要 Node.js 18 或更高版本,通过 npx 或全局 npm 安装在本机运行。必须提供 VK 访问令牌,以 VK_ACCESS_TOKEN 环境变量或 .env 文件给出,并具备与用途匹配的权限范围。首次运行会自动下载 VK API schema,因此需要网络访问。HTTP 传输还会用到 VK_MCP_TRANSPORT、VK_MCP_PORT、VK_MCP_HOST 和 VK_MCP_AUTH_TOKEN。
安装
在 SourceWeft 中
- 打开 控制台中的 VK MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
VK MCP Server
Model Context Protocol (MCP) server for VKontakte (VK) — the largest social network in Russia and CIS countries.
This server allows AI assistants (Claude, Cursor, Windsurf, VS Code, etc.) to interact with VK through a standardized MCP interface.
Features
- 180+ VK API tools auto-generated from the official schema (full set available with
VK_MCP_MODE=all; safe defaults expose a smaller subset) — users, wall, groups, friends, photos, videos, messages, market, stats, stories, polls, and more - Auto-generated from VK API schema — always up-to-date with the official API
- Read/Write/Money mode filtering — restrict AI to read-only, allow non-financial writes, or enable financially sensitive methods
- Section filtering — include or exclude specific API sections (e.g., disable
ads,secure) .envsupport — load token from environment file for local development- VK upload API helpers — exposes upload-server and save methods for media workflows
- ESM-based — modern Node.js module system
- Multiple transports — stdio (for Claude Desktop / Cursor), Streamable HTTP and SSE (for remote MCP clients like Grok)
Prerequisites
- Node.js ≥ 18
- VK Access Token with required permissions
Installation
Option 1: Run with npx (no install)
Option 2: Install globally
Option 3: Clone from GitHub
The VK API schema is downloaded automatically on the first run. No manual steps needed.
Configuration
1. VK Access Token
Create a .env file in the project root:
Or get a token from:
- vkhost.github.io — quick token generator
- VK Dev — official developer portal
Required permissions depend on your use case:
wall— posting and reading wallphotos— uploading photosgroups— community managementfriends,messages,market,stats— as needed
Security: Never commit your token to git. The
.envfile is already in.gitignore.
2. Choose a Profile (Recommended)
Instead of manually configuring sections and methods, use a built-in profile via VK_MCP_PROFILE:
Profiles can be extended with environment variables:
Env extends profile: list variables (sections, methods, excludes) are merged with the profile; scalar
modeis overridden by env.
3. MCP Client Setup
VS Code (with Copilot / Claude / etc.)
Create .vscode/mcp.json:
For local development from a cloned repository, use:
Cursor
Create .cursor/mcp.json:
Claude Desktop
Edit claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
For local development from a cloned repository, use:
Windsurf / Other MCP Clients
Use the stdio transport and provide VK_ACCESS_TOKEN via environment variables.
4. Transport Mode
By default, the server uses stdio transport for local MCP clients. To enable remote connections, switch to HTTP:
Environment Variables
Mode Filtering
The server automatically classifies each VK API method into risk levels:
- Read methods —
get*,search*,is*,are*,check*,resolve*,find*,count*,lookup*,list* - Write methods — everything else (post, edit, delete, send, etc.)
- Money methods — any method in financial sections or explicitly tagged (
secure.getAppBalance, etc.)
Use VK_MCP_MODE=read to prevent the AI from making any changes to your VK account.
Use VK_MCP_MODE=money when you need ads, market, or payment-related tools.
Running Locally
With npm/npx:
With a cloned repository:
HTTP Mode
Test HTTP endpoint
For full MCP protocol testing, use the MCP Inspector:
Then select:
Streamable HTTP is session-based. A raw tools/list request must be sent only after an initialize request and with the returned Mcp-Session-Id header.
In the Inspector UI select Streamable HTTP and enter http://127.0.0.1:3000/mcp.
Available Tools (by Category)
Total: 180+ tools auto-generated from the official VK API schema.
Examples
Get your wall posts
Search for users
Get community members
Create a poll
Deployment
For Render, Railway, Fly.io, or similar PaaS:
Render note: Render provides the port via the
$PORTenvironment variable. The server automatically falls back to it whenVK_MCP_PORTis not set.
Development
Project Structure
Note: The published npm package includes runtime files only (
src/,README.md,LICENSE,server.json). Tests and development files are kept in the GitHub repository.
VK API Schema
The VK API schema is not included in this repository to keep it lightweight. On the first run (server or tests), it is downloaded automatically from the official VK repository:
The schema is saved to vk-api-schema/ in the project root and cached for subsequent runs.
Updating the Schema
To get the latest VK API changes, delete the cached folder and restart:
Security
- Token storage: Use
.envor your MCP client's secure environment variables. Never commit tokens. - Least privilege: Use
VK_MCP_MODE=readif the AI only needs to read data. - Section filtering: Exclude sensitive sections like
ads,secureif not needed. - HTTP mode security: By default, HTTP binds to
127.0.0.1only. If you bind to0.0.0.0(public),VK_MCP_AUTH_TOKENis required — the server will refuse to start without it. Always use HTTPS in production.
Troubleshooting
License
MIT
Contributing
Pull requests are welcome! Please open an issue first to discuss major changes.
Made for the Model Context Protocol ecosystem
来源:README.md,提交 be6c21d
工具
0版本历史
1- v0.2.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分