loading…
Search for a command to run...
loading…
Enables interaction with Nettskjema forms, submissions, invitations, and data export through the MCP protocol.
Enables interaction with Nettskjema forms, submissions, invitations, and data export through the MCP protocol.
Model Context Protocol (MCP) server for the Nettskjema API. This server provides tools to interact with Nettskjema forms, submissions, invitations, and more through the MCP protocol.
git clone <repository-url>
cd nettskjema-mcp
pip install -e .
Or using uv:
uv pip install -e .
clientId and clientSecretCreate a .env file from the example:
cp .env.example .env
Add your credentials to the .env file:
NETTSKJEMA_CLIENT_ID=your_client_id_here
NETTSKJEMA_CLIENT_SECRET=your_client_secret_here
Security Note: Never commit or hardcode your clientSecret in code. It's like a password and valid for 365 days. Store it in environment variables or a secure vault.
Token Management: OAuth access tokens are valid for 24 hours and are automatically cached and reused by the server. You don't need to manage token refresh manually.
Your API client username is: <clientId>@apiclient
For each form you want to access, add this username to the form permissions:
After installation, you can run the server using the installed command:
nettskjema-mcp
Or run as a Python module:
python -m nettskjema_mcp
For development (without installation):
python -m nettskjema_mcp
Add this to your MCP client configuration (e.g., Claude Desktop config):
Option 1: Using installed command (recommended)
{
"mcpServers": {
"nettskjema": {
"command": "nettskjema-mcp",
"env": {
"NETTSKJEMA_CLIENT_ID": "your_client_id_here",
"NETTSKJEMA_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
Option 2: Using Python module (for development)
{
"mcpServers": {
"nettskjema": {
"command": "python",
"args": ["-m", "nettskjema_mcp"],
"cwd": "/path/to/nettskjema-mcp",
"env": {
"NETTSKJEMA_CLIENT_ID": "your_client_id_here",
"NETTSKJEMA_CLIENT_SECRET": "your_client_secret_here"
}
}
}
}
check_auth_status - Check OAuth authentication status and token info (debugging)get_user_info - Get authenticated user informationlist_my_forms - List all your formscreate_form - Create a new formdelete_forms - Delete forms with trash retentionget_form_info - Get metadata for a specific formget_form_settings - Get form configurationget_form_elements - Get all questions/elements in a formget_form_definition - Get complete form definitionupdate_form_settings - Update form settingslookup_form_by_title - Find form ID by short titlesubmit_form - Submit a response to a formget_submission - Get a single submission with answersget_submission_metadata - Get metadata for all submissionslist_my_submissions - List your submissionsget_form_answers - Get all answers for a formdelete_submissions - Delete specific submissionsexport_form_csv - Export responses as CSVexport_form_excel - Export responses as Excelget_spss_syntax - Generate SPSS syntax fileget_invitations - List all form invitationscreate_invitation - Create new invitation with optional SMSdelete_invitations - Delete specific invitationssend_reminder - Send reminder notificationsAfter installation and configuration, you can use the MCP server with any MCP-compatible client. Here are some example use cases:
Use the list_my_forms tool to see all forms you have access to.
Use get_form_info with a form_id to see the form's metadata.
Use get_form_elements to see all questions in the form.
Use export_form_csv or export_form_excel to download form responses.
Use get_form_answers to get raw answer data.
Use create_invitation to invite someone to fill out a form.
Use send_reminder to remind people who haven't responded yet.
Full Nettskjema API documentation: https://nettskjema.no/apidoc
MIT
Run in your terminal:
claude mcp add nettskjema-mcp-server -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.