Markdown Converter
Agent skill for markdown-converter
This is a Model Context Protocol (MCP) server providing full QuickBase database operations to AI agents. It enables agents to create tables, manage fields, query records, and handle relationships through standardized MCP tools.
Sign in to like and favorite skills
This is a Model Context Protocol (MCP) server providing full QuickBase database operations to AI agents. It enables agents to create tables, manage fields, query records, and handle relationships through standardized MCP tools.
@modelcontextprotocol/sdksrc/index.ts)src/quickbase/client.ts)src/tools/index.ts)src/types/quickbase.ts)Agent Request → MCP Protocol → Server Handler → QuickBaseClient → HTTP API → QuickBase → Response
Required environment variables:
QB_REALM: Your QuickBase realm hostnameQB_USER_TOKEN: QuickBase user tokenQB_APP_ID: Application IDOptional:
QB_DEFAULT_TIMEOUT: Request timeout (default 30000ms)QB_MAX_RETRIES: Retry attempts (default 3)npm install cp env.example .env # Configure .env with your credentials npm run setup
npm run build # Compile TypeScript npm start # Run server npm run dev # Development with watch mode
npm test # Basic API test npm run test:jest # Unit tests
Supported: text, numeric, date, checkbox, email, phone, url, file, lookup, formula, reference, etc.
Uses QB-USER-TOKEN in Authorization header with realm hostname.
{ "tableId": "bu65pc8px", "select": [6, 7, 8], "where": "{6.EX.'Search Term'}", "top": 100 }
{ "tableId": "bu65pc8px", "fields": { "6": "John Doe", "7": "[email protected]", "8": 25 } }
{ "tableId": "bu65pc8px", "label": "Status", "fieldType": "text_choice", "choices": ["Active", "Inactive", "Pending"] }
https://api.quickbase.com/v1/skip and top parameterssrc/index.ts: Server implementationsrc/quickbase/client.ts: API clientsrc/tools/index.ts: Tool definitionssrc/types/quickbase.ts: Data schemasIMPORTANT: When building QuickBase codepages, ALWAYS use session authentication - NEVER use user tokens in embedded codepages.
// WRONG - Don't do this in codepages const response = await fetch('https://api.quickbase.com/v1/records', { headers: { 'Authorization': `QB-USER-TOKEN ${userToken}`, // ❌ BAD 'QB-Realm-Hostname': realm } });
// CORRECT - Session auth in codepages (function loadQuickBaseClient(){ const IS_QB = /quickbase\.com$/i.test(location.hostname); const CODEPAGE = '/db/[realm]?a=dbpage&pageID=[hero_page_id]'; const LOCAL = 'quickbase_codepage_hero.js'; // ... resilient loader implementation ... (async function run(){ if (IS_QB) { if (await attemptScript(CODEPAGE) && exportClient('script')) return; // ... other strategies ... } // ... fallback to shim ... })(); })(); // Then use the client async function saveData(tableId, recordData) { if (typeof window.qbClient !== 'undefined' && window.qbClient.mode !== 'shim') { const client = new window.qbClient(); return await client.post('records', { to: tableId, data: [recordData] }); } }
quickbase_codepage_hero.js/db/[realm]?a=dbpage&pageID=[id] in your codepageconst FIELD_IDS = { name: 6, email: 7, amount: 8 }; async function saveToQuickBase() { const recordData = { [FIELD_IDS.name]: { value: 'John Doe' }, [FIELD_IDS.email]: { value: '[email protected]' }, [FIELD_IDS.amount]: { value: 150.00 } }; try { const client = new window.qbClient(); const response = await client.post('records', { to: 'your_table_id', data: [recordData] }); console.log('Saved successfully:', response); } catch (error) { console.error('Save failed:', error); } }
async function findRecords(tableId, searchTerm) { const client = new window.qbClient(); const response = await client.get('records', { from: tableId, where: `{6.EX.'${searchTerm}'}`, // Field 6 contains search term select: [6, 7, 8] // Return specific fields }); return response.data; }
See
MyDealership.html for a complete working example of session authentication in a codepage.