gptscript
gptscript copied to clipboard
feat: add MCP support
Example
chat: true
tools: arbtrary-tool-name
You're an expert at SQLite. Ask the user how you can help them.
---
name: arbtrary-tool-name
#!mcp
{
"mcpServers": {
"sqlite": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v",
"mcp-test:/mcp",
"mcp/sqlite",
"--db-path",
"/mcp/test.db"
]
}
}
}
While testing this out I ran into two issues
- Gptscript created a new docker instance per tool call, it's supposed to reuse the same container.
- It was not able to get the output from the tool, not sure why.
Name: gitops
Tools: gitlab
Chat: true
---
Name: gitlab
#!mcp
{
"mcpServers": {
"gitlab": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"GITLAB_PERSONAL_ACCESS_TOKEN",
"-e",
"GITLAB_API_URL",
"mcp/gitlab"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "xxxxxx",
"GITLAB_API_URL": "http://gitlab.cloudnautique.com:8929/api/v4"
}
}
}
}