Skip to content

Commit 4390d8f

Browse files
committed
remove authenticate example
1 parent dd576ff commit 4390d8f

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515
"containerEnv": {
1616
"KAMAL_REGISTRY_PASSWORD": "$KAMAL_REGISTRY_PASSWORD",
17-
"DB_HOST": "postgres",
18-
"MCP_PASSWORD": "mcp_password",
19-
"MCP_USERNAME": "mcp_username"
17+
"DB_HOST": "postgres"
2018
},
2119

2220
// Configure tool-specific properties.

.vscode/mcp.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
"rails-app-mcp": {
44
"type": "http",
55
"url": "http://localhost:3000/mcp"
6-
// "headers": {
7-
// // "Basic #{Base64.strict_encode64("#{ENV["MCP_USERNAME"]}:#{ENV["MCP_PASSWORD"]}")}"
8-
// "Authorization": "Basic bWNwX3VzZXJuYW1lOm1jcF9wYXNzd29yZA=="
9-
// }
106
}
117
}
128
}

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,10 @@ bin/rails test
8484
│ posts(id, title, description) │
8585
└──────────────────────────────────┘
8686
```
87+
88+
---
89+
90+
### 📚 Additional Resources
91+
92+
- Read the full documentation at [MCP Official Docs](https://modelcontextprotocol.io/docs/getting-started/intro).
93+
- Extending [GitHub Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp) coding agent with the Model Context Protocol (MCP)

app/controllers/mcp_controller.rb

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
class McpController < ApplicationController
2-
# Add authenticate_or_request_with_http_basic
3-
include ActionController::HttpAuthentication::Basic::ControllerMethods
4-
5-
# before_action :authenticate!
6-
72
INSTRUCTIONS = <<~INSTRUCTIONS
83
Você é um assistente especializado em gerenciamento de postagens de blog.
94
@@ -41,13 +36,4 @@ def handle
4136

4237
render json: server.handle_json(request.body.read)
4338
end
44-
45-
46-
private
47-
48-
def authenticate!
49-
authenticate_or_request_with_http_basic do |username, password|
50-
username == ENV["MCP_USERNAME"] && password == ENV["MCP_PASSWORD"]
51-
end
52-
end
5339
end

0 commit comments

Comments
 (0)