Sitelet https://github.com/NodeOps-app/createos-mcp/commit/71e5ffc36eeaa34433f9e6bfc849368ce5401463
Skip to content

Commit 71e5ffc

Browse files
feat: missing endpoints (#2)
* feat: missing endpoints * feat: fix naming * feat: tidy
1 parent 8988b91 commit 71e5ffc

110 files changed

Lines changed: 7726 additions & 739 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎DEVELOPMENT.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ We are using swagger to generate mcp server.
44

55
```bash
66
/Users/bhautik/.asdf/installs/golang/1.23.5/packages/bin/mcpgen \
7-
--input swaggerdocs/openapi.yaml \
7+
--input /Users/bhautik/workspace/src/autogen-backend-v2/pkg/swaggerdocs/openapi.yaml \
88
-package mcptools \
99
-validation \
1010
-output /Users/bhautik/workspace/src/autogen-v2-mcp

‎README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
## CreateOS MCP Server
22

3-
### Configuration
3+
## Configuration
4+
5+
### Via API Key
46

57
```json
68
{

‎config-files/config.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
port: 8080
22
base_url: https://mac-8080.bhautik.in
33
authorization_server_url: https://mac-4444.bhautik.in
4-
api_base_url: https://mac-50001.bhautik.in
4+
api_base_url: https://api-createos.nodeops.network
55
transport: http
66
log_level: debug
77

‎go.mod‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@ module github.com/NodeOps-app/autogen-backend-v2-mcp
33
go 1.23.5
44

55
require (
6+
github.com/go-resty/resty/v2 v2.17.0
67
github.com/mark3labs/mcp-go v0.43.2
7-
github.com/oapi-codegen/runtime v1.1.2
8+
gopkg.in/yaml.v3 v3.0.1
89
)
910

1011
require (
11-
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
1212
github.com/bahlo/generic-list-go v0.2.0 // indirect
1313
github.com/buger/jsonparser v1.1.1 // indirect
14-
github.com/go-resty/resty/v2 v2.17.0 // indirect
1514
github.com/google/uuid v1.6.0 // indirect
1615
github.com/invopop/jsonschema v0.13.0 // indirect
1716
github.com/mailru/easyjson v0.7.7 // indirect
1817
github.com/spf13/cast v1.7.1 // indirect
1918
github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect
2019
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
2120
golang.org/x/net v0.43.0 // indirect
22-
gopkg.in/yaml.v3 v3.0.1 // indirect
2321
)

‎go.sum‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
2-
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
3-
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
41
github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk=
52
github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg=
6-
github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
73
github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs=
84
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
9-
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
105
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
116
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
127
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
@@ -20,7 +15,6 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
2015
github.com/invopop/jsonschema v0.13.0 h1:KvpoAJWEjR3uD9Kbm2HWJmqsEaHt8lBUpd0qHcIi21E=
2116
github.com/invopop/jsonschema v0.13.0/go.mod h1:ffZ5Km5SWWRAIN6wbDXItl95euhFz2uON45H2qjYt+0=
2217
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
23-
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
2418
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
2519
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
2620
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
@@ -29,17 +23,12 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0
2923
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
3024
github.com/mark3labs/mcp-go v0.43.2 h1:21PUSlWWiSbUPQwXIJ5WKlETixpFpq+WBpbMGDSVy/I=
3125
github.com/mark3labs/mcp-go v0.43.2/go.mod h1:YnJfOL382MIWDx1kMY+2zsRHU/q78dBg9aFb8W6Thdw=
32-
github.com/oapi-codegen/runtime v1.1.2 h1:P2+CubHq8fO4Q6fV1tqDBZHCwpVpvPg7oKiYzQgXIyI=
33-
github.com/oapi-codegen/runtime v1.1.2/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
3426
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
3527
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
3628
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
3729
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
3830
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
3931
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
40-
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
41-
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
42-
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
4332
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
4433
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
4534
github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc=
@@ -48,6 +37,8 @@ github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zI
4837
github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4=
4938
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
5039
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
40+
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
41+
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
5142
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
5243
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5344
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

‎handlers/AddProjectsToApp.go‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package handler
2+
3+
import (
4+
"context"
5+
"fmt"
6+
7+
mcputils "github.com/NodeOps-app/autogen-backend-v2-mcp/helpers"
8+
"github.com/mark3labs/mcp-go/mcp"
9+
)
10+
11+
type AddProjectsToAppParams struct {
12+
AppID string `json:"app_id"`
13+
Body map[string]interface{} `json:"body"`
14+
}
15+
16+
func AddProjectsToAppHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
17+
authInfo, args, err := handleRequest(ctx, request)
18+
if err != nil {
19+
return nil, err
20+
}
21+
22+
params, err := mcputils.ParamsParser[AddProjectsToAppParams](args)
23+
if err != nil {
24+
return nil, fmt.Errorf("failed to parse parameters: %w", err)
25+
}
26+
27+
return makePostRequest(fmt.Sprintf("/v1/apps/%s/projects", params.AppID), params.Body, authInfo)
28+
}
29+

‎handlers/AddServicesToApp.go‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package handler
2+
3+
import (
4+
"context"
5+
"fmt"
6+
7+
mcputils "github.com/NodeOps-app/autogen-backend-v2-mcp/helpers"
8+
"github.com/mark3labs/mcp-go/mcp"
9+
)
10+
11+
type AddServicesToAppParams struct {
12+
AppID string `json:"app_id"`
13+
Body map[string]interface{} `json:"body"`
14+
}
15+
16+
func AddServicesToAppHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
17+
authInfo, args, err := handleRequest(ctx, request)
18+
if err != nil {
19+
return nil, err
20+
}
21+
22+
params, err := mcputils.ParamsParser[AddServicesToAppParams](args)
23+
if err != nil {
24+
return nil, fmt.Errorf("failed to parse parameters: %w", err)
25+
}
26+
27+
return makePostRequest(fmt.Sprintf("/v1/apps/%s/services", params.AppID), params.Body, authInfo)
28+
}
29+

