{"_id":"@aigne/example-sqlite-mcp-server","_rev":"4-7c8f93ce16ad8f54221e4380b30c37ad","name":"@aigne/example-sqlite-mcp-server","dist-tags":{"latest":"1.1.0-beta.7"},"versions":{"1.1.0-beta.5":{"name":"@aigne/example-sqlite-mcp-server","version":"1.1.0-beta.5","author":"","license":"ISC","_id":"@aigne/example-sqlite-mcp-server@1.1.0-beta.5","maintainers":[{"name":"li-yechao","email":"liyechao@yechao.xyz"},{"name":"wangshijun","email":"shijun@arcblock.io"}],"bin":{"example-sqlite-mcp-server":"index.ts"},"dist":{"shasum":"ac514a0953380a5dc6501bf49f3efee67ea48ffe","tarball":"https://registry.npmjs.org/@aigne/example-sqlite-mcp-server/-/example-sqlite-mcp-server-1.1.0-beta.5.tgz","fileCount":6,"integrity":"sha512-yzkYzft/2AizgprcEcwSJ58f6t2NhTV8DWbVYNNY+Xj1VTOSHW+nbGv6j4uzDwDRLYoWe84PsOX0wDfRBbqrHA==","signatures":[{"sig":"MEUCIQDr0KyYCFKdphr2QDqn8Go2u/OianlbV5o7N1Ln43cAuQIgIVqIEdbSj7g2CAtgVXAnVCKTGlyVZjlyO6JWAmCpG38=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6016},"main":"index.js","_from":"file:aigne-example-sqlite-mcp-server-1.1.0-beta.5.tgz","scripts":{"start":"npx -y bun run index.ts"},"_npmUser":{"name":"li-yechao","email":"liyechao@yechao.xyz"},"_resolved":"/tmp/30e1ff5567f5164a893774f07560f2f1/aigne-example-sqlite-mcp-server-1.1.0-beta.5.tgz","_integrity":"sha512-yzkYzft/2AizgprcEcwSJ58f6t2NhTV8DWbVYNNY+Xj1VTOSHW+nbGv6j4uzDwDRLYoWe84PsOX0wDfRBbqrHA==","_npmVersion":"10.8.2","description":"A demonstration of using AIGNE Framework and Sqlite MCP Server to interact with a SQLite database","directories":{},"_nodeVersion":"20.18.3","dependencies":{"zod":"^3.24.2","@aigne/core":"^1.1.0-beta.5"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/example-sqlite-mcp-server_1.1.0-beta.5_1741797282653_0.8441407525563112","host":"s3://npm-registry-packages-npm-production"}},"1.1.0-beta.6":{"name":"@aigne/example-sqlite-mcp-server","version":"1.1.0-beta.6","author":"","license":"ISC","_id":"@aigne/example-sqlite-mcp-server@1.1.0-beta.6","maintainers":[{"name":"li-yechao","email":"liyechao@yechao.xyz"},{"name":"wangshijun","email":"shijun@arcblock.io"}],"bin":{"example-sqlite-mcp-server":"index.ts"},"dist":{"shasum":"cffe41497cae363e7c088333595dd8b61791649b","tarball":"https://registry.npmjs.org/@aigne/example-sqlite-mcp-server/-/example-sqlite-mcp-server-1.1.0-beta.6.tgz","fileCount":5,"integrity":"sha512-R1WqOPJ0hvnuPTGnfJ9xVuUQHCp2cr6Uj9niWM2Ty+T9YrLqhX/uqBk/E6KAoJmiRB6xcd29YPvPooZjCStqPA==","signatures":[{"sig":"MEQCIDAZPARj4ZCNCK7qtig2EjO3LWqdcqPfOEmxUDHzpimrAiBWRl1as3rojFC8O59qBEgwjrsYYu5h6GO6zTpOCobUpw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6065},"main":"index.js","_from":"file:aigne-example-sqlite-mcp-server-1.1.0-beta.6.tgz","scripts":{"start":"npx -y bun run index.ts"},"_npmUser":{"name":"li-yechao","email":"liyechao@yechao.xyz"},"_resolved":"/tmp/36193ac6438e881976d3bde0386af4ac/aigne-example-sqlite-mcp-server-1.1.0-beta.6.tgz","_integrity":"sha512-R1WqOPJ0hvnuPTGnfJ9xVuUQHCp2cr6Uj9niWM2Ty+T9YrLqhX/uqBk/E6KAoJmiRB6xcd29YPvPooZjCStqPA==","_npmVersion":"10.8.2","description":"A demonstration of using AIGNE Framework and Sqlite MCP Server to interact with a SQLite database","directories":{},"_nodeVersion":"20.18.3","dependencies":{"zod":"^3.24.2","@aigne/core":"^1.1.0-beta.6"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/example-sqlite-mcp-server_1.1.0-beta.6_1741799065266_0.18787560008887727","host":"s3://npm-registry-packages-npm-production"}},"1.1.0-beta.7":{"name":"@aigne/example-sqlite-mcp-server","version":"1.1.0-beta.7","author":{"name":"Arcblock","email":"blocklet@arcblock.io"},"license":"ISC","_id":"@aigne/example-sqlite-mcp-server@1.1.0-beta.7","maintainers":[{"name":"li-yechao","email":"liyechao@yechao.xyz"},{"name":"wangshijun","email":"shijun@arcblock.io"}],"homepage":"https://github.com/AIGNE-io/aigne-framework/tree/main/examples/sqlite-mcp-server","bugs":{"url":"https://github.com/AIGNE-io/aigne-framework/issues"},"bin":{"example-sqlite-mcp-server":"index.ts"},"dist":{"shasum":"2e0fb72fc0ac94d58afa10654595f0236d1dd951","tarball":"https://registry.npmjs.org/@aigne/example-sqlite-mcp-server/-/example-sqlite-mcp-server-1.1.0-beta.7.tgz","fileCount":5,"integrity":"sha512-88dr0om8WFNF9EXrKwNjHyb3r6rST8lkTLgl0ZFVUnvsj6UtxYeMvl+XhZtskglNNdFVDHRdArF2xtOQcnY8+w==","signatures":[{"sig":"MEUCIQDWYUYAXQn5+RPN9xiT7oZFEX0slLpwj0r3hEgXM76YagIgXWmo8cQZ+o6s4RX+jeGN1RZ0w51sYSHxAJhWiyAR0T0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6764},"main":"index.ts","_from":"file:aigne-example-sqlite-mcp-server-1.1.0-beta.7.tgz","scripts":{"start":"npx -y bun run index.ts"},"_npmUser":{"name":"li-yechao","email":"liyechao@yechao.xyz"},"_resolved":"/tmp/2b1db500f01882115283d37d4c555933/aigne-example-sqlite-mcp-server-1.1.0-beta.7.tgz","_integrity":"sha512-88dr0om8WFNF9EXrKwNjHyb3r6rST8lkTLgl0ZFVUnvsj6UtxYeMvl+XhZtskglNNdFVDHRdArF2xtOQcnY8+w==","repository":{"url":"git+https://github.com/AIGNE-io/aigne-framework.git","type":"git"},"_npmVersion":"10.8.2","description":"A demonstration of using AIGNE Framework and Sqlite MCP Server to interact with a SQLite database","directories":{},"_nodeVersion":"20.18.3","dependencies":{"zod":"^3.24.2","@aigne/core-next":"^1.1.0-beta.7"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/example-sqlite-mcp-server_1.1.0-beta.7_1741839173832_0.893375926206553","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-03-12T16:34:42.573Z","modified":"2026-01-21T06:21:17.905Z","1.1.0-beta.5":"2025-03-12T16:34:42.837Z","1.1.0-beta.6":"2025-03-12T17:04:25.429Z","1.1.0-beta.7":"2025-03-13T04:12:54.042Z"},"bugs":{"url":"https://github.com/AIGNE-io/aigne-framework/issues"},"author":{"name":"Arcblock","email":"blocklet@arcblock.io"},"license":"ISC","homepage":"https://github.com/AIGNE-io/aigne-framework/tree/main/examples/sqlite-mcp-server","repository":{"url":"git+https://github.com/AIGNE-io/aigne-framework.git","type":"git"},"description":"A demonstration of using AIGNE Framework and Sqlite MCP Server to interact with a SQLite database","maintainers":[{"email":"liyechao@yechao.xyz","name":"li-yechao"},{"email":"shijun@arcblock.io","name":"wangshijun"},{"email":"rob@arcblock.io","name":"mave99a"}],"readme":"# Sqlite MCP Server Demo\n\nThis is a demonstration of using [AIGNE Framework](https://github.com/AIGNE-io/aigne-framework) and [MCP Server SQlite](https://github.com/modelcontextprotocol/servers/tree/main/src/sqlite) to interact with SQLite databases.\n\n## Prerequisites\n\n- [Node.js](https://nodejs.org) and npm installed on your machine\n- [OpenAI API key](https://platform.openai.com/api-keys) used to interact with OpenAI API\n- [uv](https://github.com/astral-sh/uv) python environment for running [MCP Server SQlite](https://github.com/modelcontextprotocol/servers/tree/main/src/sqlite)\n- [Pnpm](https://pnpm.io) [Optional] if you want to run the example from source code\n\n## Try without Installation\n\n```bash\nOPENAI_API_KEY=YOUR_OPENAI_API_KEY # setup your OpenAI API key\n\nnpx -y @aigne/example-sqlite-mcp-server # run the example\n```\n\n## Installation\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/AIGNE-io/aigne-framework\n```\n\n### Install Dependencies\n\n```bash\ncd aigne-framework/examples/sqlite-mcp-server\n\npnpm install\n```\n\n### Setup Environment Variables\n\nSetup your OpenAI API key in the `.env.local` file:\n\n```bash\nOPENAI_API_KEY=\"\" # setup your OpenAI API key here\n```\n\n### Run the Example\n\n```bash\npnpm start\n```\n\n## Example\n\nThe following example demonstrates how to interact with an SQLite database:\n\n```typescript\nimport { join } from \"node:path\";\nimport {\n  AIAgent,\n  ChatModelOpenAI,\n  ExecutionEngine,\n  MCPAgent,\n} from \"@aigne/core-next\";\n\nconst model = new ChatModelOpenAI({\n  apiKey: process.env.OPENAI_API_KEY,\n});\n\nconst sqlite = await MCPAgent.from({\n  command: \"uvx\",\n  args: [\n    \"-q\",\n    \"mcp-server-sqlite\",\n    \"--db-path\",\n    join(process.cwd(), \"usages.db\"),\n  ],\n});\n\nconst engine = new ExecutionEngine({\n  model,\n  tools: [sqlite],\n});\n\nconst agent = AIAgent.from({\n  instructions: \"You are a database administrator\",\n});\n\nconsole.log(\n  await engine.run(\n    \"create a product table with columns name description and createdAt\",\n    agent\n  )\n);\n// output:\n// {\n//   text: \"The product table has been created successfully with the columns: `name`, `description`, and `createdAt`.\",\n// }\n\nconsole.log(await engine.run(\"create 10 products for test\", agent));\n// output:\n// {\n//   text: \"I have successfully created 10 test products in the database. Here are the products that were added:\\n\\n1. Product 1: $10.99 - Description for Product 1\\n2. Product 2: $15.99 - Description for Product 2\\n3. Product 3: $20.99 - Description for Product 3\\n4. Product 4: $25.99 - Description for Product 4\\n5. Product 5: $30.99 - Description for Product 5\\n6. Product 6: $35.99 - Description for Product 6\\n7. Product 7: $40.99 - Description for Product 7\\n8. Product 8: $45.99 - Description for Product 8\\n9. Product 9: $50.99 - Description for Product 9\\n10. Product 10: $55.99 - Description for Product 10\\n\\nIf you need any further assistance or operations, feel free to ask!\",\n// }\n\nconsole.log(await engine.run(\"how many products?\", agent));\n// output:\n// {\n//   text: \"There are 10 products in the database.\",\n// }\n\nawait engine.shutdown();\n```\n\n## License\n\nThis project is licensed under the MIT License.\n","readmeFilename":"README.md"}