anydb-mcp-service
v1.0.4
Published
Model Context Protocol (MCP) server for AnyDB database and record management through AI assistants
Maintainers
Readme
AnyDB MCP Service
A Model Context Protocol (MCP) server that enables AI agents to interact with AnyDB for database and record management through natural language conversations.
Overview
This MCP service provides seamless integration between AI assistants (like Claude) and AnyDB, allowing you to:
- Create, read, update, and search database records
- Manage teams and databases
- Upload and download files
- Build complex data workflows through natural language
Perfect for automating AnyDB operations, building AI-powered data assistants, and integrating AnyDB with AI workflows.
About AnyDB
AnyDB is an object-based platform for managing custom business operations.
Most software forces work into rigid tables, fixed modules, or predefined workflows. Real operations do not work that way. They are made up of things that belong together and things that relate to each other.
AnyDB lets you model your business the way it actually runs.
The Problem AnyDB Solves
Operational data is usually fragmented:
- Information spread across spreadsheets, tools, folders, and emails
- Records split across multiple tables that only make sense when joined
- Files and notes disconnected from the data they belong to
- Systems that break when workflows evolve
AnyDB replaces this with complete, connected business records.
Visit www.anydb.com to learn more.
Installation
npm install anydb-mcp-serviceOr install globally:
npm install -g anydb-mcp-servicePrerequisites
- Node.js 16 or higher
- An AnyDB account
- API credentials from your AnyDB account
Configuration
Environment Variables
Set the following environment variables:
ANYDB_DEFAULT_API_KEY=your_api_key_here
[email protected]
ANYDB_API_BASE_URL=https://app.anydb.com/apiYou can set these in:
- A
.envfile in your project directory - Your system environment variables
- Claude Desktop configuration (for MCP usage)
Getting Your API Key
Before using the SDK, you'll need to obtain your API key from AnyDB:
- Log in to your AnyDB account at app.anydb.com
- Click on the user icon in the bottom right corner of the browser UI
- In the Profile Dialog that opens, navigate to the Integration tab
- Copy your API key from the Integration settings
Your API key is unique to your account and should be kept secure. Never commit it to version control or share it publicly.
Usage
With Claude Desktop (MCP Protocol)
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"anydb": {
"command": "npx",
"args": ["-y", "anydb-mcp-service"],
"env": {
"ANYDB_DEFAULT_API_KEY": "your_api_key_here",
"ANYDB_DEFAULT_USER_EMAIL": "[email protected]",
"ANYDB_API_BASE_URL": "https://app.anydb.com/api"
}
}
}
}Restart Claude Desktop to activate the integration.
With ChatGPT (REST API)
The REST API provides HTTP endpoints for all tools, making it compatible with ChatGPT Actions and other HTTP-based integrations.
With Other MCP Clients
The server uses stdio transport and can be integrated with any MCP-compatible client. If installed globally:
anydb-mcp-serviceOr if installed locally:
npx anydb-mcp-serviceRATION.md](CHATGPT_INTEGRATION.md) for detailed setup instructions.
### With Other MCP Clients
The server uses stdio transport and can be integrated with any MCP-compatible client:
This service provides 12 tools for comprehensive AnyDB integration:
### Record Operations
| Tool | Description |
|------|-------------|
| `list_teams` | List all teams accessible with your credentials |
| `list_databases_for_team` | Get all databases within a team |
| `list_records` | List records in a database with filtering and pagination |
| `get_record` | Get a specific record with all cell data |
| `create_record` | Create a new record in a database |
| `update_record` | Update an existing record's metadata and content |
| `delete_record` | Delete an existing record permanently |
| `copy_record` | Copy a record with control over file attachment handling |
| `move_record` | Move a record to a new parent location |
| `search_records` | Search for records by keyword across database |
### File Operations
| Tool | Description |
|------|-------------|
| `download_file` | Download or get URL for files attached to record cells |
| `upload_file` | Upload files to record cells with base64 content |
### Building from Source
```bash
# Clone the repository
git clone https://github.com/yourusername/anydb-mcp-service.git
cd anydb-mcp-service
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Development mode (watch)
npm run dev
# Start MCP server
npmSupported AI Platforms
| Platform | Protocol | Status | Notes |
|----------|----------|--------|-------|
| Claude Desktop | MCP | ✅ Supported | Native MCP protocol support via stdio |
| ChatGPT Custom GPT | REST API | ✅ Supported | Requires REST server and public URL |
| Other MCP Clients | MCP | ✅ Supported | Any MCP-compatible client |
## API Documentation
For detailed API documentation and usage examples, visit the [AnyDB Documentation](https://www.anydb.com/support).
# Watch mode
npm test:watch
# Coverage report
npmExamples
### Basic Usage with Claude
Once configured, you can interact with AnyDB through natural language:
"List all my teams" "Show me databases in team XYZ" "Create a new record in database ABC with name 'Project Plan'" "Search for records containing 'budget' in database ABC" "Copy this record with all file attachments duplicated" "Move record XYZ under parent ABC" "Upload this file to record XYZ"
### Understanding copy_record Attachment Modes
When copying records, you have three options for handling file attachments:
1. **`noattachments`** - Copy the record without any files
- Use when you want a clean copy without attachments
- Fastest option, no file operations needed
- Example: "Copy this record template without files"
2. **`link`** (default) - Copy with linked attachments
- Files reference the same storage location as the original
- Quick operation, minimal storage used
- Changes to original files affect the copy
- Use for related records that should share the same files
- Example: "Copy this record and link to the same attachments"
3. **`duplicate`** - Copy with fully duplicated attachments
- Creates independent copies of all files
- Slowest option but creates true independent records
- Changes to original files don't affect the copy
- Use when you need completely separate file copies
- Example: "Copy this record and duplicate all file attachments"
Choose the mode based on your use case:
- Need independent files? Use `duplicate`
- Want to share files between records? Use `link`
- Don't need files at all? Use `noattachments`
### Programmatic Usage
You can also use the SDK directly in your Node.js applications:
```typescript
import { AnyDBClient } from 'anydb-api-sdk-ts';
const client = new AnyDBClient({
apiKey: 'your-api-key',
userEmail: '[email protected]'
});
// List teams
const teams = await client.listTeams();
// Create a record
const record = await client.createRecord({
teamid: 'team-id',
adbid: 'database-id',
name: 'New Record'
});
// Copy a record with duplicated attachments
const copiedRecord = await client.copyRecord({
teamid: 'team-id',
adbid: 'database-id',
adoid: 'record-id',
attachmentsmode: 'duplicate'
});
// Move a record to a new parent
const movedRecord = await client.moveRecord({
teamid: 'team-id',
adbid: 'database-id',
adoid: 'record-id',
parentid: 'new-parent-id'
});Troubleshooting
Common Issues
Connection Issues
- Verify
ANYDB_API_BASE_URLis set correctly (default:https://app.anydb.com/api) - Check that your API key and email are valid
- Ensure network access to AnyDB API
Authentication Errors
- Confirm your API key has not expired
- Verify the email associated with your API key
- Check API key permissions in your AnyDB account settings
File Upload Issues
- Ensure files are within size limits
- Check file permissions and access
- Verify the target record and cell position exist
For more help, visit AnyDB Support.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Related Projects
- anydb-api-sdk-ts - TypeScript SDK for AnyDB API
- AnyDB - Build powerful databases and workflows
Support
License
MIT License - see LICENSE file for details
About AnyDB
AnyDB is a powerful database platform that combines the flexibility of spreadsheets with the power of databases. Build custom workflows, manage data, and integrate with AI assistants through natural language.
Learn more at www.anydb.com
ChatGPT (REST API)
- ✅ Custom GPT Actions
- ✅ Requires REST API wrapper (included)
- ✅ Requires public URL or deployment
- 📖 See CHATGPT_INTEGRATION.md
Troubleshooting
Connection Issues
- Ensure
ANYDB_API_URLpoints to your internal API - Check that the API is accessible from the server
- Verify authentication token if required
License
MIT
Next Steps
For Claude Desktop (MCP):
- Build:
npm run build - Configure Claude Desktop config file
- Start:
npm run start:mcp
- Build:
For ChatGPT (REST API):
- Install dependencies:
npm install - Build:
npm run build - Start REST server:
npm run start:rest - Follow CHATGPT_INTEGRATION.md for Custom GPT setup
- Install dependencies:
Implement Backend API Endpoints: See IMPLEMENTATION_GUIDE.md
Test: Try creating templates with natural language prompts
Deploy: For ChatGPT, deploy REST server to cloud platform
