bars-mcp-server
v1.0.1
Published
MCP server for Bars - Library Documentation Service with up-to-date documentation and code examples
Maintainers
Readme
🍺 Bars MCP Server
Bars is a comprehensive library documentation service that provides up-to-date documentation and code examples for any library. It works as a Model Context Protocol (MCP) server for AI assistants like Cursor, Claude, VS Code, and more.
✨ Features
- 🔍 Smart Search: Find libraries quickly with intelligent search
- 📚 Rich Documentation: Get comprehensive documentation with code examples
- ⚡ Fast & Reliable: Powered by Firebase with sub-second response times
- 🔧 MCP Compatible: Works with all major AI assistants
- 🌐 Live API: Access to live documentation service
🚀 Quick Start
Install in Cursor
Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server
{
"mcpServers": {
"bars": {
"command": "npx",
"args": ["-y", "bars-mcp-server"]
}
}
}Install in Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"bars": {
"command": "npx",
"args": ["-y", "bars-mcp-server"]
}
}
}Install in VS Code
Add to your VS Code MCP config:
{
"servers": {
"Bars": {
"type": "stdio",
"command": "npx",
"args": ["-y", "bars-mcp-server"]
}
}
}Install in Zed
Add to your Zed settings.json:
{
"context_servers": {
"Bars": {
"command": {
"path": "npx",
"args": ["-y", "bars-mcp-server"]
},
"settings": {}
}
}
}Install in Windsurf
Add to your Windsurf MCP config:
{
"mcpServers": {
"bars": {
"command": "npx",
"args": ["-y", "bars-mcp-server"]
}
}
}🛠️ Usage
Once installed, you can use Bars in your AI assistant:
Search for React documentation using BarsGet Next.js routing examples with BarsFind TypeScript best practices using Bars🔧 Available Tools
- resolve-library-id: Search for libraries and get Bars-compatible IDs
- get-library-docs: Fetch comprehensive documentation for any library
🌐 Live Service
- Website: https://bars-fca85.web.app
- API: https://api-h76uo622iq-uc.a.run.app
⚙️ Configuration
Environment Variables
{
"mcpServers": {
"bars": {
"command": "npx",
"args": ["-y", "bars-mcp-server"],
"env": {
"DEFAULT_MINIMUM_TOKENS": "10000"
}
}
}
}Alternative Runtimes
Using Bun
{
"mcpServers": {
"bars": {
"command": "bunx",
"args": ["-y", "bars-mcp-server"]
}
}
}Using Deno
{
"mcpServers": {
"bars": {
"command": "deno",
"args": ["run", "--allow-env", "--allow-net", "npm:bars-mcp-server"]
}
}
}🐳 Docker Support
FROM node:20-alpine
RUN npm install -g bars-mcp-server
CMD ["bars-mcp"]🧪 Testing
Test the installation:
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "resolve-library-id", "arguments": {"libraryName": "react"}}}' | npx -y bars-mcp-server🔧 Development
Local Development
git clone https://github.com/doctorai/bars-mcp-server.git
cd bars-mcp-server
npm install
npm run build
npm testBuilding
npm run build📝 API Reference
Search Libraries
GET https://api-h76uo622iq-uc.a.run.app/v1/search?query={library_name}Get Documentation
GET https://api-h76uo622iq-uc.a.run.app/v1/{library_path}?tokens={count}&topic={topic}🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🆚 Comparison with Context7
Bars provides the same functionality as Context7 but with:
- ✅ Your own infrastructure
- ✅ Firebase-powered reliability
- ✅ Custom branding
- ✅ Full control over data and features
📞 Support
- 🌐 Website: https://bars-fca85.web.app
- 🐛 Issues: https://github.com/doctorai/bars-mcp-server/issues
- 📧 Email: [email protected]
Built with ❤️ using Firebase, TypeScript, and the Model Context Protocol.