‎handlers/CreateApp.go‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package handler
2+
3+
import (
4+
"context"
5+
"fmt"
6+
7+
mcputils "github.com/NodeOps-app/autogen-backend-v2-mcp/helpers"
8+
"github.com/mark3labs/mcp-go/mcp"
9+
)
10+
11+
type CreateAppParams struct {
12+
Body map[string]interface{} `json:"body"`
13+
}
14+
15+
func CreateAppHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
16+
authInfo, args, err := handleRequest(ctx, request)
17+
if err != nil {
18+
return nil, err
19+
}
20+
21+
params, err := mcputils.ParamsParser[CreateAppParams](args)
22+
if err != nil {
23+
return nil, fmt.Errorf("failed to parse parameters: %w", err)
24+
}
25+
26+
return makePostRequest("/v1/apps", params.Body, authInfo)
27+
}
28+

‎handlers/CreateDomain.go‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package handler
2+
3+
import (
4+
"context"
5+
"fmt"
6+
7+
mcputils "github.com/NodeOps-app/autogen-backend-v2-mcp/helpers"
8+
"github.com/mark3labs/mcp-go/mcp"
9+
)
10+
11+
type CreateDomainParams struct {
12+
ProjectID string `json:"project_id"`
13+
Body map[string]interface{} `json:"body"`
14+
}
15+
16+
func CreateDomainHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
17+
authInfo, args, err := handleRequest(ctx, request)
18+
if err != nil {
19+
return nil, err
20+
}
21+
22+
params, err := mcputils.ParamsParser[CreateDomainParams](args)
23+
if err != nil {
24+
return nil, fmt.Errorf("failed to parse parameters: %w", err)
25+
}
26+
27+
return makePostRequest(fmt.Sprintf("/v1/projects/%s/domains", params.ProjectID), params.Body, authInfo)
28+
}
29+

‎handlers/DeleteApp.go‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package handler
2+
3+
import (
4+
"context"
5+
"fmt"
6+
7+
mcputils "github.com/NodeOps-app/autogen-backend-v2-mcp/helpers"
8+
"github.com/mark3labs/mcp-go/mcp"
9+
)
10+
11+
type DeleteAppParams struct {
12+
AppID string `json:"app_id"`
13+
}
14+
15+
func DeleteAppHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
16+
authInfo, args, err := handleRequest(ctx, request)
17+
if err != nil {
18+
return nil, err
19+
}
20+
21+
params, err := mcputils.ParamsParser[DeleteAppParams](args)
22+
if err != nil {
23+
return nil, fmt.Errorf("failed to parse parameters: %w", err)
24+
}
25+
26+
return makeDeleteRequest(fmt.Sprintf("/v1/apps/%s", params.AppID), authInfo)
27+
}
28+

0 commit comments

Comments
 (0)