A Model Context Protocol (MCP) server implementation that integrates with Onspring's API, allowing AI assistants to access and manipulate data stored in Onspring instances.
This server provides a bridge between AI assistants and Onspring instances through the Model Context Protocol. It enables MCP clients to read and interact with your Onspring data, providing capabilities like:
- Retrieving lists of apps and their fields
- Fetching records from apps
- Running queries against apps
- Accessing report data
- Retrieve files from attachment fields
- Node.js
- An Onspring instance with API access
- An Onspring API key with appropriate permissions
- Install the package globally:
npm install -g @stevanfreeborn/onx-mcp-serverOr use it directly via npx:
npx @stevanfreeborn/onx-mcp-serverIf you want to build from source:
# Clone the repository
git clone https://github.com/your-username/onx-mcp-server.git
cd onx-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Start the server
npm startIn order to use the server, you will need to configure it in the MCP client of your choice. Each MCP client should provide instructions on setting up a MCP server. You will also need to make sure the required environment variables are set. See the Configuration section for more details.
The server requires that the following environment variables are set:
| Variable | Description | Default |
|---|---|---|
ONSPRING_API_KEY |
Your Onspring API key | (Required) |
ONSPRING_BASE_URL |
The base URL for the Onspring API | https://api.onspring.com |
Claude Desktop is a popular MCP client. To connect the Onspring MCP server to Claude Desktop, follow these steps:
-
Find the
claude_desktop_config.jsonfile. Please reference this documentation for more information on where to find this file: For Claude Desktop Users. -
Open the
claude_desktop_config.jsonfile in a text editor and add the following configuration:
{
"mcpServers": {
"onx-mcp-server": {
"command": "npx",
"args": ["-y", "@stevanfreeborn/onx-mcp-server"],
"env": {
"ONSPRING_API_KEY": "your_onspring_api_key",
"ONSPRING_BASE_URL": "https://api.onspring.com"
}
}
}
}Note
The specific command and arguments may vary based on your setup.
The MCP Server exposes the following tools for AI assistants to interact with Onspring:
Verifies that the server can connect to the Onspring API using the provided credentials.
Retrieves a list of all accessible apps in the Onspring instance.
Gets all fields for a specified app.
Parameters:
name: The name of the app
Retrieves records from an app with specified fields.
Parameters:
appName: The name of the appfields: Array of field names to retrievepageNumber: The page number to start from (1-based)numberOfPages: The number of pages to retrieve
Gets all reports available for a specified app.
Parameters:
appName: The name of the app
Retrieves data from a specified report.
Parameters:
appName: The name of the appreportName: The name of the reportdataType: The type of report data to retrieve (optional)
Queries records from an app using a filter.
Parameters:
appName: The name of the appfields: Array of field names to retrievefilter: A filter object to restrict the resultspageNumber: The page number to start from (1-based)numberOfPages: The number of pages to retrieve
Retrieves a file stored in an attachment field.
Parameters:
appName: The name of the appfieldName: The name of the attachment fieldrecordId: The ID of the record containing the filefileName: The name of the file to retrieve
# Install dependencies
npm install
# Run in development mode (watches for changes)
npm run devThe project uses Vitest for testing:
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Run tests with UI
npm run test:uiYou can use the MCP Inspector to test the server:
npm run inspectThis project is licensed under the MIT License - see the LICENSE.md file for details.