A Model Context Protocol (MCP) server that provides comprehensive V programming language support for Cursor IDE and other MCP-compatible editors.
This MCP server enhances V development by providing:
- Instant access to V documentation without leaving your editor
- 300+ code examples for common patterns and use cases
- Smart search through documentation and examples
- Fast responses through intelligent caching
- Clear error messages and troubleshooting guidance
The server is designed to improve the V development workflow:
- Quick syntax lookups while coding
- Example code for common patterns
- Standard library exploration without context switching
- Syntax explanations with practical examples
- Performance optimizations through smart caching
- Python 3.10+
- V repository (you're already here!)
cd v-mcp-server
pip install -r requirements.txtpython main.pyThe server is now running and ready to use.
get_v_documentation()- Browse V language documentationexplain_v_syntax(feature)- Learn specific V language featuresget_v_quick_reference()- Quick V syntax reference
list_v_examples()- Browse available code examplesget_v_example(name)- Get complete example source codesearch_v_examples(query)- Find examples by pattern
list_v_stdlib_modules()- Explore V's standard libraryget_v_module_info(module)- Detailed module information
search_v_docs(query)- Search documentationget_v_config()- View server configurationclear_v_cache()- Refresh cached content
Customize the server with environment variables:
export V_CACHE_TTL_SECONDS=300 # Cache lifetime (default: 300s)
export V_MAX_SEARCH_RESULTS=50 # Max search results (default: 50)
export V_LOG_LEVEL=INFO # Logging level (default: INFO)To use the V MCP server with Cursor IDE, add the following configuration to your Cursor MCP settings:
Add this to your .cursor/mcp.json file:
{
"mcpServers": {
"v-language-assistant": {
"command": "python",
"args": [
"/path/to/v-mcp/v-mcp-server/main.py"
],
"env": {
"V_REPO_PATH": "/path/to/v-mcp"
}
}
}
}Replace /path/to/v-mcp with the actual path to your V MCP directory.
Once configured, you can ask questions like:
- "How do I work with arrays in V?"
- "Show me V struct examples"
- "What modules are in V's standard library?"
- "Explain V error handling"
- Smart caching for frequently accessed content
- Relevance scoring for better search results
- Graceful degradation when parts of V repository are missing
- Configurable performance limits
# Check Python version
python --version # Should be 3.10+
# Verify dependencies
cd v-mcp-server
python -m pip install -r requirements.txt
# Test server
python main.py- Ensure you're in the V repository root
- Check that
doc/,examples/, andvlib/directories exist - Set
V_REPO_PATHif running from different location
- Increase cache TTL:
export V_CACHE_TTL_SECONDS=600 - Clear cache: Use
clear_v_cache()tool - Restart server to refresh all content
Once configured, you can start using the V MCP server immediately. Try asking questions like:
- "What are the basic data types in V?"
- "Show me how to create a struct"
- "How do I handle errors in V?"
- "What functions are available in the os module?"
For detailed documentation and advanced configuration options, see v-mcp-server/README.md.